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
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
16 # Note that a user-defined external_templates file would replace this
17 # definition. Thus, if you would like to keep the external templates defined
18 # in this file, please copy this file and add on futher external templates
19 # to the end. For more information, see http://www.lyx.org/trac/ticket/3983.
22 PreambleDef WarnNotFound
23 %% Print a warning encased in an fbox.
24 \def\lyxstripprefix#1>{}
25 \newcommand{\warnNotFound}[1]{%
26 \def\lyxtempfilename{#1}%
28 \ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
29 \typeout{Could not find \lyxtempfilename!}%
34 PreambleDef InputOrWarn
35 %% Input the file if it exists, using \input, else print a warning
36 \newcommand{\inputOrWarn}[1]{%
37 \IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
40 Template GnumericSpreadsheet
43 A spreadsheet made with Gnumeric, LibreOffice, OpenOffice or Excel.
44 It imports as a long table, so any length
45 is ok. Excessive width could be a problem.
46 The gnumeric software is necessary for conversion,
47 both for gnumeric and excel files.
49 InputFormat "gnumeric"
50 FileFilter "*.{gnumeric,ods,xls}"
51 AutomaticProduction true
53 Product "\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
55 UpdateResult "$$AbsPath$$Basename.tex"
58 Requirement "longtable"
60 Requirement "multirow"
63 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
66 Product "\\def\\inputGnumericTable{}\\input{$$AbsOrRelPathMaster$$Basename.tex}"
68 UpdateResult "$$AbsPath$$Basename.tex"
71 Requirement "longtable"
73 Requirement "multirow"
76 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.tex"
81 # By default, InsetExternal is displayed as a grey button
82 # containing this text.
83 GuiName "Raster image"
84 # This text is used in the External dialog.
85 # Provide enough information to explain to the user just
86 # what the template can provide him with.
89 Use this template to include bitmap images of any kind except
90 photos in JPEG format: These will be uncompressed by this
91 template, therefore it is better to include them with a
92 graphics inset, since the graphics inset preserves the
93 compression if the pdflatex compiler is used.
95 # ANY file type can be displayed as a RasterImage.
96 # Specifically, LyX will attempt to interrogate the file itself
97 # in order to deduce its format.
99 # Globbing pattern used when browsing for a Raster image file.
100 FileFilter "*.{gif,png,jpg,bmp,pbm,ppm,tga,tif,xpm,xbm}"
101 # Set to "true" if the file represented by the template
102 # must be generated by LyX.
103 AutomaticProduction true
104 # LyX has hard-coded support for these transformations
109 # LyX preview options:
110 # Off: LyX will not attempt to show this material on screen.
111 # Graphics: LyX will attempt to show this material as-is or via a
112 # conversion to a showable format.
113 # InstantPreview: LyX will attempt to use the 'instant preview'
114 # mechanism in order to show this material.
117 TransformOption Rotate RotationLatexOption
118 TransformOption Resize ResizeLatexOption
119 TransformOption Clip ClipLatexOption
120 TransformOption Extra ExtraOption
121 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
122 # This string is what is output to the LaTeX file.
123 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
125 UpdateResult "$$AbsPath$$Basename.eps"
126 Requirement "graphicx"
127 ReferencedFile latex "$$AbsPath$$Basename.eps"
128 ReferencedFile dvi "$$AbsPath$$Basename.eps"
131 TransformOption Rotate RotationLatexOption
132 TransformOption Resize ResizeLatexOption
133 TransformOption Clip ClipLatexOption
134 TransformOption Extra ExtraOption
135 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
136 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
138 UpdateResult "$$AbsPath$$Basename.png"
139 Requirement "graphicx"
140 ReferencedFile pdflatex "$$AbsPath$$Basename.png"
143 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
144 UpdateFormat asciiimage
145 UpdateResult "$$AbsPath$$Basename.asc"
148 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
150 UpdateResult "$$AbsPath$$Basename.eps"
151 ReferencedFile docbook "$$AbsPath$$Basename.eps"
152 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
156 Template VectorGraphics
157 GuiName "Vector graphics"
159 A vector graphics file.
160 Use this template to include vector graphics of any kind.
161 LyX will try to retain the vector properties of the image for
163 Note that specialized templates exist for Xfig figures and Dia diagrams.
164 The specialized templates allow to automatically use the document font in
165 the figures, which is not possible with this general template.
167 # ANY file type can be displayed as a VectorGraphics.
168 # Specifically, LyX will attempt to interrogate the file itself
169 # in order to deduce its format.
171 # Globbing pattern used when browsing for a vector graphics file.
172 # xfig, dia, fen and ly are exlcuded, since we have specialized templates
173 FileFilter "*.{agr,dot,emf,eps,odg,obj,sxd,svg,svgz,tgo,pdf,wmf}"
174 AutomaticProduction true
175 # LyX has hard-coded support for these transformations
182 TransformOption Rotate RotationLatexOption
183 TransformOption Resize ResizeLatexOption
184 TransformOption Clip ClipLatexOption
185 TransformOption Extra ExtraOption
186 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
187 # This string is what is output to the LaTeX file.
188 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
190 UpdateResult "$$AbsPath$$Basename.eps"
191 Requirement "graphicx"
192 ReferencedFile latex "$$AbsPath$$Basename.eps"
193 ReferencedFile dvi "$$AbsPath$$Basename.eps"
196 TransformOption Rotate RotationLatexOption
197 TransformOption Resize ResizeLatexOption
198 TransformOption Clip ClipLatexOption
199 TransformOption Extra ExtraOption
200 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
201 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
203 UpdateResult "$$AbsPath$$Basename.pdf"
204 Requirement "graphicx"
205 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
208 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
209 UpdateFormat asciiimage
210 UpdateResult "$$AbsPath$$Basename.asc"
213 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
215 UpdateResult "$$AbsPath$$Basename.eps"
216 ReferencedFile docbook "$$AbsPath$$Basename.eps"
217 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
222 GuiName "Xfig figure"
228 AutomaticProduction true
231 Preview InstantPreview
233 TransformCommand Rotate RotationLatexCommand
234 TransformCommand Resize ResizeLatexCommand
235 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pstex_t}$$ResizeBack$$RotateBack"
237 UpdateResult "$$AbsPath$$Basename.pstex_t"
239 Requirement "graphicx"
240 # Preamble WarnNotFound
241 # Preamble InputOrWarn
242 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
243 ReferencedFile latex "$$AbsPath$$Basename.eps"
244 ReferencedFile dvi "$$AbsPath$$Basename.eps"
247 TransformCommand Rotate RotationLatexCommand
248 TransformCommand Resize ResizeLatexCommand
249 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdftex_t}$$ResizeBack$$RotateBack"
251 UpdateResult "$$AbsPath$$Basename.pdftex_t"
253 Requirement "graphicx"
254 # Preamble WarnNotFound
255 # Preamble InputOrWarn
256 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
257 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
260 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
261 UpdateFormat asciixfig
262 UpdateResult "$$AbsPath$$Basename.asc"
265 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
267 UpdateResult "$$AbsPath$$Basename.eps"
268 ReferencedFile docbook "$$AbsPath$$Basename.eps"
269 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
274 Template ChessDiagram
275 GuiName "Chess diagram"
277 A chess position diagram.
278 This template will use XBoard to edit the position.
279 Use the 'File->Save Position' in XBoard to save
280 the position that you want to display.
281 Make sure to give it a '.fen' extension
282 and remember to type in a relative path
283 to the LyX document location.
284 Within XBoard, use 'Edit->Edit Position'
285 to enable general editing of the board.
286 You might also check out the
287 'Options->Test legality' option, and
288 remember to middle and right click to
289 insert new material in the board.
290 In order for this to work, you have to
291 put the bundled lyxskak.sty in a place
292 that TeX will find it, and you will need
293 to install the skak package from CTAN.
297 AutomaticProduction true
298 Preview InstantPreview
300 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
303 UpdateResult "$$AbsPath$$Basename$$Extension"
304 ReferencedFile latex "$$AbsPath$$Basename$$Extension"
307 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
310 UpdateResult "$$AbsPath$$Basename$$Extension"
311 ReferencedFile pdflatex "$$AbsPath$$Basename$$Extension"
314 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
315 UpdateFormat asciichess
316 UpdateResult "$$AbsPath$$Basename.asc"
319 Product "[Chess: $$AbsOrRelPathMaster$$Basename]"
325 GuiName "Lilypond typeset music"
327 Sheet music typeset by GNU LilyPond,
328 converted to .pdf or .eps for inclusion
329 Using .eps requires at least lilypond 2.6
330 Using .pdf requires at least lilypond 2.9
332 InputFormat "lilypond"
334 AutomaticProduction true
339 Preview InstantPreview
341 TransformOption Rotate RotationLatexOption
342 TransformOption Resize ResizeLatexOption
343 TransformOption Clip ClipLatexOption
344 TransformOption Extra ExtraOption
345 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
346 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
348 UpdateResult "$$AbsPath$$Basename.eps"
349 Requirement "graphicx"
350 ReferencedFile latex "$$AbsPath$$Basename.eps"
351 ReferencedFile dvi "$$AbsPath$$Basename.eps"
354 TransformOption Rotate RotationLatexOption
355 TransformOption Resize ResizeLatexOption
356 TransformOption Clip ClipLatexOption
357 TransformOption Extra ExtraOption
358 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
359 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
361 UpdateResult "$$AbsPath$$Basename.pdf"
362 Requirement "graphicx"
363 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
366 Product "[LilyPond: $$FName]"
369 Product "[LilyPond: $$FName]"
376 Includes PDF documents, using the 'pdfpages' package.
377 To include multiple pages, use the 'pages'-option,
378 which must be inserted to 'Options'.
380 * pages={x-y} (for a range of pages)
381 * pages={x,y,z} (for specific pages)
382 * pages=- (to include all pages)
383 * pages=last-1 (to include all pages in reverse order)
384 With the option 'noautoscale' the PDF pages are
385 inserted in their original size.
386 Read the documentation of the pdfpages package
387 for further options and details.
391 AutomaticProduction true
397 TransformOption Rotate RotationLatexOption
398 TransformOption Resize ResizeLatexOption
399 TransformOption Extra ExtraOption
400 Option Arg "[$$Extra,$$Rotate,$$Resize]"
401 Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
403 UpdateResult "$$AbsPath$$Basename.pdf"
404 Requirement "pdfpages"
405 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
408 Product "[PDFPages: $$FName]"
411 Product "[PDFPages: $$FName]"
420 Read 'info date' for more information.
424 AutomaticProduction true
427 Product "$$Contents(\"$$Tempname\")"
429 UpdateResult "$$Tempname"
432 Product "$$Contents(\"$$Tempname\")"
434 UpdateResult "$$Tempname"
437 Product "$$Contents(\"$$Tempname\")"
439 UpdateResult "$$Tempname"
442 Product "$$Contents(\"$$Tempname\")"
444 UpdateResult "$$Tempname"
449 GuiName "Dia diagram"
455 AutomaticProduction true
456 # LyX has hard-coded support for these transformations
461 Preview InstantPreview
463 TransformOption Rotate RotationLatexOption
464 TransformOption Resize ResizeLatexOption
465 TransformOption Clip ClipLatexOption
466 TransformOption Extra ExtraOption
467 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
468 # This string is what is output to the LaTeX file.
469 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
471 UpdateResult "$$AbsPath$$Basename.eps"
472 Requirement "graphicx"
473 ReferencedFile latex "$$AbsPath$$Basename.eps"
474 ReferencedFile dvi "$$AbsPath$$Basename.eps"
477 TransformOption Rotate RotationLatexOption
478 TransformOption Resize ResizeLatexOption
479 TransformOption Clip ClipLatexOption
480 TransformOption Extra ExtraOption
481 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
482 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
484 UpdateResult "$$AbsPath$$Basename.pdf"
485 Requirement "graphicx"
486 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
489 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
490 UpdateFormat asciiimage
491 UpdateResult "$$AbsPath$$Basename.asc"
494 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
496 UpdateResult "$$AbsPath$$Basename.eps"
497 ReferencedFile docbook "$$AbsPath$$Basename.eps"
498 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"