summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/luatex/interpreter/interpreter-doc.tex
blob: 8d78ad029631b122a64c225a5df18bdf99586ee4 (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
% 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 - July 2011
\input pitex

% Output stuff.
\gates remove {output_headers}{output_shipout}
\gates remove {output_postship}{output_shipout}
\gates remove {output_precheck}{output}
\gates close  {output_shipout}{output}

\newif\ifright
\newbox\leftbox
\gates def {twocol}{%
  \ifright
    \global\rightfalse
    \setbox\outputbox=\hbox{\box\leftbox\kern24pt\box\outputbox}%
    \gates ajar {output_shipout}{output}%
  \else
    \global\righttrue
    \global\setbox\leftbox=\box\outputbox
  \fi
  }
\gates add {twocol}[before output_shipout]{output}


\setparameter page :
  hsize  = 20pc
  left   = 60pt
  width  = "\dimexpr 144pt + 40pc\relax"
  lines  = 45
  height = 24cm

\setparameter section :
  font = \bf
  link = true
  number = none
  numbercommand = \llap
  beforeskip = 1

\setparameter navigator :
  open   = true
  title  = "Interpreter documentation"
  author = "Paul Isambert"
  mode   = outlines

\setparameter font :
  command = \mainfont
  name    = "Chaparral Pro"
  bold    = Semibold
  big     = 18pt

\setparameter font :
  command  = \codefont
  name     = "Lucida Console"
  bold     = none
  size     = 8pt
  features = "space = .6, -tlig, -trep, -liga"


\parfillskip=0pt plus 1fill
\def\describe#1#2#3{%
  \iflines3{\vskip\baselineskip}{\breakpage}%
  \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}

\def\arg#1{{\codefont\char"2039 #1\char"203A}}

\input interpreter

% Title
\vbox to 3\baselineskip{
\hbox to \hsize{\big Interpreter\hfil\normalsize Paul Isambert}
\hbox to \hsize{v.1.0, July 2011 \hfil \tcode{zappathustra AT free DOT fr}}
\vfil
}
% Bulk of the doc.
\interpretfile{doc}{interpreter-doc.txt}
\vskip0pt plus 1filll
\noindent\ital{Typeset with Lua\TeX\ 0.71 in Chaparral Pro and Lucida Console}

\bye