mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 14:04:25 +00:00
(Johnathan Burchill): clever latex to input an xfig .pstex_t file if it
exists, else print a warning. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7660 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1dffc5cfe4
commit
f2d97f93b4
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2003-09-03 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* scripts/fig2pdftex.sh:
|
* scripts/fig2pdftex.sh:
|
||||||
|
@ -11,16 +11,38 @@ Template XFig
|
|||||||
EditCommand "xfig $$FName"
|
EditCommand "xfig $$FName"
|
||||||
AutomaticProduction true
|
AutomaticProduction true
|
||||||
Format LaTeX
|
Format LaTeX
|
||||||
Product "\\input{$$Basename.pstex_t}"
|
Product "\\xfiginput{$$Basename.pstex_t}"
|
||||||
UpdateFormat pstex
|
UpdateFormat pstex
|
||||||
UpdateResult "$$Basename.pstex_t"
|
UpdateResult "$$Basename.pstex_t"
|
||||||
Requirement "graphicx"
|
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
|
FormatEnd
|
||||||
Format PDFLaTeX
|
Format PDFLaTeX
|
||||||
Product "\\input{$$Basename.pdftex_t}"
|
Product "\\xfiginput{$$Basename.pdftex_t}"
|
||||||
UpdateFormat pdftex
|
UpdateFormat pdftex
|
||||||
UpdateResult "$$Basename.pdftex_t"
|
UpdateResult "$$Basename.pdftex_t"
|
||||||
Requirement "graphicx"
|
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
|
FormatEnd
|
||||||
Format Ascii
|
Format Ascii
|
||||||
Product "$$Contents(\"$$Basename.asc\")"
|
Product "$$Contents(\"$$Basename.asc\")"
|
||||||
|
Loading…
Reference in New Issue
Block a user