| 1 |
% This is the master file producing interpreter-doc.pdf. The version of the |
| 2 |
% documentation readable in a text editor is interpreter-doc.txt (input below). |
| 3 |
% |
| 4 |
% Paul Isambert - zappathustra AT free DOT fr - June 2012 |
| 5 |
|
| 6 |
\input pitex |
| 7 |
|
| 8 |
\overfullrule=0pt |
| 9 |
|
| 10 |
\OutputRoutine remove {headers}{shipout} |
| 11 |
|
| 12 |
\setparameter page : |
| 13 |
hsize = 25pc |
| 14 |
left = 60pt |
| 15 |
width = "\dimexpr 25pc + 120pt\relax" |
| 16 |
lines = 35 |
| 17 |
height = 20cm |
| 18 |
|
| 19 |
\setparameter section : |
| 20 |
font = \bf |
| 21 |
link = true |
| 22 |
number = none |
| 23 |
numbercommand = \llap |
| 24 |
beforeskip = 1 |
| 25 |
|
| 26 |
\setparameter navigator : |
| 27 |
title = "Interpreter documentation" |
| 28 |
author = "Paul Isambert" |
| 29 |
mode = outlines |
| 30 |
|
| 31 |
\setfont\mainfont: |
| 32 |
name = "Chaparral Pro" |
| 33 |
bold = Semibold |
| 34 |
big = 18pt |
| 35 |
|
| 36 |
\setfont\codefont: |
| 37 |
name = "Lucida Console" |
| 38 |
slant = 15 |
| 39 |
bold italic = none |
| 40 |
size = 8pt |
| 41 |
features = "-tlig, -trep, space = mono" |
| 42 |
|
| 43 |
\parfillskip=0pt plus 1fill |
| 44 |
\def\describe#1#2#3{% |
| 45 |
\unless\ifdim\lastskip=\baselineskip |
| 46 |
\vskip\baselineskip |
| 47 |
\fi |
| 48 |
\needspace{2\baselineskip}% |
| 49 |
\noindent\color{.8 0 0}{% |
| 50 |
{\outline{#3}{\directlua{% |
| 51 |
local t = string.gsub("\luaescapestring{#1}", "[ (].*", "") |
| 52 |
tex.print(t)}}% |
| 53 |
\codefont#1}% |
| 54 |
\reverse\iffemptystring{#2} |
| 55 |
{\kern1em \hfil\penalty0\hbox{\ital{(#2)}}}}% |
| 56 |
\par |
| 57 |
\removenextindent} |
| 58 |
|
| 59 |
\newverbatim\source{} |
| 60 |
{\vskip\baselineskip |
| 61 |
\hfuzz=1em |
| 62 |
\codefont\parindent=0pt |
| 63 |
\pdfcolorstack0 push {.8 0 0 rg} |
| 64 |
\printverbatim |
| 65 |
\pdfcolorstack0 pop |
| 66 |
\vskip\baselineskip} |
| 67 |
|
| 68 |
% The verbatim facilities in PiTeX aren't gated yet, so I must rely on |
| 69 |
% this horrible hack! |
| 70 |
\directlua{ |
| 71 |
function do_verbatim (name, exec) |
| 72 |
if exec then |
| 73 |
tex.print(pitex.verbatims[name]) |
| 74 |
else |
| 75 |
for n, l in ipairs(pitex.verbatims[name]) do |
| 76 |
if n == \string#pitex.verbatims[name] then |
| 77 |
tex.print("\noexpand\\penalty\noexpand\\widowpenalty") |
| 78 |
end |
| 79 |
tex.print(pitex.verbatims[name].regime, l) |
| 80 |
if n == 1 and \string#pitex.verbatims[name] > 2 then |
| 81 |
tex.print("\noexpand\\penalty\noexpand\\widowpenalty") |
| 82 |
end |
| 83 |
end |
| 84 |
end |
| 85 |
end |
| 86 |
} |
| 87 |
|
| 88 |
\def\arg#1{{\codefont\char"2039 #1\char"203A}} |
| 89 |
\pdfdef\ital#1{#1} |
| 90 |
\pdfdef\verb`#1`{#1} |
| 91 |
|
| 92 |
% Not optimal, but hey, with all the "intepreter.core.classes" stuff... |
| 93 |
\hyphenation{li-nes cla-sses} |
| 94 |
|
| 95 |
\input interpreter |
| 96 |
|
| 97 |
% Title |
| 98 |
\vbox to 3\baselineskip{ |
| 99 |
\hbox to \hsize{\big Interpreter\hfil\normalsize Paul Isambert} |
| 100 |
\hbox to \hsize{v.1.2, June 2012 \hfil \tcode{zappathustra AT free DOT fr}} |
| 101 |
\vfil |
| 102 |
} |
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
% Bulk of the doc. |
| 107 |
\interpretfile{doc}{interpreter-doc.txt} |
| 108 |
\vskip0pt plus 1filll |
| 109 |
\noindent |
| 110 |
\bgroup\it |
| 111 |
Typeset with Lua\TeX\ 0.71 in Chaparral Pro and Lucida Console |
| 112 |
... nonetheless this documentation looks dull, I don't know why. |
| 113 |
\egroup |
| 114 |
|
| 115 |
\bye |