]> git.lyx.org Git - lyx.git/blob - lib/external_templates
Patch from Dekel for fig2pstex
[lyx.git] / lib / external_templates
1 # Basic External Templates for LyX
2
3 Template RasterImage
4         GuiName "[Bitmap: $$FName]"
5         HelpText
6                 A bitmap file.
7                 In the parameters box, you can provide optional
8                 parameters for the ImageMagick convert program.
9                 E.g., use `-border 10x10 -bordercolor black'
10                 to surround the picture with a black border 
11                 when you export to LaTeX.
12                 When you export to Ascii, you can provide a
13                 number describing how many columns the picture
14                 should expand to.
15                 This template uses Gimp for editing, and 
16                 ImageMagick to do conversions. It requires 
17                 Python for exporting to Ascii and DocBook, 
18                 and gifscii for exporting to Ascii.
19         HelpTextEnd
20         FileFilter "*.(gif|png|jpg|bmp|pbm|ppm|tga|tif|xpm|xbm)"
21         ViewCommand "display $$Basename.eps"
22         EditCommand "gimp $$FName"
23         AutomaticProduction true
24         Format LaTeX
25                 Product "\\includegraphics{$$Basename.eps}"
26                 UpdateCommand "convert $$Parameters $$FName $$Basename.eps"
27                 Requirement "graphics"
28         FormatEnd
29         Format Ascii
30                 Product "$$Contents(\"$$Basename.asc\")"
31                 UpdateCommand "python $$Sysdir/scripts/pic2ascii.py $$FName $$Parameters"
32         FormatEnd
33         Format DocBook
34                 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
35                 UpdateCommand "python $$Sysdir/scripts/pic2png_eps.py $$FName $$Parameters"
36         FormatEnd
37         Format LinuxDoc
38                 Product "[Bitmap: $$FName]"
39         FormatEnd
40 TemplateEnd
41
42 Template XFig
43         GuiName "[XFig: $$Basename]"
44         HelpText
45                 An XFig figure.
46                 In the parameters box, you can provide
47                 optional parameters for fig2dev in the
48                 case of LaTeX export.
49                 For Ascii export, you can provide a
50                 number that specifies the width of an
51                 Ascii approximation of the figure.
52                 For DocBook export, you can provide
53                 optional parameters for the ImageMagick
54                 convert script.
55                 This template uses XFig for editing, and 
56                 fig2dev and ImageMagick to do conversions. 
57                 It requires Python for exporting to Ascii
58                 and DocBook, and gifscii for exporting to 
59                 Ascii.
60         HelpTextEnd
61         FileFilter "*.fig"
62         ViewCommand "xfig $$FName"
63         EditCommand "xfig $$FName"
64         AutomaticProduction true
65         Format LaTeX
66                 Product "\\begin{picture}(0,0)\\includegraphics{$$Basename.eps}\\end{picture}\\input{$$Basename.pstex_t}"
67                 UpdateCommand "python $$Sysdir/scripts/fig2pstex.py $$FName $$Parameters"
68                 Requirement "graphics"  
69         FormatEnd
70         Format Ascii
71                 Product "$$Contents(\"$$Basename.asc\")"
72                 UpdateCommand "python $$Sysdir/scripts/pic2ascii.py $$FName $$Parameters"
73         FormatEnd
74         Format DocBook
75                 Product "<graphic fileref=\"$$Basename.eps\"></graphic>"
76                 UpdateCommand "python $$Sysdir/scripts/pic2png_eps.py $$FName $$Parameters"
77         FormatEnd
78         Format LinuxDoc
79                 Product "[XFig: $$FName]"
80         FormatEnd
81 TemplateEnd
82
83 Template ChessDiagram
84         GuiName "[Chess: $$Basename]"
85         HelpText
86                 A chess position diagram.
87                 This template will use XBoard to view
88                 and edit the position. Use the
89                 'File->Save Position' in XBoard to save 
90                 the position that you want to display.
91                 Make sure to give it a '.fen' extension
92                 and remember to type in a relative path
93                 to the LyX document location.
94                 Within XBoard, use 'Edit->Edit Position'
95                 to enable general editing of the board.
96                 You might also check out the
97                 'Options->Test legality' option, and
98                 remember to middle and right click to 
99                 insert new material in the board.
100                 In order for this to work, you have to
101                 install the lyxchess.sty which is bundled
102                 with LyX, and the chess.sty from CTAN.
103         HelpTextEnd
104         FileFilter "*.fen"
105         ViewCommand "xboard -lpf $$FName"
106         EditCommand "xboard -lpf $$FName"
107         AutomaticProduction true
108         Format LaTeX
109                 Product "$$Contents(\"$$Basename.tex\")"
110                 UpdateCommand "python $$Sysdir/scripts/fen2latex.py $$FName $$Basename.tex"
111                 Requirement "chess"
112         FormatEnd
113         Format Ascii
114                 Product "$$Contents(\"$$Basename.asc\")"
115                 UpdateCommand "python $$Sysdir/scripts/fen2ascii.py $$FName $$Basename.tex"
116         FormatEnd
117         Format DocBook
118                 Product "[Chess: $$Basename]"
119         FormatEnd
120         Format LinuxDoc
121                 Product "[Chess: $$FName]"
122         FormatEnd
123 TemplateEnd
124
125 Template Date
126         GuiName "[Date]"
127         HelpText
128                 Todays date.
129                 In the parameters box, you can provide
130                 optional parameters for the date
131                 command.
132                 Use empty to get "Mon Jun 12 05:20:41 CEST 2000"
133                 Use -u to get "Mon Jun 12 03:20:41 UTC 2000"
134                 Use -I to get "2000-06-12".
135                 Use -R to get "Mon, 12 Jun 2000 05:20:41 +0200"
136                 Use +%d-%m-%Y to get "20-06-2000"
137                 Use +%T to get the time as "23:23:00"
138                 Read 'info date' for more information.
139         HelpTextEnd
140         FileFilter "*"
141         ViewCommand "xterm -e less $$Tempname"
142         AutomaticProduction true
143         Format LaTeX
144                 Product "$$Contents(\"$$Tempname\")"
145                 UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname date $$Parameters"
146         FormatEnd
147         Format Ascii
148                 Product "$$Contents(\"$$Tempname\")"
149                 UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname date $$Parameters"
150         FormatEnd
151         Format DocBook
152                 Product "$$Contents(\"$$Tempname\")"
153                 UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname date $$Parameters"
154         FormatEnd
155         Format LinuxDoc
156                 Product "$$Contents(\"$$Tempname\")"
157                 UpdateCommand "python $$Sysdir/scripts/general_command_wrapper.py - $$Tempname date $$Parameters"
158         FormatEnd
159 TemplateEnd
160