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 Asger Alstrup Nielsen
8 # author Johnathan Burchill
10 # Full author contact details are available in file CREDITS.
13 PreambleDef WarnNotFound
14 %% Print a warning encased in an fbox.
15 \def\lyxstripprefix#1>{}
16 \newcommand{\warnNotFound}[1]{%
17 \def\lyxtempfilename{#1}%
19 \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
20 \typeout{Could not find \lyxtempfilename!}%
25 PreambleDef InputOrWarn
26 %% Input the file if it exists, using \input, else print a warning
27 \newcommand{\inputOrWarn}[1]{%
28 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
33 GuiName "Inkscape figure"
36 Note that using this template automatically uses the
37 document text in the image (like with the Xfig template).
41 AutomaticProduction true
43 Preview InstantPreview
45 TransformCommand Rotate RotationLatexCommand
46 # Resize is not desirable here, as fonts are sized to surrounding LaTeX font
47 Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$RotateBack"
49 UpdateResult "$$AbsPath$$Basename.pdf_tex"
51 Requirement "graphicx"
52 Requirement "mathtools"
53 # Preamble WarnNotFound
54 # Preamble InputOrWarn
55 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
56 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
59 TransformCommand Rotate RotationLatexCommand
60 Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$RotateBack"
62 UpdateResult "$$AbsPath$$Basename.eps_tex"
64 Requirement "graphicx"
65 Requirement "mathtools"
66 # Preamble WarnNotFound
67 # Preamble InputOrWarn
68 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
69 ReferencedFile latex "$$AbsPath$$Basename.eps"
70 ReferencedFile dvi "$$AbsPath$$Basename.eps"