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 multi-page 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 "[RasterImage: $$FName]"
142 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
144 UpdateResult "$$AbsPath$$Basename.eps"
145 ReferencedFile docbook "$$AbsPath$$Basename.eps"
146 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
150 Template VectorGraphics
151 GuiName "Vector graphics"
153 A vector graphics file.
154 Use this template to include vector graphics of any kind.
155 LyX will try to retain the vector properties of the image for
157 Note that specialized templates exist for Xfig figures and Dia diagrams.
158 The specialized templates allow to automatically use the document font in
159 the figures, which is not possible with this general template.
161 # ANY file type can be displayed as a VectorGraphics.
162 # Specifically, LyX will attempt to interrogate the file itself
163 # in order to deduce its format.
165 # Globbing pattern used when browsing for a vector graphics file.
166 # xfig, dia, fen and ly are exlcuded, since we have specialized templates
167 FileFilter "*.{agr,dot,emf,eps,odg,obj,sxd,svg,svgz,tgo,pdf,wmf}"
168 AutomaticProduction true
169 # LyX has hard-coded support for these transformations
176 TransformOption Rotate RotationLatexOption
177 TransformOption Resize ResizeLatexOption
178 TransformOption Clip ClipLatexOption
179 TransformOption Extra ExtraOption
180 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
181 # This string is what is output to the LaTeX file.
182 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
184 UpdateResult "$$AbsPath$$Basename.eps"
185 Requirement "graphicx"
186 ReferencedFile latex "$$AbsPath$$Basename.eps"
187 ReferencedFile dvi "$$AbsPath$$Basename.eps"
190 TransformOption Rotate RotationLatexOption
191 TransformOption Resize ResizeLatexOption
192 TransformOption Clip ClipLatexOption
193 TransformOption Extra ExtraOption
194 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
195 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
197 UpdateResult "$$AbsPath$$Basename.pdf"
198 Requirement "graphicx"
199 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
202 Product "[VectorGraphics: $$FName]"
205 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
207 UpdateResult "$$AbsPath$$Basename.eps"
208 ReferencedFile docbook "$$AbsPath$$Basename.eps"
209 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
214 GuiName "Xfig figure"
220 AutomaticProduction true
223 Preview InstantPreview
225 TransformCommand Rotate RotationLatexCommand
226 TransformCommand Resize ResizeLatexCommand
227 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pstex_t}$$ResizeBack$$RotateBack"
229 UpdateResult "$$AbsPath$$Basename.pstex_t"
231 Requirement "graphicx"
232 # Preamble WarnNotFound
233 # Preamble InputOrWarn
234 ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.pstex_t"
235 ReferencedFile latex "$$AbsPath$$Basename.eps"
236 ReferencedFile dvi "$$AbsPath$$Basename.eps"
239 TransformCommand Rotate RotationLatexCommand
240 TransformCommand Resize ResizeLatexCommand
241 Product "$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdftex_t}$$ResizeBack$$RotateBack"
243 UpdateResult "$$AbsPath$$Basename.pdftex_t"
245 Requirement "graphicx"
246 # Preamble WarnNotFound
247 # Preamble InputOrWarn
248 ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdftex_t"
249 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
252 Product "[XFig: $$FName]"
255 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
257 UpdateResult "$$AbsPath$$Basename.eps"
258 ReferencedFile docbook "$$AbsPath$$Basename.eps"
259 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
264 Template ChessDiagram
265 GuiName "Chess diagram"
267 A chess position diagram.
268 This template will use XBoard to edit the position.
269 Use the 'File->Save Position' in XBoard to save
270 the position that you want to display.
271 Make sure to give it a '.fen' extension
272 and remember to type in a relative path
273 to the LyX document location.
274 Within XBoard, use 'Edit->Edit Position'
275 to enable general editing of the board.
276 You might also check out the
277 'Options->Test legality' option, and
278 remember to middle and right click to
279 insert new material in the board.
280 In order for this to work, you have to
281 put the bundled lyxskak.sty in a place
282 that TeX will find it, and you will need
283 to install the skak package from CTAN.
287 AutomaticProduction true
288 Preview InstantPreview
290 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
293 UpdateResult "$$AbsPath$$Basename$$Extension"
294 ReferencedFile latex "$$AbsPath$$Basename$$Extension"
297 Product "\\loadgame{$$AbsOrRelPathMaster$$Basename}\\showboard"
300 UpdateResult "$$AbsPath$$Basename$$Extension"
301 ReferencedFile pdflatex "$$AbsPath$$Basename$$Extension"
304 Product "$$Contents(\"$$AbsPath$$Basename.asc\")"
305 UpdateFormat asciichess
306 UpdateResult "$$AbsPath$$Basename.asc"
309 Product "[Chess: $$AbsOrRelPathMaster$$Basename]"
315 GuiName "Lilypond typeset music"
317 Sheet music typeset by GNU LilyPond,
318 converted to .pdf or .eps for inclusion
319 Using .eps requires at least lilypond 2.6
320 Using .pdf requires at least lilypond 2.9
322 InputFormat "lilypond"
324 AutomaticProduction true
329 Preview InstantPreview
331 TransformOption Rotate RotationLatexOption
332 TransformOption Resize ResizeLatexOption
333 TransformOption Clip ClipLatexOption
334 TransformOption Extra ExtraOption
335 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
336 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
338 UpdateResult "$$AbsPath$$Basename.eps"
339 Requirement "graphicx"
340 ReferencedFile latex "$$AbsPath$$Basename.eps"
341 ReferencedFile dvi "$$AbsPath$$Basename.eps"
344 TransformOption Rotate RotationLatexOption
345 TransformOption Resize ResizeLatexOption
346 TransformOption Clip ClipLatexOption
347 TransformOption Extra ExtraOption
348 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
349 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
351 UpdateResult "$$AbsPath$$Basename.pdf"
352 Requirement "graphicx"
353 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
356 Product "[LilyPond: $$FName]"
359 Product "[LilyPond: $$FName]"
366 Includes PDF documents, using the 'pdfpages' package.
367 To include multiple pages, use the 'pages'-option,
368 which must be inserted to 'Options'.
370 * pages={x-y} (for a range of pages)
371 * pages={x,y,z} (for specific pages)
372 * pages=- (to include all pages)
373 * pages=last-1 (to include all pages in reverse order)
374 With the option 'noautoscale' the PDF pages are
375 inserted in their original size.
376 Read the documentation of the pdfpages package
377 for further options and details.
381 AutomaticProduction true
387 TransformOption Rotate RotationLatexOption
388 TransformOption Resize ResizeLatexOption
389 TransformOption Extra ExtraOption
390 Option Arg "[$$Extra,$$Rotate,$$Resize]"
391 Product "\\includepdf$$Arg{$$AbsOrRelPathMaster$$Basename}"
393 UpdateResult "$$AbsPath$$Basename.pdf"
394 Requirement "pdfpages"
395 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
398 Product "[PDFPages: $$FName]"
401 Product "[PDFPages: $$FName]"
407 GuiName "Dia diagram"
413 AutomaticProduction true
414 # LyX has hard-coded support for these transformations
419 Preview InstantPreview
421 TransformOption Rotate RotationLatexOption
422 TransformOption Resize ResizeLatexOption
423 TransformOption Clip ClipLatexOption
424 TransformOption Extra ExtraOption
425 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
426 # This string is what is output to the LaTeX file.
427 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
429 UpdateResult "$$AbsPath$$Basename.eps"
430 Requirement "graphicx"
431 ReferencedFile latex "$$AbsPath$$Basename.eps"
432 ReferencedFile dvi "$$AbsPath$$Basename.eps"
435 TransformOption Rotate RotationLatexOption
436 TransformOption Resize ResizeLatexOption
437 TransformOption Clip ClipLatexOption
438 TransformOption Extra ExtraOption
439 Option Arg "[$$Extra,$$Rotate,$$Resize,$$Clip]"
440 Product "\\includegraphics$$Arg{$$AbsOrRelPathMaster$$Basename}"
442 UpdateResult "$$AbsPath$$Basename.pdf"
443 Requirement "graphicx"
444 ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
447 Product "[Dia: $$FName]"
450 Product "<graphic fileref=\"$$AbsOrRelPathMaster$$Basename.eps\"></graphic>"
452 UpdateResult "$$AbsPath$$Basename.eps"
453 ReferencedFile docbook "$$AbsPath$$Basename.eps"
454 ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"