summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/eplain/base/invoke.texi
blob: b412c64a57b0b1e17e74402e5d716889ad6f4000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
@c This is part of the Eplain manual.  Public domain.

@node Invoking Eplain
@chapter Invoking Eplain

@cindex Eplain, invoking
The simplest way to use Eplain is simply to put:

@example
\input eplain
@end example

@noindent at the beginning of your input file.  The macro file is small
enough that reading it does not take an unbearably long time---at least on
contemporary machines.  

In addition, if a format (@file{.fmt})
@pindex .fmt @r{file}
file has been created for Eplain (see the previous section), you can
eliminate the time spent reading the macro source file.  You do this
by responding @code{&eplain} to @TeX{}'s @samp{**} prompt.  For
example:

@example
initex
This is TeX, ...
**&eplain myfile
@end example

Depending on the implementation of @TeX{} which you are using, you might
also be able to invoke @TeX{} as @file{eplain} and have the format file
automatically read.

If you write something which you will be distributing to others, you
won't know if the Eplain format will be loaded already.  If it is, then
doing @code{\input eplain} will waste time; if it isn't, then you must
load it.  To solve this, Eplain defines the control sequence
@code{\eplain}
@findex eplain
to be the letter @code{t} (a convention borrowed from Lisp; it doesn't
actually matter what the definition is, only that the definition
exists).  Therefore, you can do the following:
@example
\ifx\eplain\undefined \input eplain \fi
@end example
@noindent where @code{\undefined} must never acquire a definition.

Eplain consists of several source files:
@table @file
@item xeplain.tex
most of the macros;

@item arrow.tex
commutative diagram macros (@pxref{Arrow theoretic diagrams}), written by
Steven Smith;

@item btxmac.tex
bibliography-related macros (@pxref{Citations});

@item ifpdf.sty
sets the switch @code{\ifpdf}, which can be used to
detect pdf@TeX{} in PDF mode (@pxref{Checking for PDF output}), written
by Heiko Oberdiek;

@item path.sty
macro for allowing line breaks at punctuation characters within long
pathnames, electronic mail addresses, etc., (@pxref{Paths}), written
by Philip Taylor;

@item texnames.sty
abbreviations for various @TeX{}-related names (@pxref{Logos}), edited
by Nelson Beebe.

@end table

@noindent The file @file{eplain.tex} is all of these files merged
together, with comments removed.

All of these files except @file{xeplain.tex} can be input individually,
if all you want are the definitions in that file.

Also, since the bibliography macros are fairly extensive, you might not
want to load them, to conserve @TeX{}'s memory.  Therefore, if the
control sequence @code{\nobibtex}
@findex nobibtex
is defined, then the bibliography definitions are skipped.  You must set
@code{\nobibtex} before @file{eplain.tex} is read, naturally.  For
example, you could start your input file like this:

@example
\let\nobibtex = t
\input eplain
@end example

By default, @code{\nobibtex} is undefined, and so the bibliography
definitions @emph{are} made.

@findex noarrow
Likewise, define @code{\noarrow} if you don't want to include the
commutative diagram macros from @file{arrow.tex}, perhaps because you
already have conflicting ones.

If you don't want to read or write an @file{aux} file at all, for any
kind of cross-referencing, define @code{\noauxfile}
@findex noauxfile
before reading @file{eplain.tex}.  This also turns off all warnings
about undefined labels.

@pindex amsppt.sty
@cindex AMS@TeX{} conflicts
Eplain conflicts with AMS@TeX{} (to be precise, with @file{amsppt.sty}):
the macros @code{\cite} and @code{\ref} are defined by both.

If you want to use AMS@TeX{}'s @code{\cite}, the solution is to define
@code{\nobibtex} before reading Eplain, as described above.

If you have @file{amsppt.sty} loaded and use @code{\ref}, Eplain writes
a warning on your terminal. If you want to use the AMS@TeX{}
@code{\ref}, do @code{\let\ref = \amsref} after reading Eplain.
To avoid the warning, do @code{\let\ref = \eplainref} after reading
Eplain and before using @code{\ref}.

@pindex texi2dvi
@pindex bibtex
@pindex makeindex
Sometimes you may need to run @TeX{} more then once on your
@file{.tex} file in order to produce and typeset indexes, resolve
undefined cross-references and/or citations.  The shell script
@command{texi2dvi} from the Texinfo documentation system (see
@url{http://www.gnu.org/software/texinfo/}) can automate this process:
it runs Bib@TeX{}, MakeIndex and @TeX{} as many times as needed to
complete the compilation process.  You will need to set the
@env{LATEX} environment variable to @samp{tex}.  For example, in a
Bourne-compatible shell, the following command will do all the work:

@example
prompt$ LATEX=tex texi2dvi file.tex
@end example

@pindex pdftex
@noindent (Despite the name, @command{texi2dvi} can also produce
@file{.pdf} files; just set @samp{LATEX=pdftex}.)  See the output from
the command @command{texi2dvi --help} for invoking information and a
full list of options.