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
16 GuiName "[XFig: $$Basename]"
19 This template uses XFig for editing.
23 EditCommand "xfig $$FName"
24 AutomaticProduction true
26 Product "\\xfiginput{$$Basename.pstex_t}"
28 UpdateResult "$$Basename.pstex_t"
29 Requirement "graphicx"
33 Product "\\xfiginput{$$Basename.pdftex_t}"
35 UpdateResult "$$Basename.pdftex_t"
36 Requirement "graphicx"
40 Product "$$Contents(\"$$Basename.asc\")"
41 UpdateFormat asciixfig
42 UpdateResult "$$Basename.asc"
45 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
47 UpdateResult "$$Basename.eps"
50 Product "[XFig: $$FName]"
55 GuiName "[Chess: $$Basename]"
57 A chess position diagram.
58 This template will use XBoard to edit the position.
59 Use the 'File->Save Position' in XBoard to save
60 the position that you want to display.
61 Make sure to give it a '.fen' extension
62 and remember to type in a relative path
63 to the LyX document location.
64 Within XBoard, use 'Edit->Edit Position'
65 to enable general editing of the board.
66 You might also check out the
67 'Options->Test legality' option, and
68 remember to middle and right click to
69 insert new material in the board.
70 In order for this to work, you have to
71 put the bundled lyxskak.sty in a place
72 that TeX will find it, and you will need
73 to install the skak package from CTAN.
77 EditCommand "xboard -lpf $$FName -mode EditPosition"
78 AutomaticProduction true
80 Product "\\loadgame{$$FPath$$Basename}\\showboard"
84 Product "$$Contents(\"$$Basename.asc\")"
85 UpdateFormat asciichess
86 UpdateResult "$$Basename.asc"
89 Product "[Chess: $$Basename]"
92 Product "[Chess: $$FName]"
100 Read 'info date' for more information.
104 AutomaticProduction true
106 Product "$$Contents(\"$$Tempname\")"
108 UpdateResult "$$Tempname"
111 Product "$$Contents(\"$$Tempname\")"
113 UpdateResult "$$Tempname"
116 Product "$$Contents(\"$$Tempname\")"
118 UpdateResult "$$Tempname"
121 Product "$$Contents(\"$$Tempname\")"
123 UpdateResult "$$Tempname"