1PDFTEX(1) General Commands Manual PDFTEX(1)
2
3
4
6 pdftex - PDF output from TeX
7
9 pdftex [options] [&format] [file|\commands]
10
12 Run the pdfTeX typesetter on file, usually creating file.pdf. If the
13 file argument has no extension, ".tex" will be appended to it. Instead
14 of a filename, a set of pdfTeX commands can be given, the first of
15 which must start with a backslash. With a &format argument pdfTeX uses
16 a different set of precompiled commands, contained in format.fmt; it is
17 usually better to use the -fmt format option instead.
18
19 pdfTeX is a version of TeX, with the e-TeX extensions, that can create
20 PDF files as well as DVI files.
21
22 In DVI mode, pdfTeX can be used as a complete replacement for the TeX
23 engine.
24
25 The typical use of pdfTeX is with a pregenerated formats for which PDF
26 output has been enabled. The pdftex command uses the equivalent of the
27 plain TeX format, and the pdflatex command uses the equivalent of the
28 LaTeX format. To generate formats, use the -ini switch.
29
30 The pdfinitex and pdfvirtex commands are pdfTeX's analogues to the ini‐
31 tex and virtex commands. In this installation, if the links exist,
32 they are symbolic links to the pdftex executable.
33
34 In PDF mode, pdfTeX can natively handle the PDF, JPG, JBIG2, and PNG
35 graphics formats. pdfTeX cannot include PostScript or Encapsulated
36 PostScript (EPS) graphics files; first convert them to PDF using
37 epstopdf(1). pdfTeX's handling of its command-line arguments is simi‐
38 lar to that of of the other TeX programs in the web2c implementation.
39
40 Starting with version 1.40, pdfTeX incorporates the e-TeX extensions,
41 and pdfeTeX is just a copy of pdfTeX. See etex(1).
42
44 This version of pdfTeX understands the following command line options.
45
46 -cnf-line string
47 Parse string as a texmf.cnf configuration line. See the Kpath‐
48 sea manual.
49
50 -draftmode
51 Sets \pdfdraftmode so pdfTeX doesn't write a PDF and doesn't
52 read any included images, thus speeding up execution.
53
54 -enc Enable the encTeX extensions. This option is only effective in
55 combination with -ini. For documentation of the encTeX exten‐
56 sions see http://www.olsak.net/enctex.html.
57
58 -etex Enable the e-TeX extensions. This option is only effective in
59 combination with -ini. See etex(1).
60
61 -file-line-error
62 Print error messages in the form file:line:error which is simi‐
63 lar to the way many compilers format them.
64
65 -no-file-line-error
66 Disable printing error messages in the file:line:error style.
67
68 -file-line-error-style
69 This is the old name of the -file-line-error option.
70
71 -fmt format
72 Use format as the name of the format to be used, instead of the
73 name by which pdfTeX was called or a %& line.
74
75 -halt-on-error
76 Exit with an error code when an error is encountered during pro‐
77 cessing.
78
79 -help Print help message and exit.
80
81 -ini Start in INI mode, which is used to dump formats. The INI mode
82 can be used for typesetting, but no format is preloaded, and
83 basic initializations like setting catcodes may be required.
84
85 -interaction mode
86 Sets the interaction mode. The mode can be either batchmode,
87 nonstopmode, scrollmode, and errorstopmode. The meaning of
88 these modes is the same as that of the corresponding \commands.
89
90 -ipc Send DVI or PDF output to a socket as well as the usual output
91 file. Whether this option is available is the choice of the in‐
92 staller.
93
94 -ipc-start
95 As -ipc, and starts the server at the other end as well.
96 Whether this option is available is the choice of the installer.
97
98 -jobname name
99 Use name for the job name, instead of deriving it from the name
100 of the input file.
101
102 -kpathsea-debug bitmask
103 Sets path searching debugging flags according to the bitmask.
104 See the Kpathsea manual for details.
105
106 -mktex fmt
107 Enable mktexfmt, where fmt must be either tex or tfm.
108
109 -mltex Enable MLTeX extensions. Only effective in combination with
110 -ini.
111
112 -no-mktex fmt
113 Disable mktexfmt, where fmt must be either tex or tfm.
114
115 -output-comment string
116 In DVI mode, use string for the DVI file comment instead of the
117 date. This option is ignored in PDF mode.
118
119 -output-directory directory
120 Write output files in directory instead of the current direc‐
121 tory. Look up input files in directory first, the along the
122 normal search path.
123
124 -output-format format
125 Set the output format mode, where format must be either pdf or
126 dvi. This also influences the set of graphics formats under‐
127 stood by pdfTeX.
128
129 -parse-first-line
130 If the first line of the main input file begins with %& parse it
131 to look for a dump name or a -translate-file option.
132
133 -no-parse-first-line
134 Disable parsing of the first line of the main input file.
135
136 -progname name
137 Pretend to be program name. This affects both the format used
138 and the search paths.
139
140 -recorder
141 Enable the filename recorder. This leaves a trace of the files
142 opened for input and output in a file with extension .fls.
143
144 -shell-escape
145 Enable the \write18{command} construct. The command can be any
146 shell command. This construct is normally disallowed for secu‐
147 rity reasons.
148
149 -no-shell-escape
150 Disable the \write18{command} construct, even if it is enabled
151 in the texmf.cnf file.
152
153 -shell-restricted
154 Enable restricted \write18{}, as explained in the ``Shell
155 escapes'' section of the Web2c Texinfo manual.
156
157 -src-specials
158 In DVI mode, insert source specials into the DVI file. This
159 option is ignored in PDF mode.
160
161 -src-specials where
162 In DVI mode, insert source specials in certain places of the DVI
163 file. The where argument is a comma-separated value list: cr,
164 display, hbox, math, par, parent, or vbox. This option is
165 ignored in PDF mode.
166
167 -synctex NUMBER
168 generate SyncTeX data for previewers according to bits of NUM‐
169 BER. See the synctex manual page for details.
170
171 -translate-file tcxname
172 Use the tcxname translation table to set the mapping of input
173 characters and re-mapping of output characters.
174
175 -default-translate-file tcxname
176 Like -translate-file except that a %& line can overrule this
177 setting.
178
179 -version
180 Print version information and exit.
181
182 -8bit make all characters printable by default.
183
185 See the Kpathsea library documentation (e.g., the `Path specifications'
186 node) for precise details of how the environment variables are used.
187 The kpsewhich utility can be used to query the values of the variables.
188
189 One caveat: In most pdfTeX formats, you cannot use ~ in a filename you
190 give directly to pdfTeX, because ~ is an active character in TeX, and
191 hence is expanded, not taken as part of the filename. Other programs,
192 such as Metafont, do not have this problem.
193
194 TEXMFOUTPUT
195 Normally, pdfTeX puts its output files in the current directory.
196 If any output file cannot be opened there, it tries to open it
197 in the directory specified in the environment variable TEXMFOUT‐
198 PUT. There is no default value for that variable. For example,
199 if you say pdftex paper and the current directory is not
200 writable and TEXMFOUTPUT has the value /tmp, pdfTeX attempts to
201 create /tmp/paper.log (and /tmp/paper.pdf, if any output is pro‐
202 duced.) TEXMFOUTPUT is also checked for input files, as TeX
203 often generates files that need to be subsequently read; for
204 input, no suffixes (such as ``.tex'') are added by default, the
205 input name is simply checked as given.
206
207 TEXINPUTS
208 Search path for \input and \openin files. This normally starts
209 with ``.'', so that user files are found before system files.
210 An empty path component will be replaced with the paths defined
211 in the texmf.cnf file. For example, set TEXINPUTS to
212 ".:/home/user/tex:" to prepend the current directory and
213 ``/home/user/tex'' to the standard search path.
214
215 TEXFORMATS
216 Search path for format files.
217
218 TEXEDIT
219 Command template for switching to editor. The default, usually
220 vi, is set when pdfTeX is compiled.
221
222 TFMFONTS
223 Search path for font metric (.tfm) files.
224
225 SOURCE_DATE_EPOCH
226 If set, its value, taken to be in epoch-seconds, will be used
227 for the timestamps in the PDF output, such as the CreationDate
228 and ModDate keys. This is useful for making reproducible
229 builds.
230
231 FORCE_SOURCE_DATE
232 If set to the value "1", the time-related TeX primitives (\year,
233 \month, \day, \time) are also initialized from the value of
234 SOURCE_DATE_EPOCH. This is not recommended if there is any
235 viable alternative.
236 pdfTeX also has several primitives to support reproducible
237 builds, which are preferable to setting these environment vari‐
238 ables; see the main manual.
239
240 Many, many more environment variables may be consulted related to path
241 searching. See the Kpathsea manual.
242
244 The location of the files mentioned below varies from system to system.
245 Use the kpsewhich utility to find their locations.
246
247 pdftex.map
248 Font name mapping definitions.
249
250 *.tfm Metric files for pdfTeX's fonts.
251
252 *.fmt Predigested pdfTeX format (.fmt) files.
253
256 This version of pdfTeX fails to trap arithmetic overflow when dimen‐
257 sions are added or subtracted. Cases where this occurs are rare, but
258 when it does the generated DVI or PDF file will be invalid.
259
261 pdfTeX is available for a large variety of machine architectures and
262 operating systems. pdfTeX is part of all major TeX distributions.
263 The pdfTeX home page: http://www.pdftex.org.
264 pdfTeX on CTAN: https://ctan.org/pkg/pdftex.
265 pdfTeX mailing list for all discussion: https://lists.tug.org/pdftex.
266
268 This manual page is not meant to be exhaustive. The complete documen‐
269 tation for this version of pdfTeX can be found in the pdfTeX user man‐
270 ual and the Texinfo manuals Kpathsea library, Web2C: A TeX implementa‐
271 tion. These manuals, and more, can be accessed from the pdfTeX or CTAN
272 web pages given above.
273
274 Some related programs: epstopdf(1), etex(1), latex(1), luatex(1),
275 mptopdf(1), tex(1), mf(1).
276
278 The primary authors of pdfTeX are Han The Thanh, Petr Sojka, Jiri Zla‐
279 tuska, and Peter Breitenlohner (eTeX).
280
281 TeX was designed by Donald E. Knuth, who implemented it using his Web
282 system for Pascal programs. It was ported to Unix at Stanford by
283 Howard Trickey, and at Cornell by Pavel Curtis. The version now
284 offered with the Unix TeX distribution is that generated by the Web to
285 C system (web2c), originally written by Tomas Rokicki and Tim Morgan.
286 The encTeX extensions were written by Petr Olsak.
287
288
289
290Web2C 2020 6 August 2019 PDFTEX(1)