From 22caa4363c76153ba2ac1ef896ca5d08f5c34236 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Mon, 17 Feb 2014 07:35:44 +0100
Subject: [doc] wrap further code in more abstract macros

---
 doc/luaotfload-latex.tex | 64 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index d00a617..dcdcab2 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -156,6 +156,18 @@
 
 \def \fakesection #1{\section*{#1}}
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% inline verbatim
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Context offers both \type{…} and \type<<…>>, but not an unbalanced
+%% one that we could map directly onto Latex’s \verb|…|.
+
+%% TODO
+%\def \inlinecode·#1·{%
+  %\verb·#1·%
+%}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% codelistings; this sucks hard since we lack access to buffers
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -203,6 +215,7 @@
     \small
     \begin {quote}
       \bgroup
+        \addfontfeature {RawFeature=-tlig;-liga}%% So one can’t just turn them all off at once using the ``Ligatures`` key?
         \luatexcatcodetable \literalcatcodes
         \obeyspaces
         \obeylines
@@ -254,7 +267,6 @@
 
 \def \begincentered {\begin {center}}
 \def \endcentered   {\end {center}}
-\makeatother
 
 \def \beginnarrower {\begin {quote}}
 \def \endnarrower   {\end {quote}}
@@ -266,10 +278,60 @@
 \def \beginabstractcontent {\begin {abstract}}
 \def \endabstractcontent   {\end {abstract}}
 
+\let \setdocumenttitle      \title
+\let \setdocumentdate       \date
+\let \setdocumentauthor     \author
+\let \typesetdocumenttitle  \maketitle
+
+\let \typesetcontent        \tableofcontent
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% figure floats
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\def \beginsyntaxfloat #1{%% the request syntax diagram
+  \begin {figure} [b]
+    \def \syntaxcaption {#1}%
+    \setlength\grammarparsep{12pt plus 2pt minus 2pt}%
+    \setlength\grammarindent{5cm}%
+    \begingroup
+      \small
+      \begin {grammar}
+}
+
+\def \endsyntaxfloat {%
+      \end {grammar}
+    \endgroup
+    \caption \syntaxcaption
+    \label{font-syntax}
+  \end {figure}
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% hyperlinks
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\protected \def \hyperlink{%
+  \@ifnextchar[{\hyperlinkindeed}%
+               {\hyperlinkindeed[]}%
+}
+
+\def \hyperlinkindeed [#1]#2{%
+  \def \first {#1}%
+  \ifx \first \empty
+    \url {#2}%
+  \else
+    \href {#2}{#1}%
+  \fi%
+}
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% main
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+\makeatother
+
 \begin {document}
   \input {luaotfload-main.tex}
 \end {document}
-- 
cgit v1.2.3


From a7d9c930f9f0c688a2530bd23e59f0cd830fc9d6 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Tue, 25 Feb 2014 07:02:39 +0100
Subject: [doc] move Latex inline verbatim commands to listings

---
 doc/luaotfload-latex.tex | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index dcdcab2..58c8793 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -34,11 +34,11 @@
 
 \makeatletter
 
-\usepackage{metalogo,multicol,mdwlist,fancyvrb,xspace}
-\usepackage[x11names]{xcolor}
+\usepackage {metalogo,multicol,mdwlist,fancyvrb,xspace}
+\usepackage [x11names] {xcolor}
 
-\def\primarycolor{DodgerBlue4}  %%-> rgb  16  78 139 | #104e8b
-\def\secondarycolor{Goldenrod4} %%-> rgb 139 105 200 | #8b6914
+\def \primarycolor   {DodgerBlue4} %%-> rgb  16  78 139 | #104e8b
+\def \secondarycolor {Goldenrod4}  %%-> rgb 139 105 200 | #8b6914
 
 \usepackage[
     bookmarks=true,
@@ -46,14 +46,14 @@
     linkcolor=\primarycolor,
      urlcolor=\secondarycolor,
     citecolor=\primarycolor,
-     pdftitle={The luaotfload package},
+     pdftitle={The Luaotfload package},
    pdfsubject={OpenType layout system for Plain TeX and LaTeX},
     pdfauthor={Elie Roux & Khaled Hosny & Philipp Gesang},
   pdfkeywords={luatex, lualatex, unicode, opentype}
 ]{hyperref}
 
-\usepackage{fontspec}
-\usepackage{unicode-math}
+\usepackage {fontspec}
+\usepackage {unicode-math}
 
 \setmainfont[
 % Numbers     = OldStyle, %% buggy with font cache
@@ -163,10 +163,14 @@
 %% Context offers both \type{…} and \type<<…>>, but not an unbalanced
 %% one that we could map directly onto Latex’s \verb|…|.
 
-%% TODO
-%\def \inlinecode·#1·{%
-  %\verb·#1·%
-%}
+\usepackage {listings}
+\lstset {
+  basicstyle=\ttfamily,
+}
+
+\def \inlinecode #1{%
+  \lstinline {#1}%
+}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% codelistings; this sucks hard since we lack access to buffers
-- 
cgit v1.2.3


From 07d7f65c89e51d356145560dc6acfaded011398e Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Wed, 26 Feb 2014 07:08:04 +0100
Subject: [doc] move description and figure environment to more abstract macros

---
 doc/luaotfload-latex.tex | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index 58c8793..0e86b83 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -248,9 +248,10 @@
   }
 }
 
-\definelist  [definitions]{\normalitem {\fileent {\first}}}
-\definelist     [filelist]{\normalitem {\fileent {\first}}\space--\hskip 1em}
-\definelist [functionlist]{\normalitem {\luafunction {\first}}\hfill\break}
+\definelist  [descriptions]{\normalitem {\textbf \first}\hfill\break}
+\definelist   [definitions]{\normalitem {\fileent {\first}}}
+\definelist      [filelist]{\normalitem {\fileent {\first}}\space--\hskip 1em}
+\definelist  [functionlist]{\normalitem {\luafunction {\first}}\hfill\break}
 
 \def \beginenumeration {\begin {enumerate}}
 \def \endenumeration   {\end {enumerate}}
@@ -293,9 +294,11 @@
 %% figure floats
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def \beginsyntaxfloat #1{%% the request syntax diagram
+%% syntax definition
+\def \beginsyntaxfloat #1#2{%% #1:label #2:caption
   \begin {figure} [b]
-    \def \syntaxcaption {#1}%
+    \edef \syntaxlabel  {#1}%
+    \def \syntaxcaption {#2}%
     \setlength\grammarparsep{12pt plus 2pt minus 2pt}%
     \setlength\grammarindent{5cm}%
     \begingroup
@@ -307,10 +310,24 @@
       \end {grammar}
     \endgroup
     \caption \syntaxcaption
-    \label{font-syntax}
+    \label   \syntaxlabel
   \end {figure}
 }
 
+%% figures, e.g. the file graph
+\def \beginfigurefloat #1#2{%% #1:label #2:caption
+  \begingroup
+    \begin {figure} [b]
+      \edef \figurelabel {#1}%
+      \caption {#2}%
+}
+
+\def \endfigurefloat {%
+      \label \figurelabel
+    \end {figure}
+  \endgroup
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% hyperlinks
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3


From 959794804e53aaea76298cba35ccb6c3f347fb1c Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Tue, 4 Mar 2014 06:45:57 +0100
Subject: [doc] move table floats and inline code snippets to new macros

---
 doc/luaotfload-latex.tex | 43 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 36 insertions(+), 7 deletions(-)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index 0e86b83..e0afe45 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -89,12 +89,16 @@
 
 \def\restoreunderscore{\catcode`\_=12\relax}
 
-\definehighlight    [fileent][\ttfamily\restoreunderscore]         %% files, dirs
-\definehighlight   [texmacro][\sffamily\itshape\textbackslash]     %% cs
-\definehighlight[luafunction][\sffamily\itshape\restoreunderscore] %% lua identifiers
-\definehighlight [identifier][\sffamily]                           %% names
-\definehighlight     [abbrev][\rmfamily\scshape]                   %% acronyms
-\definehighlight   [emphasis][\rmfamily\slshape]                   %% level 1 emph
+\definehighlight      [fileent][\ttfamily\restoreunderscore]         %% files, dirs
+\definehighlight     [texmacro][\sffamily\itshape\textbackslash]     %% cs
+\definehighlight  [luafunction][\sffamily\itshape\restoreunderscore] %% lua identifiers
+\definehighlight   [identifier][\sffamily]                           %% names
+\definehighlight       [abbrev][\rmfamily\scshape]                   %% acronyms
+\definehighlight     [emphasis][\rmfamily\slshape]                   %% level 1 emph
+
+\definehighlight    [Largefont][\Large]                              %% font size
+\definehighlight    [smallcaps][\sc]                                 %% font feature
+\definehighlight [proportional][\tt]                                 %% font switch
 
 \newcommand*\email[1]{\href{mailto:#1}{#1}}
 
@@ -291,7 +295,7 @@
 \let \typesetcontent        \tableofcontent
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% figure floats
+%% floats
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 %% syntax definition
@@ -328,6 +332,24 @@
   \endgroup
 }
 
+%% tables
+
+\def \begintablefloat #1#2{%% #1:label #2:caption
+  \begingroup
+    \begin {table} [t]
+      \hrule
+      \edef \floatlabel {#1}%
+      \caption {#2}%
+}
+
+\def \endtablefloat {%
+      \label \floatlabel
+      \hrule
+    \end {table}
+  \endgroup
+}
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% hyperlinks
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -347,6 +369,13 @@
 }
 
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% escaped characters
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\let \charpercent   \textpercent
+\let \charbackslash \textbackslash
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% main
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3


From fba29372991e64a7ee36366988d2da59be03f728 Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Wed, 5 Mar 2014 22:42:53 +0100
Subject: [doc] move tables to more abstract syntax

---
 doc/luaotfload-latex.tex | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index e0afe45..80e741c 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -369,12 +369,36 @@
 }
 
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% tables
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Our tables aren’t anything special so we stick with “tabular” on the
+%% Latex end.
+%%
+%% This is going to be largely incompatible with Context since format
+%% specifications work quite differently (even between different
+%% Context table variants).
+
+\def \begintabulate [#1]#2\endtabulate{%
+  \begingroup
+    \let \beginrow  = \relax %% -> \NC in Context
+    \let \newcell   = &      %% -> \NC
+    \let \endrow    = \cr    %% -> \NC \NR
+    \begin {tabular}{#1}%
+      #2
+    \end {tabular}
+  \endgroup
+}
+
+\let \endtabulate \relax
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% escaped characters
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \let \charpercent   \textpercent
 \let \charbackslash \textbackslash
+\let \chartilde     \textasciitilde
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% main
-- 
cgit v1.2.3


From 7ccc3a604d4856e00c2274512bbca85d015ace2f Mon Sep 17 00:00:00 2001
From: Philipp Gesang <phg42.2a@gmail.com>
Date: Fri, 7 Mar 2014 06:54:25 +0100
Subject: [doc] erase gpl from pdf

---
 doc/luaotfload-latex.tex | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'doc/luaotfload-latex.tex')

diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index 80e741c..42799bf 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -257,9 +257,6 @@
 \definelist      [filelist]{\normalitem {\fileent {\first}}\space--\hskip 1em}
 \definelist  [functionlist]{\normalitem {\luafunction {\first}}\hfill\break}
 
-\def \beginenumeration {\begin {enumerate}}
-\def \endenumeration   {\end {enumerate}}
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% columns
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -267,9 +264,6 @@
 \def \begindoublecolumns {\begin {multicols} {2}}
 \def \enddoublecolumns   {\end {multicols}}
 
-\def \begintriplecolumns {\begin {multicols} {3}}
-\def \endtriplecolumns   {\end {multicols}}
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% alignment
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-- 
cgit v1.2.3

