1 # Basic External Templates for LyX
4 GuiName "[XFig: $$Basename]"
7 This template uses XFig for editing.
11 EditCommand "xfig $$FName"
12 AutomaticProduction true
14 Product "\\xfiginput{$$Basename.pstex_t}"
16 UpdateResult "$$Basename.pstex_t"
17 Requirement "graphicx"
19 %% This inputs the file if it exists, else prints a warning
20 %% encased in an fbox.
22 \newcommand*{\xfiginput}[1]{%
23 \edef\tempfilename{#1}%
24 \InputIfFileExists{#1}{}{%
26 \ttfamily\expandafter\stripprefix\meaning\tempfilename
31 Product "\\xfiginput{$$Basename.pdftex_t}"
33 UpdateResult "$$Basename.pdftex_t"
34 Requirement "graphicx"
36 %% This inputs the file if it exists, else prints a warning
37 %% encased in an fbox.
39 \newcommand*{\xfiginput}[1]{%
40 \edef\tempfilename{#1}%
41 \InputIfFileExists{#1}{}{%
43 \ttfamily\expandafter\stripprefix\meaning\tempfilename
48 Product "$$Contents(\"$$Basename.asc\")"
49 UpdateFormat asciixfig
50 UpdateResult "$$Basename.asc"
53 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
55 UpdateResult "$$Basename.eps"
58 Product "[XFig: $$FName]"
63 GuiName "[Chess: $$Basename]"
65 A chess position diagram.
66 This template will use XBoard to edit the position.
67 Use the 'File->Save Position' in XBoard to save
68 the position that you want to display.
69 Make sure to give it a '.fen' extension
70 and remember to type in a relative path
71 to the LyX document location.
72 Within XBoard, use 'Edit->Edit Position'
73 to enable general editing of the board.
74 You might also check out the
75 'Options->Test legality' option, and
76 remember to middle and right click to
77 insert new material in the board.
78 In order for this to work, you have to
79 put the bundled lyxskak.sty in a place
80 that TeX will find it, and you will need
81 to install the skak package from CTAN.
85 EditCommand "xboard -lpf $$FName -mode EditPosition"
86 AutomaticProduction true
88 Product "\\loadgame{$$FPath$$Basename}\\showboard"
92 Product "$$Contents(\"$$Basename.asc\")"
93 UpdateFormat asciichess
94 UpdateResult "$$Basename.asc"
97 Product "[Chess: $$Basename]"
100 Product "[Chess: $$FName]"
108 Read 'info date' for more information.
112 AutomaticProduction true
114 Product "$$Contents(\"$$Tempname\")"
116 UpdateResult "$$Tempname"
119 Product "$$Contents(\"$$Tempname\")"
121 UpdateResult "$$Tempname"
124 Product "$$Contents(\"$$Tempname\")"
126 UpdateResult "$$Tempname"
129 Product "$$Contents(\"$$Tempname\")"
131 UpdateResult "$$Tempname"