-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtex2page-doc-mac.tex
218 lines (170 loc) · 3.89 KB
/
tex2page-doc-mac.tex
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
% last change: 2022-12-30
% Dorai Sitaram
%
%
\input texrc
%\magnification\magstephalf
\input miniltx
\input graphicx
\input coloraug
\resetatcatcode
\input btxmac
\input eval4tex
\input path.sty
\input texnames.sty
\let\TZPtexlayout=1
\advance\hoffset .5truein
\advance\hsize -1truein
\overfullrule0pt
\tocdepth 1
\ifx\suppressfontnotfounderror\UnDeFiNeD\else
\suppressfontnotfounderror=1
\fi
\def\tthook{\catcode`\|=0 \def\|{\char`\|}\def\ {·}}
\ifx\shipout\UnDeFiNeD\else
\ifx\XeTeXversion\UnDeFiNeD
\def\XeTeX{Xe\TeX}\else
\def\XeTeX{X\kern-0.125em\lower.5ex\hbox{Ǝ}\kern-0.1667em\TeX}\fi
\def\ConTeXt{Con\TeX t}
\fi
\input like-plt-logo
\def\beginmulticols#1{}
\def\endmulticols{}
\ifx\shipout\UnDeFiNeD\else
\IfFileExists{mimulcol}{\input mimulcol }{}
\fi
\ifx\shipout\UnDeFiNeD
\headline={\folio, ~~ \urlh{#ToC}{ToC}, ~~ \urlh{#Index}{Index}}
\footline={\the\headline}
%\footline={\folio, ~~ \urlh{#ToC}{ToC}, ~~ \urlh{#Index}{Index}}
\fi
\def\meta[#1]{\leavevmode\hbox{\em #1}}
\let\c\centerline
\IfFileExists{./t2p4plt}{\input ./t2p4plt }{}
\def\proto#1#2#3{\noindent
\hbox{{\tt(#1}\spaceifnotempty{#2}{\it#2}{\tt)}%
\qquad ;#3}\par}
% We want images to be a bit bigger
\ifx\shipout\UnDeFiNeD
\imgpreamble
\magnification\magstep2
\endimgpreamble
\fi
\ifx\shipout\UnDeFiNeD
\imgdef\um{$\mu$m}
\else
\def\um{$\mu$m}
\fi
\newdimen\templen
\newbox\tempbox
\def\spaceifnotempty#1{%
\setbox\tempbox\hbox{#1}%
\templen\wd\tempbox
\ifdim\templen>0pt{\ }\fi}
%\ifx\shipout\UnDeFiNeD\else
%\def\fontstem#1{\expandafter\fontstemQii\fontname#1 \end}%
%\def\fontstemQii#1 #2\end{#1 }%
%\font\twelvebf \fontstem\tenbf at 12pt
%\fi
% symbol footnotes
\def\fnsymbol#1{%
% #1 is between 1 and 9 inclusive
\ifcase#1\or
*\or
\dag\or
\ddag\or
\S\or
\P\or
$\Vert$\or
**\or
\dag\dag\or
\ddag\ddag
\fi}
%
\ifx\shipout\UnDeFiNeD\else
\def\raggedleft{%
\leftskip 0pt plus 1fil
\parfillskip 0pt
}
\fi
%
\def\quote{\bgroup\narrower\smallbreak\noindent}
\def\endquote{\smallbreak\egroup\noindent}
% \xrdef, as in Eplain
%\def\xrdef#1{\xrtag{#1}{\folio}}
\let\n\noindent
\let\f\numberedfootnote
\let\p\verb
\let\q\scm
\ifx\TZPcommonlisp 1
\eval{
(defun display (&rest ee) (apply #'princ ee))
}
\fi
\activettchar`
\let\maybeendinput\relax
\ifx\shipout\UnDeFiNeD\else
\let\maybeendinput\endinput\fi
\maybeendinput
% Following only for TeX2page:
%\parskip=.5em
\parskip=5pt
%\inputcss https://fonts.googleapis.com/css?family=Special+Elite
% Some readymade stylesheets are
% http://www.w3.org/StyleSheets/Core/{Chocolate,
% Midnight, Modernist, Oldstyle, Steely, Swiss,
% Traditional, Ultramarine}
%\inputcss http://www.w3.org/StyleSheets/Core/Oldstyle
\slatexlikecomments
\ifx\TZPcommonlisp 1
\evalq{
(defun all-blanks-p (s)
(every (lambda (c) (or (char= c #\space) (char= c #\tab)
(not (graphic-char-p c))))
s))
}
\else
\evalq{
(define princ display)
(define all-blanks-p
(lambda (s)
(let loop ((L (string->list s)))
(if (null? L) #t
(let ((c (car L)))
(if (char-whitespace? c) (loop (cdr L))
#f))))))
}
\fi
\evalq{
(tex2page "texample")
(tex2page "mpexample")
}
\ifx\TZPcommonlisp 1
\evalq{
(unless (probe-file "story.hlog") (tex2page "story"))
}\else
\evalq{
(if (not (file-exists? "story.hlog")) (tex2page "story") 0)
}\fi
% make it easy for the search engines to find us
\htmlheadonly
<meta name=description content="Scheme, Common Lisp script for making Web pages
from TeX documents">
<meta name=author content="Dorai Sitaram">
<!-- <link rev=made href="mailto:ds26gte at yahoo dot com"> -->
\endhtmlheadonly
\ifx\TZPcommonlisp 1
\def\spaceifnotempty{\eval{
(let ((x (ungroup (get-token))))
(unless (all-blanks-p x)
(princ (code-char 92))
(princ "space")))}}
\else
\def\spaceifnotempty{\eval{
(let ((x (ungroup (get-token))))
(if (not (all-blanks-p x))
(begin (display (integer->char 92))
(display "space"))
0))
}}
\fi