term% cat index.txt TEX(1) General Commands Manual TEX(1)
NAME
tex, latex, bibtex, dvips, dviselect, mf - text formatting and typeset‐
ting
SYNOPSIS
tex [ first-line ]
latex file[.tex]
dvips [ option ... ] dvifile
dviselect [ -s ] [ -i infile ] [ -o outfile ] list of pages [ infile [
outfile ] ]
bibtex auxname
mf [ first-line ]
DESCRIPTION
Tex formats interspersed text and commands and outputs a .dvi (`device
independent') file.
An argument given on the command line behaves as the first input line.
That line should begin with a (possibly truncated) file name or a \con‐
trolsequence. Thus tex paper processes the file paper.tex. The base
name of paper becomes the jobname, and is used in forming output file
names. If no file is named, the jobname is texput. The default .tex
extension can be overridden by specifying an extension explicitly.
The output is written on jobname.dvi, which can be printed using lp(1).
A log of error messages goes into jobname.log.
As well as the standard TeX fonts, many PostScript fonts can be used
(see the contents of /sys/lib/tex/fonts/psvf). The file testfont.tex
(in the standard macro directory) will print a table of any font.
These environment variables adjust the behavior of tex:
TEXINPUTS
Search path for \input and \openin files. It should be colon-
separated, and start with dot. Default: .:/sys/lib/tex/macros
TEXFONTS
Search path for font metric files. Default:
/sys/lib/tex/fonts/tfm
TEXFORMATS
Search path for format files. Default: /sys/lib/tex/macros
TEXPOOL
Search path for strings. Default: /sys/lib/tex
TEXEDIT
Template for the switch-to-editor-on-error option, with %s for
the file name and %d for the line number. Default: /bin/ed %s
Latex is a version of tex with a standard set of macros loaded. Latex
produces file.dvi and a cross-referencing file, file.aux. It might be
necessary to run latex twice, to get all of the cross-referencing done
properly. Slitex is a variant of latex with fonts and commands suit‐
able for making slides.
Bibtex is a bibliography processing program, often used in conjunction
with latex. Bibtex reads the top-level auxiliary (.aux) file output by
latex and creates a bibliography (.bbl) file to be included in the La‐
TeX source file. The auxname on the command line should be given with‐
out an extension. Each \cite in the source file is looked up in bibli‐
ography files to gather together those used in the document. Then a
bibliography style file is executed to write a \thebibliography envi‐
ronment.
The source file should have defined the bibliography (.bib) files to
search with the \bibliography command, and the bibliography style
(.bst) file to execute with the \bibliographystyle command. Bibtex
searches the TEXINPUTS path for .bst files, and the BIBINPUTS path for
.bst files. The LaTeX manual describes how to make bibliography files.
Dvips converts .dvi files to PostScript, writing the result on standard
output. It is normally invoked by lp(1), but if invoked separately,
the following options are useful:
-r reverse pages. -r0 means don't reverse pages (if reversing is
default).
-Tdev output device: dev is one of laserwriter (default for dvips),
fax, gnot, lino (the computer center's high resolution Post‐
Script service), or ljfour (600 dpi PostScript).
-L print paper in landscape mode.
-Z compress the fonts before sending them.
-Z0 don't compress the fonts before sending them.
The following environment variables affect dvips:
TEXPKS Search path for font bitmaps (PK files).
TEXVFONTS
Search path for virtual font descriptions.
Dviselect selects pages from a .dvi file, creating a new .dvi file. A
range is a string of the form first:last where both first and last are
optional numeric strings, with negative numbers indicated by a leading
underscore character (_). If both first and last are omitted, the
colon may also be omitted, or may be replaced with an asterisk (*). A
TeX page selector is a list of pages separated by periods. A list of
pages is described by a set of page TeX page selectors, separated by
commas and/or white space. Dviselect actually looks at the ten count
variables that TeX writes; the first of these (\count0) is the page
number, with \count1 through \count9 having varied uses depending on
which macro packages are in use. (Typically \count1 is a chapter or
section number.) A page is included in dviselect's output if all its
\count values are within any one of the ranges listed on the command
line. For example, the command might select everything in chapter 1,
as well as pages 35 and up.
Instead of \count values, dviselect can also select by absolute page
number, indicated by a leading equal sign (=). Ranges of absolute
pages are also allowed: will extract the third through seventh pages.
Dvips understands some extended graphics commands that can be output
using tpic specials in the TeX source. Many of them work by building
up a path of x,y pairs, and then doing something with the path. The
tpic coordinate system has its origin at the current dvi position when
a drawing special is emitted; all length arguments are in units of
milli-inches, and the y-axis goes positive downward.
\special{pa x y}
Add x,y to the current path.
\special{fp}
Flush the current path: draw it as a polygonal line and reset
the path to be empty.
\special{da dlen}
Like fp but draw dashed line, with dashes dlen milli-inches
long.
\special{dt slen}
Like fp but draw a dotted line, with dots slen apart.
\special{sp}
Like fp but draw a quadratic spline. The spline goes through
the midpoints of the segments of the path, and straight pieces
extend it to the endpoints.
\special{ar x y xr yr s e}
Draw a circular or elliptical arc with center at x,y and radii
xr and yr. The arc goes clockwise from angle s to angle e (an‐
gles measured clockwise from the positive x-axis).
\special{pn n}
Set line width (pen diameter) to nmilli-inches.
\special{bk}
Set shading to black (will fill the next object drawn with
black).
\special{sh}
Set shading to grey.
\special{wh}
Set shading to white.
\special{psfile=file options}
Include file, which should be a PostScript illustration, making
its origin be the current dvi position. The default PostScript
transformation matrix will be in effect, but it can be modified
by the options, a list of space-separated key=value assignments.
Allowed keys are: hoffset, voffset, hscale, vscale, angle, If
supplied, these values are supplied to PostScript trans‐
late,scale, and rotate" commands, in that order. Also, keys
hsize and vsize may be supplied, to cause clipping to those
sizes. Sizes and offsets should be specified in points, angles
should be specified in degrees.
All of the specials leave TeX at the same position on the page that it
started in.
Mf runs metafont, program that produces fonts for TeX. It is used by
dvips when bitmaps for a given font at a given size do not exist.
FILES
/sys/lib/tex/macros/*
macros and preloaded format files
/sys/lib/tex/macros/doc/*
more TeX-related documentation
/sys/lib/tex/fonts/tfm
font metrics
/sys/lib/tex/fonts/psvf
PostScript virtual font metrics
/sys/lib/tex/fonts/canonpk
bitmaps for Canon engines (300 dpi)
/sys/lib/tex/fonts/linopk
bitmaps for Linotron (1270 dpi)
/sys/lib/tex/fonts/ljfourpk
bitmaps for Laserjet 4 (600 dpi)
/sys/lib/tex/fonts/gnotpk
bitmaps for gnot screen (100 dpi)
/sys/lib/tex/*
miscellaneous configuration files and PostScript headers
SOURCE
/sys/src/cmd/tex
SEE ALSO
pic(1), lp(1), proof(1), troff(1), delatex in deroff(1)
D. E. Knuth, The TEXbook, Addison-Wesley, 1984
L. Lamport, LaTeX, A Document Preparation System, Addison-Wesley, 1985
H. Trickey, ``Latex User Guide'', Unix Research System Programmer's
Manual, Tenth Edition, Volume 2.
Various documents in /sys/lib/tex/macros/doc.
BUGS
Should be spelled ÏεÏ.
TEX(1)