1 # Basic External Templates for LyX
4 %% This inputs the file if it exists, else prints a warning
7 \newcommand*{\xfiginput}[1]{%
8 \edef\tempfilename{#1}%
9 \InputIfFileExists{#1}{}{%
11 \ttfamily\expandafter\stripprefix\meaning\tempfilename!}
12 \typeout{xfiginput: Could not find \tempfilename!}
18 GuiName "[XFig: $$Basename]"
21 This template uses XFig for editing.
25 EditCommand "xfig $$FName"
26 AutomaticProduction true
28 Product "\\xfiginput{$$Basename.pstex_t}"
30 UpdateResult "$$Basename.pstex_t"
31 Requirement "graphicx"
35 Product "\\xfiginput{$$Basename.pdftex_t}"
37 UpdateResult "$$Basename.pdftex_t"
38 Requirement "graphicx"
42 Product "$$Contents(\"$$Basename.asc\")"
43 UpdateFormat asciixfig
44 UpdateResult "$$Basename.asc"
47 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
49 UpdateResult "$$Basename.eps"
52 Product "[XFig: $$FName]"
57 GuiName "[Chess: $$Basename]"
59 A chess position diagram.
60 This template will use XBoard to edit the position.
61 Use the 'File->Save Position' in XBoard to save
62 the position that you want to display.
63 Make sure to give it a '.fen' extension
64 and remember to type in a relative path
65 to the LyX document location.
66 Within XBoard, use 'Edit->Edit Position'
67 to enable general editing of the board.
68 You might also check out the
69 'Options->Test legality' option, and
70 remember to middle and right click to
71 insert new material in the board.
72 In order for this to work, you have to
73 put the bundled lyxskak.sty in a place
74 that TeX will find it, and you will need
75 to install the skak package from CTAN.
79 EditCommand "xboard -lpf $$FName -mode EditPosition"
80 AutomaticProduction true
82 Product "\\loadgame{$$FPath$$Basename}\\showboard"
86 Product "$$Contents(\"$$Basename.asc\")"
87 UpdateFormat asciichess
88 UpdateResult "$$Basename.asc"
91 Product "[Chess: $$Basename]"
94 Product "[Chess: $$FName]"
102 Read 'info date' for more information.
106 AutomaticProduction true
108 Product "$$Contents(\"$$Tempname\")"
110 UpdateResult "$$Tempname"
113 Product "$$Contents(\"$$Tempname\")"
115 UpdateResult "$$Tempname"
118 Product "$$Contents(\"$$Tempname\")"
120 UpdateResult "$$Tempname"
123 Product "$$Contents(\"$$Tempname\")"
125 UpdateResult "$$Tempname"