summaryrefslogtreecommitdiff
path: root/macros/generic/gates/gates-doc.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/gates/gates-doc.tex
Initial commit
Diffstat (limited to 'macros/generic/gates/gates-doc.tex')
-rw-r--r--macros/generic/gates/gates-doc.tex126
1 files changed, 126 insertions, 0 deletions
diff --git a/macros/generic/gates/gates-doc.tex b/macros/generic/gates/gates-doc.tex
new file mode 100644
index 0000000000..943e06f8ed
--- /dev/null
+++ b/macros/generic/gates/gates-doc.tex
@@ -0,0 +1,126 @@
+% This is the master file producing gates-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 - May 2012
+
+\input pitex
+\input interpreter
+
+\overfullrule=0pt
+
+\setfont\mainfont:
+ name = "Chaparral Pro"
+ size = 18pt
+ bold = Semi
+ big = 144pt
+
+\setfont\codefont:
+ name = "Lucida Console"
+ slant = 15
+ bold italic = none
+ size = 14pt
+ features = "-tlig, -trep, space = mono"
+
+\setparameter section subsection :
+ color = ".8 0 0"
+ inline = true
+ toc = true
+
+\setparameter section :
+ font = "\mainfont\normalsize\sc"
+ number = none
+ clear = false
+
+\setparameter sectionbookmark :
+ open = true
+ italic = true
+
+\setparameter subsection :
+ font = ""
+
+\setparameter paragraph :
+ number = none
+ beforeskip = 1
+ color = ".8 0 0"
+ font = ""
+ aftertitle = "\hskip.6em"
+
+\setparameter navigator :
+ pre = {\linkcolor"}
+ post = {"}
+ mode = bookmarks
+
+\def\linkcolor"#1"{%
+ \color{.4 .3 .3}{\ital{#1}}%
+ }
+
+\setparameter page :
+ width = 80pc
+ left right = 20pc
+ lines = 24
+ baselineskip = 24pt
+
+\Section def {section_do}[2]{%
+ \noindent
+ \ifstring{#1}{section}
+ {\marginnote[font = \rm,
+ hpos = rf,
+ side = left,
+ hsize = 5cm]{\quitvmode#2}}
+ {\ifstring{#1}{subsection}
+ {\marginnote[hsize = 4cm]{\quitvmode#2}}
+ {#2}}%
+ }
+
+\OutputRoutine close {headers}{shipout}
+
+%%% Redefining \TeX to look better with Chaparral.
+\def\TeX{%
+ T\kern-.13em
+ \lower.5ex \hbox {E}%
+ \kern-.03em X%
+ }
+% \TeX in bookmarks. Takes an argument because Interpreter changes all "TeX"
+% to "\TeX{}".
+\pdfdef\TeX#1{TeX}
+
+\def\gatecolor{\color{.8 0 0}}
+\def\gateaction#1{%
+ \directlua{pitex.callback.skip("french_punctuation")}%
+ \hbox{\gatecolor{{\codefont#1}}}%
+ }
+
+\def\describe#1#2{%
+ \needspace{2\baselineskip}%
+ \bgroup\codefont
+ \hsize=\maxdimen
+ \noindent
+ \gatecolor{\llap{\gateaction{\string#1}\kern.3em}%
+ #2\par\egroup}\removenextindent
+ \ignorespaces}
+
+\def\comarg{\arg{command}\antigobblespace}
+\def\textarg{\arg{text}}
+
+\setbox0=\hbox to \hsize{%
+ {\big \color{.8 0 0}{Gates}}%
+ \hfil
+ \vbox{%
+ \hbox{Paul Isambert}
+ \hbox{\codefont zappathustra@free.fr}
+ \hbox{Version 0.2}
+ \hbox{May 2012}}%
+ }
+\ht0=6\baselineskip \dp0=0pt
+\box0
+\vskip2\baselineskip
+
+\Section skip {section_break}{section}
+
+\input gates
+
+\hyphenation{my-other-list}
+
+\interpretfile{pitex}{gates-doc.txt}
+
+\bye