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
|
% This is the master file producing interpreter-doc.pdf. The version of the
% documentation readable in a text editor is interpreter-doc.txt (input below).
%
% Paul Isambert - zappathustra AT free DOT fr - June 2012
\input pitex
\overfullrule=0pt
\OutputRoutine remove {headers}{shipout}
\setparameter page :
hsize = 25pc
left = 60pt
width = "\dimexpr 25pc + 120pt\relax"
lines = 35
height = 20cm
\setparameter section :
font = \bf
link = true
number = none
numbercommand = \llap
beforeskip = 1
\setparameter navigator :
title = "Interpreter documentation"
author = "Paul Isambert"
mode = outlines
\setfont\mainfont:
name = "Chaparral Pro"
bold = Semibold
big = 18pt
\setfont\codefont:
name = "Lucida Console"
slant = 15
bold italic = none
size = 8pt
features = "-tlig, -trep, space = mono"
\parfillskip=0pt plus 1fill
\def\describe#1#2#3{%
\unless\ifdim\lastskip=\baselineskip
\vskip\baselineskip
\fi
\needspace{2\baselineskip}%
\noindent\color{.8 0 0}{%
{\outline{#3}{\directlua{%
local t = string.gsub("\luaescapestring{#1}", "[ (].*", "")
tex.print(t)}}%
\codefont#1}%
\reverse\iffemptystring{#2}
{\kern1em \hfil\penalty0\hbox{\ital{(#2)}}}}%
\par
\removenextindent}
\newverbatim\source{}
{\vskip\baselineskip
\hfuzz=1em
\codefont\parindent=0pt
\pdfcolorstack0 push {.8 0 0 rg}
\printverbatim
\pdfcolorstack0 pop
\vskip\baselineskip}
% The verbatim facilities in PiTeX aren't gated yet, so I must rely on
% this horrible hack!
\directlua{
function do_verbatim (name, exec)
if exec then
tex.print(pitex.verbatims[name])
else
for n, l in ipairs(pitex.verbatims[name]) do
if n == \string#pitex.verbatims[name] then
tex.print("\noexpand\\penalty\noexpand\\widowpenalty")
end
tex.print(pitex.verbatims[name].regime, l)
if n == 1 and \string#pitex.verbatims[name] > 2 then
tex.print("\noexpand\\penalty\noexpand\\widowpenalty")
end
end
end
end
}
\def\arg#1{{\codefont\char"2039 #1\char"203A}}
\pdfdef\ital#1{#1}
\pdfdef\verb`#1`{#1}
% Not optimal, but hey, with all the "intepreter.core.classes" stuff...
\hyphenation{li-nes cla-sses}
\input interpreter
% Title
\vbox to 3\baselineskip{
\hbox to \hsize{\big Interpreter\hfil\normalsize Paul Isambert}
\hbox to \hsize{v.1.2, June 2012 \hfil \tcode{zappathustra AT free DOT fr}}
\vfil
}
% Bulk of the doc.
\interpretfile{doc}{interpreter-doc.txt}
\vskip0pt plus 1filll
\noindent
\bgroup\it
Typeset with Lua\TeX\ 0.71 in Chaparral Pro and Lucida Console
... nonetheless this documentation looks dull, I don't know why.
\egroup
\bye
|