1TEXMFSTART(1) ConTeXt TEXMFSTART(1)
2
3
4
6 texmfstart - run ConTeXt scripts, make ConTeXt wrapper scripts, view
7 documents
8
9
11 texmfstart [ options ... ] [ filename ] [ arguments ... ]
12
13
15 ConTeXt is a typesetting system based on the tex(1) family of programs.
16 texmfstart is a ConTeXt meta-script that can run subordinate scripts
17 (subscripts?) such as texexec(1), ctxtools(1), or pdftools(1). It can
18 also generate short wrapper scripts to simplify common uses. These
19 scripts are often called stubs in the ConTeXt documentation. The
20 options control texmfstart's behaviour, and the arguments are passed to
21 the program identified by filename.
22
23 If the filename is a document, then texmfstart will start a viewer for
24 that document. For example:
25 texmfstart showcase.pdf
26 will start an appropriate viewer for showcase.pdf. See the EXAMPLES
27 section.
28
29
31 General:
32 --help, --version
33 print version information, usage, and examples.
34
35 --verbose
36 print status and progress information, for example what commands
37 are being executed.
38
39 --clear
40 don't pass info about locations to child processes.
41
42
43 Running a program:
44 --arguments=str
45 an alternative for providing the arguments to be passed. For
46 example,
47 texmfstart --arguments=b.tex texexec
48 will pass b.tex as the argument to texexec.
49
50 --report
51 dry run: report what command would be run, but do not run it
52
53 --locate
54 dry run: like --report but doesn't print the trailing newline.
55
56 --browser
57 view the document in a web browser (for Windows).
58
59 --file=filename
60 an alternative way to specify the file (the program to run or
61 document to open).
62
63 --direct
64 run a program without searching for its location (assumes that
65 the program is on the PATH).
66
67 --execute
68 use the ruby(1) exec function instead of its system function.
69
70 --program=str
71 the program space where kpsewhich(1) will search (default: con‐
72 text). This information is given to kpsewhich as its -progname
73 option. Usually you don't need this option.
74
75
76 Creating startup scripts:
77 --make create a wrapper script or batch file to run the given file.
78 The wrapper scripts are put in the current path, which usually
79 means the current directory. If all is given as the file, e.g.
80 texmfstart --make all
81 then make all the ConTeXt wrapper scripts (the stubs).
82
83 --windows
84 when making a wrapper script (stub), create a Windows batch
85 (.bat) file. Usually you do not need to specify this option, as
86 texmfstart will figure out what operating system you are using.
87
88 --linux
89 when making a wrapper script, create a Unix shell script. Usu‐
90 ally you do not need to specify this option, as texmfstart will
91 figure out what operating system you are using.
92
93 --stubpath=path
94 specify where to put the wrapper scripts (stubs).
95
96 --indirect
97 always use texmfstart in the wrapper script (stub).
98
99
100 Document viewing:
101 --page=number
102 open the document at this page.
103
104
105 Environments and paths:
106 --path=str
107 change to the specified path.
108
109 --tree=str
110 use the given TEXMF tree.
111
112 --autotree
113 automatically determine the TEXMF tree to use (the default).
114
115 --environment=str
116 use the given environment file. Its syntax is given in the
117 mtexmfstart.pdf manual.
118
119 --showenv
120 print the environment variables known at runtime
121
122
123 Conditional execution:
124 --iftouched=file1,file2
125 run only when the given files have different timestamps.
126
127 --ifchanged=str
128 run only when the given file has changed (based on its last-com‐
129 puted MD5 checksum).
130
131
132 Special features:
133 --edit open the given file in an editor.
134
135
137 Optional prefixes determine the method used to search for the specified
138 file:
139 bin:filename
140 expanded name based on the PATH environment variable
141
142 kpse:filename
143 expanded name based on kpsewhich(1) result
144
145 rel:filename
146 expanded name relative to the current directory
147
148 env:name
149 expanded pathname based on environment variable name
150
151 path:filename
152 path part of filename as located by kpsewhich(1)
153
154
156 texmfstart texexec.rb file.tex
157 Locate the texexec.rb script and run it with file.tex as its
158 argument. In other words, make file.pdf from file.tex. If tex‐
159 exec(1) is properly installed on your system, this common invo‐
160 cation can be shortened to
161 texexec file.tex
162
163 texmfstart texexec file.tex
164 Locate the texexec(1) program (currently a ruby(1) script, tex‐
165 exec.rb) and run it with file.tex as its argument, producing
166 file.pdf. This invocation can be shortened to
167 texexec file.tex
168
169 texmfstart ctxtools --updatecontext
170 Run the ctxtools(1) script, updating the ConTeXt installation.
171 This invocation is equivalent to
172 ctxtools --updatecontext
173
174 texmfstart pstopdf --method=3 cow.eps
175 Convert cow.eps to PDF using method 3 of pstopdf(1). This invo‐
176 cation is equivalent to
177 pstopdf --method=3 cow.eps
178
179 texmfstart --make --stubpath=/usr/local/bin texexec
180 Make a wrapper script (stub), either a shell script
181 /usr/local/bin/texexec on Unix, or a batch file
182 \usr\local\bin\texexec.bat on Windows. On Unix (and maybe on
183 Windows?), you need to make the script executable; see chmod(1).
184
185 texmfstart --edit kpse:cont-sys.tex
186 Locate and edit the cont-sys.tex configuration file.
187
188 texmfstart --ifchanged=whatever.mp texexec --mpgraphic whatever.mp
189 Rerun texexec if whatever.mp has changed since the last use of
190 --ifchanged.
191
192 texmfstart --ifchanged=whatever.mp bin:echo rerun MetaPost
193 If the whatever.mp source file has changed since the last use of
194 --ifchanged, then use the echo(1) command to tell the user to
195 rerun MetaPost (see mpost(1)). This example shows that texmfs‐
196 tart can be used to run any script, not just ConTeXt scripts.
197 The bin: prefix tells texmfstart not to search for echo in the
198 TEXMF tree(s), but to assume that it's an executable somewhere
199 on the PATH.
200
201 texmfstart --ifchanged=whatever.mp --direct echo rerun MetaPost
202 This invocation has the same effect as the preceding example,
203 but using --direct instead of the bin: prefix, again to tell
204 texmfstart not to search for the echo command.
205
206
208 file.md5
209 MD5 checksum file used for the --ifchanged option.
210
211
213 PATH For expanding filenames given with a bin prefix.
214
215 TEXMFSTART_EDITOR, EDITOR, editor
216 Editor to use with --edit. The environment variables are looked
217 up in that order, with the first setting found taking priority.
218
219
221 ctxtools(1), kpsewhich(1), makempy(1), mpost(1), pdftools(1),
222 pstopdf(1), texexec(1), texfont(1), texutil(1).
223
224 ConTeXt wiki ⟨http://www.contextgarden.net⟩.
225
226 The texmfstart manual, mtexmfstart.pdf, available from PRAGMA ADE
227 ⟨http://www.pragma-ade.com/dir/general/manuals/⟩.
228
229
231 On Unix, opening a PDF document first tries pdfopen then acroread, nei‐
232 ther of which may be present on your system.
233
234 The --report option doesn't work if you specify a filename prefix (i.e.
235 it does a real run instead of a dry run).
236
237
239 ConTeXt is written and maintained by Hans Hagen ⟨http://
240 www.pragma-ade.com⟩. This man page, which is in the public domain, was
241 written by Sanjoy Mahajan <sanjoy@mit.edu> based on the mtexmfstart.pdf
242 manual.
243
244
245
246texmfstart 2.0 December 2006 TEXMFSTART(1)