2 # Inkscape External Template
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
7 # author Martin Vermeer
9 # based on external templates by:
11 # author Asger Alstrup Nielsen
12 # author Angus Leeming
13 # author Johnathan Burchill
15 # Full author contact details are available in file CREDITS.
18 PreambleDef WarnNotFound
19 %% Print a warning encased in an fbox.
20 \def\lyxstripprefix#1>{}
21 \newcommand{\warnNotFound}[1]{%
22 \def\lyxtempfilename{#1}%
24 \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
25 \typeout{Could not find \lyxtempfilename!}%
30 PreambleDef InputOrWarn
31 %% Input the file if it exists, using \input, else print a warning
32 \newcommand{\inputOrWarn}[1]{%
33 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
38 GuiName "Inkscape figure"
41 Note that using this template automatically uses the
42 document text in the image (like with the Xfig template).
46 AutomaticProduction true
48 Preview InstantPreview
50 TransformCommand Rotate RotationLatexCommand
51 # Resize is not desirable here, as fonts are sized to surrounding LaTeX font
52 Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$RotateBack"
54 UpdateResult "$$AbsPath$$Basename.pdf_tex"
56 Requirement "graphicx"
57 Requirement "mathtools"
58 # Preamble WarnNotFound
59 # Preamble InputOrWarn
60 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
61 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
64 TransformCommand Rotate RotationLatexCommand
65 Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$RotateBack"
67 UpdateResult "$$AbsPath$$Basename.eps_tex"
69 Requirement "graphicx"
70 Requirement "mathtools"
71 # Preamble WarnNotFound
72 # Preamble InputOrWarn
73 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
74 ReferencedFile latex "$$AbsPath$$Basename.eps"
75 ReferencedFile dvi "$$AbsPath$$Basename.eps"