+#
+# file external_templates
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# author Asger Alstrup Nielsen
+# author Angus Leeming
+# author Johnathan Burchill
+#
+# Full author contact details are available in file CREDITS.
+
+# This file contains the definitions of those External Templates that are
+# part of the official LyX distribution.
+# Feel free to create your own External Templates, storing them in
+# .lyx/external_templates
+
+
+PreambleDef WarnNotFound
+ %% Print a warning encased in an fbox.
+ \def\lyxstripprefix#1>{}
+ \newcommand{\warnNotFound}[1]{%
+ \def\lyxtempfilename{#1}%
+ \fbox{Could not find
+ \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
+ \typeout{Could not find \lyxtempfilename!}%
+ }
+PreambleDefEnd
+
+
+PreambleDef InputOrWarn
+ %% Input the file if it exists, using \input, else print a warning
+ \newcommand{\inputOrWarn}[1]{%
+ \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
+PreambleDefEnd
+
+Template GnumericSpreadsheet
+ GuiName "Spreadsheet"
+ HelpText
+ A spreadsheet made with Gnumeric, LibreOffice, 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 pdflatex "$$AbsOrRelPathMaster$$Basename.tex"
+ FormatEnd
+TemplateEnd