]> git.lyx.org Git - lyx.git/blob - lib/xtemplates/xfig.xtemplate
remerge he.po
[lyx.git] / lib / xtemplates / xfig.xtemplate
1 #
2 # XFig 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 Asger Alstrup Nielsen
8 # author Angus Leeming
9 # author Johnathan Burchill
10 #
11 # Full author contact details are available in file CREDITS.
12
13
14 PreambleDef WarnNotFound
15         %% Print a warning encased in an fbox.
16         \def\lyxstripprefix#1>{}
17         \newcommand{\warnNotFound}[1]{%
18                 \def\lyxtempfilename{#1}%
19                 \fbox{Could not find
20                         \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
21                 \typeout{Could not find \lyxtempfilename!}%
22         }
23 PreambleDefEnd
24
25
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}}}
30 PreambleDefEnd
31
32
33 Template XFig
34         GuiName "Xfig figure"
35         HelpText
36                 An Xfig figure.
37         HelpTextEnd
38         InputFormat fig
39         FileFilter "*.fig"
40         AutomaticProduction true
41         Transform Rotate
42         Transform Resize
43         Preview InstantPreview
44         Format LaTeX
45                 TransformCommand Rotate RotationLatexCommand
46                 TransformCommand Resize ResizeLatexCommand
47                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pstex_t}$$ResizeBack$$RotateBack"
48                 UpdateFormat pstex
49                 UpdateResult "$$AbsPath$$Basename.pstex_t"
50                 Requirement "color"
51                 Requirement "graphicx"
52                 # Preamble WarnNotFound
53                 # Preamble InputOrWarn
54                 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
55                 ReferencedFile latex "$$AbsPath$$Basename.eps"
56                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
57         FormatEnd
58         Format PDFLaTeX
59                 TransformCommand Rotate RotationLatexCommand
60                 TransformCommand Resize ResizeLatexCommand
61                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdftex_t}$$ResizeBack$$RotateBack"
62                 UpdateFormat pdftex
63                 UpdateResult "$$AbsPath$$Basename.pdftex_t"
64                 Requirement "color"
65                 Requirement "graphicx"
66                 # Preamble WarnNotFound
67                 # Preamble InputOrWarn
68                 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
69                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
70         FormatEnd
71         Format Ascii
72                 Product "[XFig: $$FName]"
73         FormatEnd
74         Format DocBook
75                 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
76                 UpdateFormat eps
77                 UpdateResult "$$AbsPath$$Basename.eps"
78                 ReferencedFile docbook     "$$AbsPath$$Basename.eps"
79                 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
80         FormatEnd
81         Format XHTML
82                 Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
83                 UpdateFormat svg
84                 UpdateResult "$$AbsPath$$Basename.svg"
85                 ReferencedFile xhtml "$$AbsPath$$Basename.svg"
86         FormatEnd
87 TemplateEnd
88