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.
91 # ANY file type can be displayed as a RasterImage.
92 # Specifically, LyX will attempt to interrogate the file itself
93 # in order to deduce its format.
95 # Globbing pattern used when browsing for a Raster image file.
96 FileFilter "*.{gif,png,jpg,bmp,pbm,ppm,tga,tif,xpm,xbm}"
97 # Set to "true" if the file represented by the template
98 # must be generated by LyX.
99 AutomaticProduction true
100 # LyX has hard-coded support for these transformations
105 # LyX preview options:
106 # Off: LyX will not attempt to show this material on screen.
107 # Graphics: LyX will attempt to show this material as-is or via a
108 # conversion to a showable format.
109 # InstantPreview: LyX will attempt to use the 'instant preview'
110 # mechanism in order to show this material.
113 TransformOption Rotate RotationLatexOption
114 TransformOption Resize ResizeLatexOption
115 TransformOption Clip ClipLatexOption
116 TransformOption Extra ExtraOption
117 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
118 # This string is what is output to the LaTeX file.
119 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
121 UpdateResult "$$AbsPath$$Basename.eps"
122 Requirement "graphicx"
123 ReferencedFile latex "$$AbsPath$$Basename.eps"
124 ReferencedFile dvi "$$AbsPath$$Basename.eps"
127 TransformOption Rotate RotationLatexOption
128 TransformOption Resize ResizeLatexOption
129 TransformOption Clip ClipLatexOption
130 TransformOption Extra ExtraOption
131 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
132 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
133 UpdateFormat "$$pngOrjpg"
134 UpdateResult "$$AbsPath$$Basename.$$pngOrjpg"
135 Requirement "graphicx"
136 ReferencedFile pdflatex "$$AbsPath$$Basename.$$pngOrjpg"
139 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
140 UpdateFormat asciiimage
141 UpdateResult "$$AbsPath$$Basename.asc"
144 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
146 UpdateResult "$$AbsPath$$Basename.eps"
147 ReferencedFile docbook "$$AbsPath$$Basename.eps"
148 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
152 Template VectorGraphics
153 GuiName "Vector graphics"
155 A vector graphics file.
156 Use this template to include vector graphics of any kind.
157 LyX will try to retain the vector properties of the image for
159 Note that specialized templates exist for Xfig figures and Dia diagrams.
160 The specialized templates allow to automatically use the document font in
161 the figures, which is not possible with this general template.
163 # ANY file type can be displayed as a VectorGraphics.
164 # Specifically, LyX will attempt to interrogate the file itself
165 # in order to deduce its format.
167 # Globbing pattern used when browsing for a vector graphics file.
168 # xfig, dia, fen and ly are exlcuded, since we have specialized templates
169 FileFilter "*.{agr,dot,emf,eps,odg,obj,sxd,svg,svgz,tgo,pdf,wmf}"
170 AutomaticProduction true
171 # LyX has hard-coded support for these transformations
178 TransformOption Rotate RotationLatexOption
179 TransformOption Resize ResizeLatexOption
180 TransformOption Clip ClipLatexOption
181 TransformOption Extra ExtraOption
182 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
183 # This string is what is output to the LaTeX file.
184 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
186 UpdateResult "$$AbsPath$$Basename.eps"
187 Requirement "graphicx"
188 ReferencedFile latex "$$AbsPath$$Basename.eps"
189 ReferencedFile dvi "$$AbsPath$$Basename.eps"
192 TransformOption Rotate RotationLatexOption
193 TransformOption Resize ResizeLatexOption
194 TransformOption Clip ClipLatexOption
195 TransformOption Extra ExtraOption
196 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
197 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
199 UpdateResult "$$AbsPath$$Basename.pdf"
200 Requirement "graphicx"
201 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
204 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
205 UpdateFormat asciiimage
206 UpdateResult "$$AbsPath$$Basename.asc"
209 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
211 UpdateResult "$$AbsPath$$Basename.eps"
212 ReferencedFile docbook "$$AbsPath$$Basename.eps"
213 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
218 GuiName "Xfig figure"
224 AutomaticProduction true
227 Preview InstantPreview
229 TransformCommand Rotate RotationLatexCommand
230 TransformCommand Resize ResizeLatexCommand
231 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pstex_t}$$ResizeBack$$RotateBack"
233 UpdateResult "$$AbsPath$$Basename.pstex_t"
235 Requirement "graphicx"
236 # Preamble WarnNotFound
237 # Preamble InputOrWarn
238 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
239 ReferencedFile latex "$$AbsPath$$Basename.eps"
240 ReferencedFile dvi "$$AbsPath$$Basename.eps"
243 TransformCommand Rotate RotationLatexCommand
244 TransformCommand Resize ResizeLatexCommand
245 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdftex_t}$$ResizeBack$$RotateBack"
247 UpdateResult "$$AbsPath$$Basename.pdftex_t"
249 Requirement "graphicx"
250 # Preamble WarnNotFound
251 # Preamble InputOrWarn
252 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
253 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
256 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
257 UpdateFormat asciixfig
258 UpdateResult "$$AbsPath$$Basename.asc"
261 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
263 UpdateResult "$$AbsPath$$Basename.eps"
264 ReferencedFile docbook "$$AbsPath$$Basename.eps"
265 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
270 Template ChessDiagram
271 GuiName "Chess diagram"
273 A chess position diagram.
274 This template will use XBoard to edit the position.
275 Use the 'File->Save Position' in XBoard to save
276 the position that you want to display.
277 Make sure to give it a '.fen' extension
278 and remember to type in a relative path
279 to the LyX document location.
280 Within XBoard, use 'Edit->Edit Position'
281 to enable general editing of the board.
282 You might also check out the
283 'Options->Test legality' option, and
284 remember to middle and right click to
285 insert new material in the board.
286 In order for this to work, you have to
287 put the bundled lyxskak.sty in a place
288 that TeX will find it, and you will need
289 to install the skak package from CTAN.
293 AutomaticProduction true
294 Preview InstantPreview
296 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
299 UpdateResult "$$AbsPath$$Basename$$Extension"
300 ReferencedFile latex "$$AbsPath$$Basename$$Extension"
303 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
306 UpdateResult "$$AbsPath$$Basename$$Extension"
307 ReferencedFile pdflatex "$$AbsPath$$Basename$$Extension"
310 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
311 UpdateFormat asciichess
312 UpdateResult "$$AbsPath$$Basename.asc"
315 Product "[Chess: $$AbsOrRelPathMaster$$Basename]"
321 GuiName "Lilypond typeset music"
323 Sheet music typeset by GNU LilyPond,
324 converted to .pdf or .eps for inclusion
325 Using .eps requires at least lilypond 2.6
326 Using .pdf requires at least lilypond 2.9
328 InputFormat "lilypond"
330 AutomaticProduction true
335 Preview InstantPreview
337 TransformOption Rotate RotationLatexOption
338 TransformOption Resize ResizeLatexOption
339 TransformOption Clip ClipLatexOption
340 TransformOption Extra ExtraOption
341 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
342 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
344 UpdateResult "$$AbsPath$$Basename.eps"
345 Requirement "graphicx"
346 ReferencedFile latex "$$AbsPath$$Basename.eps"
347 ReferencedFile dvi "$$AbsPath$$Basename.eps"
350 TransformOption Rotate RotationLatexOption
351 TransformOption Resize ResizeLatexOption
352 TransformOption Clip ClipLatexOption
353 TransformOption Extra ExtraOption
354 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
355 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
357 UpdateResult "$$AbsPath$$Basename.pdf"
358 Requirement "graphicx"
359 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
362 Product "[LilyPond: $$FName]"
365 Product "[LilyPond: $$FName]"
372 Includes PDF documents, using the 'pdfpages' package.
373 To include multiple pages, use the 'pages'-option,
374 which must be inserted to 'Options'.
376 * pages={x-y} (for a range of pages)
377 * pages={x,y,z} (for specific pages)
378 * pages=- (to include all pages)
379 * pages=last-1 (to include all pages in reverse order)
380 With the option 'noautoscale' the PDF pages are
381 inserted in their original size.
382 Read the documentation of the pdfpages package
383 for further options and details.
387 AutomaticProduction true
393 TransformOption Rotate RotationLatexOption
394 TransformOption Resize ResizeLatexOption
395 TransformOption Extra ExtraOption
396 Option Arg "[$$Extra,$$Rotate,$$Resize]"
397 Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
399 UpdateResult "$$AbsPath$$Basename.pdf"
400 Requirement "pdfpages"
401 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
404 Product "[PDFPages: $$FName]"
407 Product "[PDFPages: $$FName]"
416 Read 'info date' for more information.
420 AutomaticProduction true
423 Product "$$Contents(\"$$Tempname\")"
425 UpdateResult "$$Tempname"
428 Product "$$Contents(\"$$Tempname\")"
430 UpdateResult "$$Tempname"
433 Product "$$Contents(\"$$Tempname\")"
435 UpdateResult "$$Tempname"
438 Product "$$Contents(\"$$Tempname\")"
440 UpdateResult "$$Tempname"
445 GuiName "Dia diagram"
451 AutomaticProduction true
452 # LyX has hard-coded support for these transformations
457 Preview InstantPreview
459 TransformOption Rotate RotationLatexOption
460 TransformOption Resize ResizeLatexOption
461 TransformOption Clip ClipLatexOption
462 TransformOption Extra ExtraOption
463 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
464 # This string is what is output to the LaTeX file.
465 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
467 UpdateResult "$$AbsPath$$Basename.eps"
468 Requirement "graphicx"
469 ReferencedFile latex "$$AbsPath$$Basename.eps"
470 ReferencedFile dvi "$$AbsPath$$Basename.eps"
473 TransformOption Rotate RotationLatexOption
474 TransformOption Resize ResizeLatexOption
475 TransformOption Clip ClipLatexOption
476 TransformOption Extra ExtraOption
477 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
478 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
480 UpdateResult "$$AbsPath$$Basename.pdf"
481 Requirement "graphicx"
482 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
485 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
486 UpdateFormat asciiimage
487 UpdateResult "$$AbsPath$$Basename.asc"
490 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
492 UpdateResult "$$AbsPath$$Basename.eps"
493 ReferencedFile docbook "$$AbsPath$$Basename.eps"
494 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"