Debian Codegraph @

texmf-dist/tex/latex/seminar/tvz-user.sty

raw
1 %%
2 %% This file may be distributed and/or modified under the conditions of
3 %% the LaTeX Project Public License, either version 1.2 of this license
4 %% or (at your option) any later version. The latest version of this
5 %% license is in:
6 %%
7 %% http://www.latex-project.org/lppl.txt
8 %%
9 %% and version 1.2 or later is part of all distributions of LaTeX version
10 %% 1999/12/01 or later.
11 %%
12 %% BEGIN tvz-user.sty
13 %% 93/04/01
14
15 \input tvz-hax.sty
16
17 \def\papersizeadjust{%
18 \@tempdima=\paperwidth\relax
19 \advance\@tempdima-8.5in
20 \divide\@tempdima 2
21 \advance\oddsidemargin\@tempdima
22 \advance\evensidemargin\@tempdima
23 \@tempdima=\paperheight
24 \advance\@tempdima-11in
25 \divide\@tempdima 2
26 \advance\topmargin\@tempdima}
27
28 \begingroup
29 \catcode`\"=\active
30 \gdef\ShortVerb{%
31 \catcode`\"=\active
32 \def"{\Verb"}}%
33 \gdef\DeleteShortVerb{\catcode`\"=12\relax}
34 \endgroup
35
36 % Paragraphs are marked by large space rather than indentation:
37 \setlength{\parindent}{0pt}
38 \setlength{\parskip}{7pt plus 1pt minus 1pt}
39
40 % Reduce \topsep:
41 \def\@listI{%
42 \leftmargin\leftmargini
43 \parsep 5\p@ plus2.5\p@ minus\p@
44 %\topsep 10\p@ plus4\p@ minus6\p@
45 \topsep 5\p@ plus2\p@ minus2\p@
46 \itemsep 5\p@ plus2.5\p@ minus\p@}
47 \let\@listi\@listI
48 \@listi
49 \def\@listii{%
50 \leftmargin\leftmarginii
51 \labelwidth\leftmarginii
52 \advance\labelwidth-\labelsep
53 %\topsep 5\p@ plus2.5\p@ minus\p@
54 \topsep 2\p@ plus.5\p@ minus\p@
55 \parsep 2.5\p@ plus\p@ minus\p@
56 \itemsep \parsep}
57 \def\@listiii{%
58 \leftmargin\leftmarginiii
59 \labelwidth\leftmarginiii
60 \advance\labelwidth-\labelsep
61 %\topsep 2.5\p@ plus\p@ minus\p@
62 \topsep 1\p@ plus.2\p@ minus.2\p@
63 \parsep \z@
64 \partopsep \p@ plus\z@ minus\p@
65 \itemsep \topsep}
66
67 \skip\footins 20pt plus 4pt minus 2pt
68
69 %%%%%%%%%%%%%%%%%%%%%%% Special hacks for User's Guides %%%%%%%%%%%%%%%%%%%%%
70 %%
71 %% Listing questions
72 \newcounter{faq}[section]
73 \def\thefaq{\arabic{faq}}
74 \let\l@faq\@gobbletwo
75 \def\faq{\@startsection{faq}{2}{\z@}%
76 {3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}{\faqfont}}
77 \def\faqfont{\normalsize\sf}
78 \def\faqmark#1{}
79 %%
80 %% Listing errors
81 \def\error{\vskip 2ex\noindent}
82 %%
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84
85 \@ifundefined{AmSTeX}
86 {\def\AmSTeX{\leavevmode\hbox{$\cal A\kern-.2em\lower.376ex%
87 \hbox{$\cal M$}\kern-.2em\cal S$-\TeX}}}{}
88 \@ifundefined{BibTeX}
89 {\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em%
90 T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{}
91 \@ifundefined{SliTeX}
92 {\def\SliTeX{{\rm S\kern-.06emL\kern-.18em\raise.32ex\hbox
93 {\sc i}\kern -.03em\TeX}}}{}
94 \@ifundefined{PlainTeX}{\def\PlainTeX{{\sc Plain}\kern2pt\TeX}}{}
95
96 %%%%%%%%%%%%%%% Special indexing for User's Guides %%%%%%%%%%%%%%%%%%%%%%%%%
97 %%
98 %%
99 \@ifundefined{actualchar}{\def\actualchar{@}}{}
100 \@ifundefined{quotechar}{\def\quotechar{"}}{}
101 \@ifundefined{levelchar}{\def\levelchar{!}}{}
102 \@ifundefined{encapchar}{\def\encapchar{|}}{}
103 \@ifundefined{verbatimchar}{\def\verbatimchar{+}}{}
104 %%
105 %% These are the indexing commands:
106 %%
107 %% Commands: \MainIndex \UsageIndex
108 %% Environments: \MainEnvIndex \UsageEnvIndex
109 %% Style options: \MainOptionIndex \UsageOptionIndex
110 %% Counters: \MainCntIndex \UsageCntIndex
111 \def\@Index#1{\@bsphack\index{#1}\@esphack}
112 \def\Index#1#2{%
113 \@bsphack
114 \index{\expandafter\@gobble\string#2\actualchar\string
115 \verb\quotechar*\verbatimchar\string#2\verbatimchar
116 \encapchar #1}}
117 {\catcode`\!=0 !catcode`!\=12!gdef!special@gobble#1{!if\#1!else#1!fi}}
118 \def\MainIndex{\Index{main}}
119 \def\UsageIndex{\Index{usage}}
120 \def\SpecialIndex#1#2#3{%
121 \@Index{#3\actualchar{\tt #3} (#1)\encapchar #2}%
122 \@Index{#1s:\levelchar{\tt #3}\encapchar #2}}
123 \def\MainEnvIndex{\SpecialIndex{environment}{main}}
124 \def\UsageEnvIndex{\SpecialIndex{environment}{usage}}
125 \def\MainOptionIndex{\SpecialIndex{option}{main}}
126 \def\UsageOptionIndex{\SpecialIndex{option}{usage}}
127 \def\MainCntIndex{\SpecialIndex{counter}{main}}
128 \def\UsageCntIndex{\SpecialIndex{counter}{usage}}
129 %%
130 %% Font for index page numbers:
131 \def\main#1{{\bf #1}}
132 \def\usage#1{{#1}}
133 %%
134 %% These combine various functions:
135 %%
136 %% Commands: \Main \Usage
137 %% Environments: \MainEnv \UsageEnv
138 %% Style options: \MainOption \UsageOption
139 %% Counters: \MainCnt \UsageCnt
140 %%
141 %% The "Main" ones
142 %% * Index argument.
143 %% * Print argument with \MainFont
144 %% * Create label +foo, e+foo or o+foo.
145 %%
146 %% The "Usage" ones
147 %% * Index argument.
148 %% * Print argument with \UsageFont.
149 %%
150 \def\SpecialLabel#1#2+{\label{+#2}}
151 \def\LabelIndex#1{\MainIndex{#1}\expandafter\SpecialLabel\string#1+}
152 \def\Main#1{%
153 \MainIndex{#1}%
154 \expandafter\SpecialLabel\string#1+%
155 {\MainFont\string#1}}
156 \def\Usage#1{\UsageIndex{#1}{\UsageFont\string#1}}
157 \def\MainEnv#1{%
158 \MainEnvIndex{#1}%
159 \label{e+#1}%
160 {\MainFont #1}}
161 \def\UsageEnv#1{\UsageEnvIndex{#1}{\UsageFont #1}}
162 \def\MainOption#1{%
163 \MainOptionIndex{#1}%
164 \label{o+#1}%
165 {\MainFont #1}}
166 \def\UsageOption#1{\UsageOptionIndex{#1}{\UsageFont #1}}
167 \def\MainCnt#1{%
168 \MainCntIndex{#1}%
169 \label{c+#1}%
170 {\MainFont #1}}
171 \def\UsageCnt#1{\UsageCntIndex{#1}{\UsageFont #1}}
172 %%
173 %% These are abbreviations.
174 %%
175 \def\N{\Main}
176 \def\n{\Usage}
177 \def\E{\MainEnv}
178 \def\e{\UsageEnv}
179 \def\O{\MainOption}
180 \def\o{\UsageOption}
181 \def\C{\MainCnt}
182 \def\c{\UsageCnt}
183 %%
184 %% This is for listing commands in a description environment.
185 \def\xitem#1{\item[\Main{#1}]}
186 %%
187 %%
188 \renewcommand{\EveryVerbatimLine}[2]{}
189 \VerbatimFootnotes
190
191 %% User's guide and documented code have different index prologue.
192 \def\PrintUserIndex{{\let\ps@plain\@empty\@input{\jobname.ind}}}
193
194 \begingroup
195 \catcode`\<=1 \catcode`\>=2
196 \catcode`\{=13 \catcode`\}=12
197 \catcode`\[=13
198 \gdef\@MD<%
199 \catcode`\{=13 \catcode`\}=12 \catcode`\[=13
200 \def{##1}<\{<\MetaFont ##1\/>\}>%
201 \def[##1]<\string[<\MetaFont ##1\/>]>>
202 \endgroup
203 \def\MD{%
204 \NotNested
205 \Ex
206 \begingroup
207 \@MD
208 \def\end{\par\endgroup\end}%
209 \def\\{\@centercr\Main}%
210 \MainFont
211 \Main}
212 \def\endMD{\endEx}
213
214 \endinput
215 %% END tvz-user.sty