]> git.lyx.org Git - lyx.git/commitdiff
After more attempts add gnumeric support.
authorPavel Sanda <sanda@lyx.org>
Thu, 9 Dec 2010 01:19:13 +0000 (01:19 +0000)
committerPavel Sanda <sanda@lyx.org>
Thu, 9 Dec 2010 01:19:13 +0000 (01:19 +0000)
Patch from Helge Hafting.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg164180.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36786 a592a061-630c-0410-9148-cb99ea01b6c8

lib/configure.py
lib/external_templates
src/LaTeXFeatures.cpp

index 038c766276beaa2c5fb0b95c3424341152f20d6f..7c0d97e4185a250dc37a92bbe51c292f21943ffc 100644 (file)
@@ -515,6 +515,11 @@ def checkFormatEntries(dtl_tools):
 \Format text3      txt    "Plain text (ps2ascii)" "" ""        "%%"    "document"
 \Format text4      txt    "Plain text (catdvi)"   "" ""        "%%"    "document"
 \Format textparagraph txt "Plain Text, Join Lines" "" ""       "%%"    "document"''' ])
+   #Spreadsheets using ssconvert from gnumeric
+    checkViewer('gnumeric spreadsheet software', ['gnumeric'], 
+      rc_entry = [r'''\Format gnumeric gnumeric "Gnumeric spreadsheet" "" ""    "%%"   "document" 
+\Format excel      xls    "Excel spreadsheet"      "" "" "%%"    "document" 
+\Format oocalc     ods    "OpenOffice spreadsheet" "" "" "%%"    "document"''']) 
  #
     path, xhtmlview = checkViewer('an HTML previewer', ['firefox', 'mozilla file://$$p$$i', 'netscape'],
         rc_entry = [r'\Format xhtml      xhtml   "LyXHTML"              y "%%" ""    "document"'])
@@ -805,6 +810,13 @@ def checkConverterEntries():
         rc_entry = [ r'\converter svg        png        "%%"   ""'])
     
     #
+    # gnumeric/xls/ods to tex
+    checkProg('a spreadsheet -> latex converter', ['ssconvert'], 
+       rc_entry = [ r'''\converter gnumeric latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" "" 
+\converter ods latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" "" 
+\converter xls latex "ssconvert --export-type=Gnumeric_html:latex $$i $$o" ""''', 
+'']) 
+
     path, lilypond = checkProg('a LilyPond -> EPS/PDF/PNG converter', ['lilypond'])
     if (lilypond != ''):
         version_string = cmdOutput("lilypond --version")
index 4f4af8c92f7ebc8aacac73b811b9bb1dd1805d3b..61dbddf2fc3d2253330c04e558c0fea3e60b7a54 100644 (file)
@@ -33,6 +33,45 @@ PreambleDef InputOrWarn
                \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
 PreambleDefEnd
 
+Template GnumericSpreadsheet
+       GuiName "Spreadsheet"
+       HelpText
+               A spreadsheet made with gnumeric, openoffice or excel.
+               It imports as a long table, so any length
+               is ok. Excessive width could be a problem.
+               The gnumeric software is necessary for conversion,
+               both for gnumeric and excel files.
+       HelpTextEnd
+       InputFormat "gnumeric"
+       FileFilter "*.{gnumeric,ods,xls}"
+       AutomaticProduction true
+       Format LaTeX
+               Product "\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
+               UpdateFormat latex
+               UpdateResult "$$AbsPath$$Basename.tex"
+               Requirement "color"
+               Requirement "array"
+               Requirement "longtable"
+               Requirement "calc"
+               Requirement "multirow"
+               Requirement "hhline"
+               Requirement "ifthen"
+               ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
+               FormatEnd
+       Format PDFLaTeX
+               Product "\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
+               UpdateFormat latex
+               UpdateResult "$$AbsPath$$Basename.tex"
+               Requirement "color"
+               Requirement "array"
+               Requirement "longtable"
+               Requirement "calc"
+               Requirement "multirow"
+               Requirement "hhline"
+               Requirement "ifthen"
+               ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
+       FormatEnd
+TemplateEnd
 
 Template RasterImage
        # By default, InsetExternal is displayed as a grey button
index b47cab129c6dc175b40a1eb60c1bbb4acdd6e6cf..46afe7cc4a6e34bfa381438b5a9dd9917330f5cb 100644 (file)
@@ -588,6 +588,7 @@ char const * simplefeatures[] = {
        "csquotes",
        "enumitem",
        "endnotes",
+       "hhline",
        "ifthen",
        // listings is handled in BufferParams.cpp
        "bm",