2 # Inkscape External Template
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
8 # author Martin Vermeer
10 # based on external templates by:
12 # author Asger Alstrup Nielsen
13 # author Angus Leeming
14 # author Johnathan Burchill
16 # Full author contact details are available in file CREDITS.
19 PreambleDef WarnNotFound
20 %% Print a warning encased in an fbox.
21 \def\lyxstripprefix#1>{}
22 \newcommand{\warnNotFound}[1]{%
23 \def\lyxtempfilename{#1}%
25 \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
26 \typeout{Could not find \lyxtempfilename!}%
31 PreambleDef InputOrWarn
32 %% Input the file if it exists, using \input, else print a warning
33 \newcommand{\inputOrWarn}[1]{%
34 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
39 GuiName "Inkscape figure"
42 Note that using this template automatically uses the
43 document text in the image (like with the Xfig template).
47 AutomaticProduction true
50 Preview InstantPreview
52 TransformCommand Rotate RotationLatexCommand
53 TransformCommand Resize ResizeLatexCommand
54 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$ResizeBack$$RotateBack"
56 UpdateResult "$$AbsPath$$Basename.pdf_tex"
58 Requirement "graphicx"
59 Requirement "mathtools"
60 # Preamble WarnNotFound
61 # Preamble InputOrWarn
62 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
63 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
66 TransformCommand Rotate RotationLatexCommand
67 TransformCommand Resize ResizeLatexCommand
68 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$ResizeBack$$RotateBack"
70 UpdateResult "$$AbsPath$$Basename.eps_tex"
72 Requirement "graphicx"
73 Requirement "mathtools"
74 # Preamble WarnNotFound
75 # Preamble InputOrWarn
76 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.eps_tex"
77 ReferencedFile latex "$$AbsPath$$Basename.eps"
78 ReferencedFile dvi "$$AbsPath$$Basename.eps"
81 Product "[InkscapeGraphics: $$FName]"
84 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
86 UpdateResult "$$AbsPath$$Basename.eps"
87 ReferencedFile docbook "$$AbsPath$$Basename.eps"
88 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
91 Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
93 UpdateResult "$$AbsPath$$Basename.svg"
94 ReferencedFile xhtml "$$AbsPath$$Basename.svg"