old-www/HOWTO/TeTeX-HOWTO-2.html

135 lines
6.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>The teTeX HOWTO: The Linux-teTeX Local Guide: Using teTeX.</TITLE>
<LINK HREF="TeTeX-HOWTO-3.html" REL=next>
<LINK HREF="TeTeX-HOWTO-1.html" REL=previous>
<LINK HREF="TeTeX-HOWTO.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="TeTeX-HOWTO-3.html">Next</A>
<A HREF="TeTeX-HOWTO-1.html">Previous</A>
<A HREF="TeTeX-HOWTO.html#toc2">Contents</A>
<HR>
<H2><A NAME="sec-using"></A> <A NAME="s2">2. Using teTeX.</A></H2>
<P>Theoretically, at least, everything is installed correctly and is
ready to run. teTeX is a very large software package. As with any
complex software package, you'll want to start by learning teTeX
slowly, instead of being overwhelmed by its complexity.
<P>At the same time, we want the software to do something useful. So
instead of watching TeX typeset
<PRE>
``Hello, World!''
</PRE>
as Professor Knuth suggests, we'll produce a couple of teTeX's own
documents in order to test it.
<P>
<H2><A NAME="print-documentation"></A> <A NAME="ss2.1">2.1 Printing the documentation. </A>
</H2>
<P>You should be logged in as <CODE>root</CODE> the first few times you run
teTeX. If you aren't, Metafont may not be able to create the
necessary directories for its fonts. The <CODE>texconfig</CODE> program
includes an option to make the font directories world-writable, but if
you're working on a multi-user system, security considerations may
make this option impractical or undesirable.
<P>In either instance, if you don't have the appropriate permissions to
write to the directories where the fonts are stored, Metafont will
complain loudly because it can't make the directories. You won't see
any output because you have a bunch of zero-length font characters.
This is no problem. Simply log out, re-login as <CODE>root,</CODE> and
repeat the offending operation.
<P>The nice thing about teTeX is that, if you blow it, no real harm is
done. It's not like a compiler, where, say, you will trash the root
partition if a pointer goes astray. What, you haven't read the teTeX
manual yet? Of course you haven't. It's still in the distribution,
in source code form, waiting to be output.
<P>So, without further delay, you will want to read the teTeX manual.
It's located in the directory
<PRE>
/usr/lib/teTeX/texmf/doc/tetex.
</PRE>
<P>The LaTeX source for the manual is called <CODE>TETEXDOC.tex</CODE>. (The
<CODE>.tex</CODE> extension is used for both TeX and LaTeX files. Some
editors, like Emacs, can tell the difference.) There is also a file
<CODE>TETEXDOC.dvi</CODE> included with the distribution, which you might
want to keep in a safe place---say, another directory ---in case you
want to test your <CODE>.dvi</CODE> drivers later. With that out of the
way, type
<PRE>
latex TETEXDOC.tex
</PRE>
LaTeX will print several warnings. The first,
<PRE>
LaTeX Warning: Label(s) may have changed. Rerun to get the
cross-references right.
</PRE>
is standard. It's common to build a document's Table of Contents by
LaTeXing the document twice. So, repeat the command. The other
warnings can be safely ignored. They simply are informing you that
some of the FTP paths mentioned in the documentation are too wide for
their alloted spaces. Sections
<A HREF="TeTeX-HOWTO-3.html#para-dimen">Paragraph styles and dimensions</A> and
<A HREF="TeTeX-HOWTO-3.html#tolerances">Tolerances</A>
describe horizontal spacing in more detail.
<P>teTeX will have generated several files from <CODE>TETEXDOC.tex.</CODE>
The one that we're interested in is <CODE>TETEXDOC.dvi.</CODE> This is the
device-independent output which you can send either to the screen or
the printer. If you're running teTeX under the X Windows System, you
can preview the document with <CODE>xdvi</CODE>.
<P>For the present, let's assume that you have a HP LaserJet II. You
would give the command
<PRE>
dvilj2 TETEXDOC.dvi
</PRE>
which writes a PCL output file from <CODE>TETEXDOC.dvi</CODE>, including
soft fonts which will be downloaded to the LaserJet. This is
<EM>not</EM> a feature of TeX or LaTeX, but a feature provided by
<CODE>dvilj2</CODE>. Other <CODE>.dvi</CODE> drivers provide features that
are relevant to the devices they support. <CODE>dvilj2</CODE> tries to
fill the font requests which were made in the original LaTeX document
with the the closest equivalents available on the system. In the case
of a plain text document like <CODE>TETEXDOC.tex</CODE>, there isn't much
difficulty. All of the fonts requested by <CODE>TETEXDOC.tex</CODE> will
be generated by <CODE>metafont</CODE>, which is automatically invoked by
<CODE>dvilj2</CODE>, if the fonts aren't already present. (If you're
running <CODE>dvilj2</CODE> for the first time, the program may need to
generate all of the fonts.) There are several options that control
font generation via <CODE>dvilj2</CODE>. They're outlined in the manual
page. At this point, you shouldn't need to operate <CODE>metafont</CODE>
directly. If you do, then something has gone awry with your
installation. All of the <CODE>.dvi</CODE> drivers will invoke
<CODE>metafont</CODE> directly via the kpathsea path-searching
library---the discussion of which is beyond the scope of this
document---and you don't need to do any more work with
<CODE>metafont</CODE> for the present---all of the <CODE>metafont</CODE>
sources for the Computer Modern font library are provided.
<P>You can print <CODE>TETEXDOC.lj</CODE> with the command
<PRE>
lpr TETEXDOC.lj
</PRE>
You may also need to install a printer filter that understands PCL.
<P>The nine-page <EM>teTeX Guide</EM> provides some useful information
for further configuring your system, some of which I have mentioned,
much that this document doesn't cover.
<P>Some of the information in the next section I haven't been able to
test, because I have a non-Postscript HP Deskjet 400 color ink jet
printer connected to the computer's parallel port. However, not
owning a Postscript printer is no barrier to printing text and
graphics from your text documents. Ghostscript is available in most
Linux distributions and it could already be installed on your system.
<P>
<HR>
<A HREF="TeTeX-HOWTO-3.html">Next</A>
<A HREF="TeTeX-HOWTO-1.html">Previous</A>
<A HREF="TeTeX-HOWTO.html#toc2">Contents</A>
</BODY>
</HTML>