+2003-09-04 Johnathan Burchill <jkerrb@shaw.ca>
+
+ * external_templates: add some clever LaTeX to the XFIG template so that
+ we input the file if it exists, else print a warning encased in an fbox.
+
2003-09-03 Angus Leeming <leeming@lyx.org>
* scripts/fig2pdftex.sh:
EditCommand "xfig $$FName"
AutomaticProduction true
Format LaTeX
- Product "\\input{$$Basename.pstex_t}"
+ Product "\\xfiginput{$$Basename.pstex_t}"
UpdateFormat pstex
UpdateResult "$$Basename.pstex_t"
Requirement "graphicx"
+ Preamble
+ %% This inputs the file if it exists, else prints a warning
+ %% encased in an fbox.
+ \def\stripprefix#1>{}
+ \newcommand*{\xfiginput}[1]{%
+ \edef\tempfilename{#1}%
+ \InputIfFileExists{#1}{}{%
+ \fbox{Could not find
+ \ttfamily\expandafter\stripprefix\meaning\tempfilename
+ !}}}
+ PreambleEnd
FormatEnd
Format PDFLaTeX
- Product "\\input{$$Basename.pdftex_t}"
+ Product "\\xfiginput{$$Basename.pdftex_t}"
UpdateFormat pdftex
UpdateResult "$$Basename.pdftex_t"
Requirement "graphicx"
+ Preamble
+ %% This inputs the file if it exists, else prints a warning
+ %% encased in an fbox.
+ \def\stripprefix#1>{}
+ \newcommand*{\xfiginput}[1]{%
+ \edef\tempfilename{#1}%
+ \InputIfFileExists{#1}{}{%
+ \fbox{Could not find
+ \ttfamily\expandafter\stripprefix\meaning\tempfilename
+ !}}}
+ PreambleEnd
FormatEnd
Format Ascii
Product "$$Contents(\"$$Basename.asc\")"