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
9 # author Johnathan Burchill
11 # Full author contact details are available in file CREDITS.
14 PreambleDef WarnNotFound
15 %% Print a warning encased in an fbox.
16 \def\lyxstripprefix#1>{}
17 \newcommand{\warnNotFound}[1]{%
18 \def\lyxtempfilename{#1}%
20 \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
21 \typeout{Could not find \lyxtempfilename!}%
26 PreambleDef InputOrWarn
27 %% Input the file if it exists, using \input, else print a warning
28 \newcommand{\inputOrWarn}[1]{%
29 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
34 GuiName "Inkscape figure"
37 This template should work flawlessly with Inkscape 0.48.
38 For Inkscape 0.91, there is a (reported) bug in the
39 LaTeX + PDF output which makes a workaround necessary,
40 see Embedded Objects manual.
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 # Preamble WarnNotFound
58 # Preamble InputOrWarn
59 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
60 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
63 TransformCommand Rotate RotationLatexCommand
64 Product "$$RotateFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$RotateBack"
66 UpdateResult "$$AbsPath$$Basename.eps_tex"
68 Requirement "graphicx"
69 # Preamble WarnNotFound
70 # Preamble InputOrWarn
71 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
72 ReferencedFile latex "$$AbsPath$$Basename.eps"
73 ReferencedFile dvi "$$AbsPath$$Basename.eps"