* InsetTabular.cpp: fix bug 6057: longtable captions must always be in a first header.
[lyx.git] / lib / external_templates
blob86ac7ec151c14e82e2b9fd0c5326957792ed0826
2 # file external_templates
3 # This file is part of LyX, the document processor.
4 # Licence details can be found in the file COPYING.
6 # author Asger Alstrup Nielsen
7 # author Angus Leeming
8 # author Johnathan Burchill
10 # Full author contact details are available in file CREDITS.
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
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
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
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
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
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                 UpdateFormat fen
191                 UpdateResult "$$AbsPath$$Basename$$Extension"
192                 ReferencedFile latex "$$AbsPath$$Basename$$Extension"
193         FormatEnd
194         Format PDFLaTeX
195                 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
196                 Requirement "chess"
197                 UpdateFormat fen
198                 UpdateResult "$$AbsPath$$Basename$$Extension"
199                 ReferencedFile pdflatex "$$AbsPath$$Basename$$Extension"
200         FormatEnd
201         Format Ascii
202                 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
203                 UpdateFormat asciichess
204                 UpdateResult "$$AbsPath$$Basename.asc"
205         FormatEnd
206         Format DocBook
207                 Product "[Chess: $$AbsOrRelPathMaster$$Basename]"
208         FormatEnd
209 TemplateEnd
212 Template LilyPond
213         GuiName "Lilypond typeset music"
214         HelpText
215                 Sheet music typeset by GNU LilyPond,
216                 converted to .pdf or .eps for inclusion
217                 Using .eps requires at least lilypond 2.6
218                 Using .pdf requires at least lilypond 2.9
219         HelpTextEnd
220         InputFormat "lilypond"
221         FileFilter "*.ly"
222         AutomaticProduction true
223         Transform Rotate
224         Transform Resize
225         Transform Clip
226         Transform Extra
227         Preview InstantPreview
228         Format LaTeX
229                 TransformOption Rotate RotationLatexOption
230                 TransformOption Resize ResizeLatexOption
231                 TransformOption Clip   ClipLatexOption
232                 TransformOption Extra  ExtraOption
233                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
234                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
235                 UpdateFormat eps
236                 UpdateResult "$$AbsPath$$Basename.eps"
237                 Requirement "graphicx"
238                 ReferencedFile latex "$$AbsPath$$Basename.eps"
239                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
240         FormatEnd
241         Format PDFLaTeX
242                 TransformOption Rotate RotationLatexOption
243                 TransformOption Resize ResizeLatexOption
244                 TransformOption Clip   ClipLatexOption
245                 TransformOption Extra  ExtraOption
246                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
247                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
248                 UpdateFormat pdf
249                 UpdateResult "$$AbsPath$$Basename.pdf"
250                 Requirement "graphicx"
251                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
252         FormatEnd
253         Format Ascii
254                 Product "[LilyPond: $$FName]"
255         FormatEnd
256         Format DocBook
257                 Product "[LilyPond: $$FName]"
258         FormatEnd
259 TemplateEnd
261 Template PDFPages
262         GuiName "PDF pages: $$AbsOrRelPathParent$$Basename"
263         HelpText
264                 Includes PDF documents, using the 'pdfpages' package.
265                 To include multiple pages, use the 'pages'-option,
266                 which must be inserted to 'Options'.
267                 Examples:
268                 * pages={x-y} (for a range of pages)
269                 * pages={x,y,z} (for specific pages)
270                 * pages=- (to include all pages)
271                 Read the documentation of the pdfpages package
272                 for further options and details.
273         HelpTextEnd
274         InputFormat pdf
275         FileFilter "*.pdf"
276         Transform Rotate
277         Transform Resize
278         Transform Extra
279         Preview Graphics
280         Format LaTeX
281                 TransformOption Rotate RotationLatexOption
282                 TransformOption Resize ResizeLatexOption
283                 TransformOption Extra  ExtraOption
284                 Option Arg "[$$Extra,$$Rotate,$$Resize]"
285                 Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
286                 UpdateFormat pdf
287                 UpdateResult "$$AbsPath$$Basename.pdf"
288                 Requirement "pdfpages"
289                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
290         FormatEnd
291         Format Ascii
292                 Product "[PDFPages: $$FName]"
293         FormatEnd
294         Format DocBook
295                 Product "[PDFPages: $$FName]"
296         FormatEnd
297 TemplateEnd
300 Template Date
301         GuiName "Date"
302         HelpText
303                 Today's date.
304                 Read 'info date' for more information.
305         HelpTextEnd
306         InputFormat date
307         FileFilter "*"
308         AutomaticProduction true
309         Preview Off
310         Format LaTeX
311                 Product "$$Contents(\"$$Tempname\")"
312                 UpdateFormat dateout
313                 UpdateResult "$$Tempname"
314         FormatEnd
315         Format PDFLaTeX
316                 Product "$$Contents(\"$$Tempname\")"
317                 UpdateFormat dateout
318                 UpdateResult "$$Tempname"
319         FormatEnd
320         Format Ascii
321                 Product "$$Contents(\"$$Tempname\")"
322                 UpdateFormat dateout
323                 UpdateResult "$$Tempname"
324         FormatEnd
325         Format DocBook
326                 Product "$$Contents(\"$$Tempname\")"
327                 UpdateFormat dateout
328                 UpdateResult "$$Tempname"
329         FormatEnd
330 TemplateEnd
332 Template Dia
333         GuiName "Dia: $$AbsOrRelPathParent$$Basename"
334         HelpText
335                 Dia diagram.
336         HelpTextEnd
337         InputFormat dia
338         FileFilter "*.dia"
339         AutomaticProduction true
340         # LyX has hard-coded support for these transformations
341         Transform Rotate
342         Transform Resize
343         Transform Clip
344         Transform Extra
345         Preview InstantPreview
346         Format LaTeX
347                 TransformOption Rotate RotationLatexOption
348                 TransformOption Resize ResizeLatexOption
349                 TransformOption Clip   ClipLatexOption
350                 TransformOption Extra  ExtraOption
351                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
352                 # This string is what is output to the LaTeX file.
353                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
354                 UpdateFormat eps
355                 UpdateResult "$$AbsPath$$Basename.eps"
356                 Requirement "graphicx"
357                 ReferencedFile latex "$$AbsPath$$Basename.eps"
358                 ReferencedFile dvi   "$$AbsPath$$Basename.eps"
359         FormatEnd
360         Format PDFLaTeX
361                 TransformOption Rotate RotationLatexOption
362                 TransformOption Resize ResizeLatexOption
363                 TransformOption Clip   ClipLatexOption
364                 TransformOption Extra  ExtraOption
365                 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
366                 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
367                 UpdateFormat pdf
368                 UpdateResult "$$AbsPath$$Basename.pdf"
369                 Requirement "graphicx"
370                 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
371         FormatEnd
372         Format Ascii
373                 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
374                 UpdateFormat asciiimage
375                 UpdateResult "$$AbsPath$$Basename.asc"
376         FormatEnd
377         Format DocBook
378                 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
379                 UpdateFormat eps
380                 UpdateResult "$$AbsPath$$Basename.eps"
381                 ReferencedFile docbook     "$$AbsPath$$Basename.eps"
382                 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
383         FormatEnd
384 TemplateEnd