]> git.lyx.org Git - lyx.git/blob - lib/xtemplates/inkscape.xtemplate
Update it.po
[lyx.git] / lib / xtemplates / inkscape.xtemplate
1 #
2 # Inkscape External Template
3 #
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6 #
7 # author Daniel Gloger
8 # author Martin Vermeer
9 #
10 # based on external templates by:
11 #
12 # author Asger Alstrup Nielsen
13 # author Angus Leeming
14 # author Johnathan Burchill
15 #
16 # Full author contact details are available in file CREDITS.
17
18
19 PreambleDef WarnNotFound
20         %% Print a warning encased in an fbox.
21         \def\lyxstripprefix#1>{}
22         \newcommand{\warnNotFound}[1]{%
23                 \def\lyxtempfilename{#1}%
24                 \fbox{Could not find
25                         \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
26                 \typeout{Could not find \lyxtempfilename!}%
27         }
28 PreambleDefEnd
29
30
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}}}
35 PreambleDefEnd
36
37
38 Template Inkscape
39         GuiName "Inkscape figure"
40         HelpText
41                 An Inkscape figure.
42                 Note that using this template automatically uses the 
43                 document text in the image (like with the Xfig template).
44         HelpTextEnd
45         InputFormat svg
46         FileFilter "*.{svg}"
47         AutomaticProduction true
48         Transform Rotate
49         Transform Resize
50         Preview InstantPreview
51         Format PDFLaTeX
52                 TransformCommand Rotate RotationLatexCommand
53                 TransformCommand Resize ResizeLatexCommand
54                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$ResizeBack$$RotateBack"
55                 UpdateFormat pdftex
56                 UpdateResult "$$AbsPath$$Basename.pdf_tex"
57                 Requirement "xcolor"
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"
64         FormatEnd
65         Format LaTeX
66                 TransformCommand Rotate RotationLatexCommand
67                 TransformCommand Resize ResizeLatexCommand
68                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.eps_tex}$$ResizeBack$$RotateBack"
69                 UpdateFormat pstex
70                 UpdateResult "$$AbsPath$$Basename.eps_tex"
71                 Requirement "xcolor"
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"
79         FormatEnd
80         Format Ascii
81                 Product "[InkscapeGraphics: $$FName]"
82         FormatEnd
83         Format DocBook
84                 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
85                 UpdateFormat eps
86                 UpdateResult "$$AbsPath$$Basename.eps"
87                 ReferencedFile docbook     "$$AbsPath$$Basename.eps"
88                 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
89         FormatEnd
90         Format XHTML
91                 Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
92                 UpdateFormat svg
93                 UpdateResult "$$AbsPath$$Basename.svg"
94                 ReferencedFile xhtml "$$AbsPath$$Basename.svg"
95         FormatEnd
96 TemplateEnd
97