summaryrefslogtreecommitdiff
path: root/support/lametex/doc/stealth.tex
blob: ae2068d3c6d6c13f059455d66c7774a3d20d7efb (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
% stealth.tex
%
% \begin{stealth}
% \setlength{\textwidth}{7.5 in}
% \setlength{\oddsidemargin}{-.5 in}
% \pspage{page_dagger.ps}
% \end{stealth}

\chapter{Stealth Commands}

LameTeX doesn't understand all the commands that LaTeX does, but it
does know a few extra that can be used for special graphics. These
commands are called {\em stealth commands}, and are used like any
other LaTeX command, except that they appear inside comments!

Stealth commands are difficult to explain, but easy to demonstrate.
Try looking for examples of stealth commands inside {\tt
lametex\_doc.tex} and the files it includes.

%A comment in LaTeX is any place where a '\%' character occurs. The
%rest of the line after the '\%' character will be ignored by LaTeX.
%However, LameTeX reads everything inside a comment, looking for these
%special commands.

\section{$\backslash$begin\{stealth\}}
Normally it would be nice if you could make real comments without
LameTeX inserting the text into your document. This is especially true
if you are converting a LaTeX file to LameTeX and want to make
extensive use of the comment symbol to take out commands that LameTeX
cannot handle.

So, in order to begin a use a stealth command, you have to use a
stealth environment by using $\backslash$begin\{stealth\}, which is
the only command that is interpreted by LameTeX inside a comment but
outside of a stealth environment. You cannot just say
$\backslash$stealth. If you want that, use $\backslash$STEALTH, which
will continue the stealth environment to the end of the line, and the
revert back to normal. If you begin a $\backslash$postcript
environment then the $\backslash$STEALTH will wait for it to end and
then terminate on the next newline.

You are welcome to do a $\backslash$begin\{stealth\} at the very
beginning of your document and end it with $\backslash$end\{stealth\}
at the end, but although this will be simpler, it will also mean that
all text (including plain text) in your comments will be interpreted
and included in your document. So to avoid confusion and mistakes, and
to allow you to use real comment, it is best if you actually begin a
local stealth environment only when needed, and close it immediately
afterwards.

The stealth command is useful when you have some plain text that you
don't want normally included in LaTeX. For example, in this document
whenever it says to ``look for the little Wizard icons'' found in the
LameTeX version, the text referring to the icons is imbedded in a
stealth environment in comments, so that normal LaTeX will skip the text.

Warning! The stealth command does not really start a delimited
environment. For example, if you were to have \\ {\tt
$\backslash$begin\{Huge\} $\backslash$bf FOO $\backslash$end\{Huge\}
	BAR } \\ then the FOO would be Huge and boldface, but the BAR would be
neither. This is because the Huge environment serves as a delimiter
for everything inside of it.

The stealth command is different. Unlike every other begin/end
combination, if you were to say \\ {\tt \% $\backslash$begin\{stealth\}
$\backslash$bf FOO $\backslash$end\{stealth\} BAR } \\ then FOO would be
boldface, and BAR would also be boldface.

\section{Including a PostScript file}

You can use the $\backslash$includeps command to include a PostScript
file. For example, to include a file of PostScript definitions in {\bf
gummi.ps} you would type the stealth command {\tt
$\backslash$includeps\{gummi.ps\}}.

\section{Choosing a Page Description}

You can use the $\backslash$pspage command to include a new page
description. See the chapter on pages to learn more about this
command.

\section{For Fancy LaTeX Stuff}
You can tell LameTeX to ``skip over'' some part of your file in which
you might, for example, imbed LaTeX commands that LameTeX cannot
handle or skip gracefully. You must say $\backslash$begin\{ignore\}
and use $\backslash$end\{ignore\} inside a stealth environment to do
this enclosure.

\section{Free text PostScript}

You can type any PostScript commands you want directly by using the
$\backslash$postscript command. For example, to change the
gray scale of the printed text, you can type {\tt
$\backslash$begin\{postscript\} .6 setgray
$\backslash$end\{postscript\}}.

You {\bf cannot} just say $\backslash$postscript.

There are a lot of special things to learn about exactly where a
postscript command (like a grayscale) that you supply will be applied.

\section{Hacks Just Like Mom Used To Make}
Here's a fancier way to get your PostScript commands executed exactly
where you want them to. Use the $\backslash$pscmd command to specify
a PostScript function to run, and the function will be run exactly in
the text where you have specified.

You would use this command only inside a line of text. Between lines
of text, just using the $\backslash$postscript environment is
appropriate.

Everything you type in a PostScript environment gets dumped to
PostScript, except for the first comment character '%' on a line. If
you want to make a comment in your PostScript, make sure to use two
'%' characters, the first one of which will be ignored.

Read the chapter on pages to learn how to use this ``direct
stranglehold'' on PostScript correctly -- unless you enjoy surprises!

% Replace the current small margins with the wider margins.
% \begin{stealth}
% \setlength{\textwidth}{6 in}
% \setlength{\oddsidemargin}{0.25 in}
% \end{stealth}