]> git.lyx.org Git - lyx.git/blob - lib/external_templates
German UserGuide.lyx: updates by Hartmut
[lyx.git] / lib / external_templates
1 #
2 # file external_templates
3 # This file is part of LyX, the document processor.
4 # Licence details can be found in the file COPYING.
5 #
6 # author Asger Alstrup Nielsen
7 # author Angus Leeming
8 # author Johnathan Burchill
9 #
10 # Full author contact details are available in file CREDITS.
11
12 # This file contains the definitions of those External Templates that are
13 # part of the official LyX distribution.
14 # Feel free to create your own External Templates, storing them in
15 # .lyx/external_templates
16
17
18 PreambleDef WarnNotFound
19         %% Print a warning encased in an fbox.
20         \def\lyxstripprefix#1>{}
21         \newcommand{\warnNotFound}[1]{%
22                 \def\lyxtempfilename{#1}%
23                 \fbox{Could not find
24                         \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
25                 \typeout{Could not find \lyxtempfilename!}%
26         }
27 PreambleDefEnd
28
29
30 PreambleDef InputOrWarn
31         %% Input the file if it exists, using \input, else print a warning
32         \newcommand{\inputOrWarn}[1]{%
33                 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
34 PreambleDefEnd
35
36
37 Template RasterImage
38         # By default, InsetExternal is displayed as a grey button
39         # containing this text.
40         GuiName "Bitmap: $$AbsOrRelPathParent$$Basename"
41         # This text is used in the External dialog.
42         # Provide enough information to explain to the user just
43         # what the template can provide him with.
44         HelpText
45                 A bitmap file.
46         HelpTextEnd
47         # ANY file type can be displayed as a RasterImage.
48         # Specifically, LyX will attempt to interrogate the file itself
49         # in order to deduce its format.
50         InputFormat "*"
51         # Globbing pattern used when browsing for a Raster image file.
52         FileFilter "*.{gif,png,jpg,bmp,pbm,ppm,tga,tif,xpm,xbm}"
53         # Set to "true" if the file represented by the template
54         # must be generated by LyX.
55         AutomaticProduction true
56         # LyX has hard-coded support for these transformations
57         Transform Rotate
58         Transform Resize
59         Transform Clip
60         Transform Extra
61         # LyX preview options:
62         # Off: LyX will not attempt to show this material on screen.
63         # Graphics: LyX will attempt to show this material as-is or via a
64         #           conversion to a showable format.
65         # InstantPreview: LyX will attempt to use the 'instant preview'
66         #                 mechanism in order to show this material.
67         Preview Graphics
68         Format LaTeX
69                 TransformOption Rotate RotationLatexOption
70                 TransformOption Resize ResizeLatexOption
71                 TransformOption Clip   ClipLatexOption
72                 TransformOption Extra  ExtraOption
73                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
74                 # This string is what is output to the LaTeX file.
75                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
76                 UpdateFormat eps
77                 UpdateResult "$$AbsPath$$Basename.eps"
78                 Requirement "graphicx"
79                 ReferencedFile latex "$$AbsPath$$Basename.eps"
80                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
81         FormatEnd
82         Format PDFLaTeX
83                 TransformOption Rotate RotationLatexOption
84                 TransformOption Resize ResizeLatexOption
85                 TransformOption Clip   ClipLatexOption
86                 TransformOption Extra  ExtraOption
87                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
88                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
89                 UpdateFormat png
90                 UpdateResult "$$AbsPath$$Basename.png"
91                 Requirement "graphicx"
92                 ReferencedFile pdflatex "$$AbsPath$$Basename.png"
93         FormatEnd
94         Format Ascii
95                 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
96                 UpdateFormat asciiimage
97                 UpdateResult "$$AbsPath$$Basename.asc"
98         FormatEnd
99         Format DocBook
100                 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
101                 UpdateFormat eps
102                 UpdateResult "$$AbsPath$$Basename.eps"
103                 ReferencedFile docbook     "$$AbsPath$$Basename.eps"
104                 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
105         FormatEnd
106 TemplateEnd
107
108
109 Template XFig
110         GuiName "Xfig: $$AbsOrRelPathParent$$Basename"
111         HelpText
112                 An Xfig figure.
113         HelpTextEnd
114         InputFormat fig
115         FileFilter "*.fig"
116         AutomaticProduction true
117         Transform Rotate
118         Transform Resize
119         Preview InstantPreview
120         Format LaTeX
121                 TransformCommand Rotate RotationLatexCommand
122                 TransformCommand Resize ResizeLatexCommand
123                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pstex_t}$$ResizeBack$$RotateBack"
124                 UpdateFormat pstex
125                 UpdateResult "$$AbsPath$$Basename.pstex_t"
126                 Requirement "color"
127                 Requirement "graphicx"
128                 # Preamble WarnNotFound
129                 # Preamble InputOrWarn
130                 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
131                 ReferencedFile latex "$$AbsPath$$Basename.eps"
132                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
133         FormatEnd
134         Format PDFLaTeX
135                 TransformCommand Rotate RotationLatexCommand
136                 TransformCommand Resize ResizeLatexCommand
137                 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdftex_t}$$ResizeBack$$RotateBack"
138                 UpdateFormat pdftex
139                 UpdateResult "$$AbsPath$$Basename.pdftex_t"
140                 Requirement "color"
141                 Requirement "graphicx"
142                 # Preamble WarnNotFound
143                 # Preamble InputOrWarn
144                 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
145                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
146         FormatEnd
147         Format Ascii
148                 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
149                 UpdateFormat asciixfig
150                 UpdateResult "$$AbsPath$$Basename.asc"
151         FormatEnd
152         Format DocBook
153                 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
154                 UpdateFormat eps
155                 UpdateResult "$$AbsPath$$Basename.eps"
156                 ReferencedFile docbook     "$$AbsPath$$Basename.eps"
157                 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
158         FormatEnd
159 TemplateEnd
160
161
162 Template ChessDiagram
163         GuiName "Chess: $$AbsOrRelPathParent$$Basename"
164         HelpText
165                 A chess position diagram.
166                 This template will use XBoard to edit the position.
167                 Use the 'File->Save Position' in XBoard to save
168                 the position that you want to display.
169                 Make sure to give it a '.fen' extension
170                 and remember to type in a relative path
171                 to the LyX document location.
172                 Within XBoard, use 'Edit->Edit Position'
173                 to enable general editing of the board.
174                 You might also check out the
175                 'Options->Test legality' option, and
176                 remember to middle and right click to
177                 insert new material in the board.
178                 In order for this to work, you have to
179                 put the bundled lyxskak.sty in a place
180                 that TeX will find it, and you will need
181                 to install the skak package from CTAN.
182         HelpTextEnd
183         InputFormat fen
184         FileFilter "*.fen"
185         AutomaticProduction true
186         Preview InstantPreview
187         Format LaTeX
188                 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
189                 Requirement "chess"
190                 ReferencedFile latex "$$AbsPath$$Basename$$Extension"
191         FormatEnd
192         Format PDFLaTeX
193                 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
194                 Requirement "chess"
195                 ReferencedFile pdflatex "$$AbsPath$$Basename$$Extension"
196         FormatEnd
197         Format Ascii
198                 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
199                 UpdateFormat asciichess
200                 UpdateResult "$$AbsPath$$Basename.asc"
201         FormatEnd
202         Format DocBook
203                 Product "[Chess: $$AbsOrRelPathMaster$$Basename]"
204         FormatEnd
205 TemplateEnd
206
207
208 Template LilyPond
209         GuiName "Lilypond typeset music"
210         HelpText
211                 Sheet music typeset by GNU LilyPond,
212                 converted to .pdf or .eps for inclusion
213                 Using .eps requires at least lilypond 2.6
214                 Using .pdf requires at least lilypond 2.9
215         HelpTextEnd
216         InputFormat "lilypond"
217         FileFilter "*.ly"
218         AutomaticProduction true
219         Transform Rotate
220         Transform Resize
221         Transform Clip
222         Transform Extra
223         Preview InstantPreview
224         Format LaTeX
225                 TransformOption Rotate RotationLatexOption
226                 TransformOption Resize ResizeLatexOption
227                 TransformOption Clip   ClipLatexOption
228                 TransformOption Extra  ExtraOption
229                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
230                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
231                 UpdateFormat eps
232                 UpdateResult "$$AbsPath$$Basename.eps"
233                 Requirement "graphicx"
234                 ReferencedFile latex "$$AbsPath$$Basename.eps"
235                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
236         FormatEnd
237         Format PDFLaTeX
238                 TransformOption Rotate RotationLatexOption
239                 TransformOption Resize ResizeLatexOption
240                 TransformOption Clip   ClipLatexOption
241                 TransformOption Extra  ExtraOption
242                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
243                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
244                 UpdateFormat pdf
245                 UpdateResult "$$AbsPath$$Basename.pdf"
246                 Requirement "graphicx"
247                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
248         FormatEnd
249         Format Ascii
250                 Product "[LilyPond: $$FName]"
251         FormatEnd
252         Format DocBook
253                 Product "[LilyPond: $$FName]"
254         FormatEnd
255 TemplateEnd
256
257 Template PDFPages
258         GuiName "PDF pages: $$AbsOrRelPathParent$$Basename"
259         HelpText
260                 Includes PDF documents, using the 'pdfpages' package.
261                 
262                 To include multiple pages, use the "pages"-option,
263                 which must be inserted to "Options".
264                 Examples:
265                     * pages={x-y} (for a range of pages)
266                     * pages={x,y,z} (for specific pages)
267                     * pages=- (to include all pages)
268                 
269                 Read the documentation of the pdfpages package
270                 for further options and details.
271         HelpTextEnd
272         InputFormat pdf
273         FileFilter "*.pdf"
274         Transform Rotate
275         Transform Resize
276         Transform Extra
277         Format LaTeX
278                 TransformOption Rotate RotationLatexOption
279                 TransformOption Resize ResizeLatexOption
280                 TransformOption Extra  ExtraOption
281                 Option Arg "[$$Extra,$$Rotate,$$Resize]"
282                 Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
283                 UpdateFormat pdf
284                 UpdateResult "$$AbsPath$$Basename.pdf"
285                 Requirement "pdfpages"
286                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
287         FormatEnd
288         Format Ascii
289                 Product "[PDFPages: $$FName]"
290         FormatEnd
291         Format DocBook
292                 Product "[PDFPages: $$FName]"
293         FormatEnd
294 TemplateEnd
295
296
297 Template Date
298         GuiName "Date"
299         HelpText
300                 Today's date.
301                 Read 'info date' for more information.
302         HelpTextEnd
303         InputFormat date
304         FileFilter "*"
305         AutomaticProduction true
306         Preview Off
307         Format LaTeX
308                 Product "$$Contents(\"$$Tempname\")"
309                 UpdateFormat dateout
310                 UpdateResult "$$Tempname"
311         FormatEnd
312         Format PDFLaTeX
313                 Product "$$Contents(\"$$Tempname\")"
314                 UpdateFormat dateout
315                 UpdateResult "$$Tempname"
316         FormatEnd
317         Format Ascii
318                 Product "$$Contents(\"$$Tempname\")"
319                 UpdateFormat dateout
320                 UpdateResult "$$Tempname"
321         FormatEnd
322         Format DocBook
323                 Product "$$Contents(\"$$Tempname\")"
324                 UpdateFormat dateout
325                 UpdateResult "$$Tempname"
326         FormatEnd
327 TemplateEnd