]> git.lyx.org Git - lyx.git/blob - lib/external_templates
Removed all redundant using directives from the source.
[lyx.git] / lib / external_templates
1 # Basic External Templates for LyX
2
3 PreambleDef XFigInput
4         %% This inputs the file if it exists, else prints a warning
5         %% encased in an fbox.
6         \def\stripprefix#1>{}
7         \newcommand*{\xfiginput}[1]{%
8             \edef\tempfilename{#1}%
9             \InputIfFileExists{#1}{}{%
10                 \fbox{Could not find
11                     \ttfamily\expandafter\stripprefix\meaning\tempfilename!}
12                 \typeout{xfiginput: Could not find \tempfilename!}
13             }
14         }
15 PreambleDefEnd
16
17 Template XFig
18         GuiName "[XFig: $$Basename]"
19         HelpText
20                 An XFig figure.
21                 This template uses XFig for editing.
22         HelpTextEnd
23         InputFormat fig
24         FileFilter "*.fig"
25         EditCommand "xfig $$FName"
26         AutomaticProduction true
27         Format LaTeX
28                 Product "\\xfiginput{$$Basename.pstex_t}"
29                 UpdateFormat pstex
30                 UpdateResult "$$Basename.pstex_t"
31                 Requirement "graphicx"
32                 Preamble XFigInput
33         FormatEnd
34         Format PDFLaTeX
35                 Product "\\xfiginput{$$Basename.pdftex_t}"
36                 UpdateFormat pdftex
37                 UpdateResult "$$Basename.pdftex_t"
38                 Requirement "graphicx"  
39                 Preamble XFigInput
40         FormatEnd
41         Format Ascii
42                 Product "$$Contents(\"$$Basename.asc\")"
43                 UpdateFormat asciixfig
44                 UpdateResult "$$Basename.asc"
45         FormatEnd
46         Format DocBook
47                 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
48                 UpdateFormat eps
49                 UpdateResult "$$Basename.eps"
50         FormatEnd
51         Format LinuxDoc
52                 Product "[XFig: $$FName]"
53         FormatEnd
54 TemplateEnd
55
56 Template ChessDiagram
57         GuiName "[Chess: $$Basename]"
58         HelpText
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.
76         HelpTextEnd
77         InputFormat fen
78         FileFilter "*.fen"
79         EditCommand "xboard -lpf $$FName -mode EditPosition"
80         AutomaticProduction true
81         Format LaTeX
82                 Product "\\loadgame{$$FPath$$Basename}\\showboard"
83                 Requirement "chess"
84         FormatEnd
85         Format Ascii
86                 Product "$$Contents(\"$$Basename.asc\")"
87                 UpdateFormat asciichess
88                 UpdateResult "$$Basename.asc"
89         FormatEnd
90         Format DocBook
91                 Product "[Chess: $$Basename]"
92         FormatEnd
93         Format LinuxDoc
94                 Product "[Chess: $$FName]"
95         FormatEnd
96 TemplateEnd
97
98 Template Date
99         GuiName "[Date]"
100         HelpText
101                 Todays date.
102                 Read 'info date' for more information.
103         HelpTextEnd
104         InputFormat date
105         FileFilter "*"
106         AutomaticProduction true
107         Format LaTeX
108                 Product "$$Contents(\"$$Tempname\")"
109                 UpdateFormat dateout
110                 UpdateResult "$$Tempname"
111         FormatEnd
112         Format Ascii
113                 Product "$$Contents(\"$$Tempname\")"
114                 UpdateFormat dateout
115                 UpdateResult "$$Tempname"
116         FormatEnd
117         Format DocBook
118                 Product "$$Contents(\"$$Tempname\")"
119                 UpdateFormat dateout
120                 UpdateResult "$$Tempname"
121         FormatEnd
122         Format LinuxDoc
123                 Product "$$Contents(\"$$Tempname\")"
124                 UpdateFormat dateout
125                 UpdateResult "$$Tempname"
126         FormatEnd
127 TemplateEnd
128