\luatexsuppresslongerror1%% sigh ... %% Copyright (C) 2009-2014 %% %% by Elie Roux %% and Khaled Hosny %% and Philipp Gesang %% %% This file is part of Luaotfload. %% %% Home: https://github.com/lualatex/luaotfload %% Support: . %% %% Luaotfload is under the GPL v2.0 (exactly) license. %% %% ---------------------------------------------------------------------------- %% %% Luaotfload is free software; you can redistribute it and/or %% modify it under the terms of the GNU General Public License %% as published by the Free Software Foundation; version 2 %% of the License. %% %% Luaotfload is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% %% You should have received a copy of the GNU General Public License %% along with Luaotfload; if not, see . %% %% ---------------------------------------------------------------------------- %% \documentclass{ltxdoc} \makeatletter \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 \usepackage[ bookmarks=true, colorlinks=true, linkcolor=\primarycolor, urlcolor=\secondarycolor, citecolor=\primarycolor, 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} \setmainfont[ % Numbers = OldStyle, %% buggy with font cache Ligatures = TeX, BoldFont = {Linux Libertine O Bold}, ItalicFont = {Linux Libertine O Italic}, SlantedFont = {Linux Libertine O Italic}, ]{Linux Libertine O} \setmonofont[Ligatures=TeX,Scale=MatchLowercase]{Liberation Mono} %setsansfont[Ligatures=TeX]{Linux Biolinum O} \setsansfont[Ligatures=TeX,Scale=MatchLowercase]{Iwona Medium} %setmathfont{XITS Math} \usepackage{hologo} \newcommand\TEX {\TeX\xspace} \newcommand\LUA {Lua\xspace} \newcommand\PDFTEX {pdf\TeX\xspace} \newcommand\LUATEX {Lua\TeX\xspace} \newcommand\XETEX {\XeTeX\xspace} \newcommand\LATEX {\LaTeX\xspace} \newcommand\LUALATEX {Lua\LaTeX\xspace} \newcommand\CONTEXT {Con\TeX t\xspace} \newcommand\OpenType {\identifier{Open\kern-.25ex Type}\xspace} \def\definehighlight[#1][#2]% {\ifcsname #1\endcsname\else \expandafter\def\csname #1\endcsname% {\bgroup#2\csname #1_indeed\endcsname} \expandafter\def\csname #1_indeed\endcsname##1% {##1\egroup}% \fi} \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 \newcommand*\email[1]{\href{mailto:#1}{#1}} \renewcommand\partname{Part}%% gets rid of the stupid “file” heading \usepackage{syntax}%% bnf for font request syntax \usepackage{titlesec} \def\movecountertomargin#1{\llap{\rmfamily\upshape#1\hskip2em}} \def\zeropoint{0pt} \titleformat \part {\normalsize\rmfamily\bfseries} {\movecountertomargin\thepart} \zeropoint {} \titleformat \section {\normalsize\rmfamily\scshape} {\movecountertomargin\thesection} \zeropoint {} \titleformat \subsection {\small\rmfamily\itshape} {\movecountertomargin\thesubsection} \zeropoint {} \titleformat \subsubsection {\normalsize\rmfamily\upshape} {\movecountertomargin\thesubsubsection} \zeropoint {} \usepackage{tocloft} \renewcommand \cftpartfont {\rmfamily\upshape} \renewcommand \cftsecfont {\rmfamily\upshape} \renewcommand \cftsubsecfont {\rmfamily\upshape} \setlength \cftbeforepartskip {1ex} \setlength \cftbeforesecskip {1ex} \VerbatimFootnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% structurals %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \definestructural #1{% \expandafter \let \csname end#1\endcsname \relax \expandafter \def \csname begin#1\endcsname {% \@ifnextchar[{\csname begin#1indeed\endcsname} {\csname begin#1indeed\endcsname[]}% } \expandafter \def \csname begin#1indeed\endcsname [##1]##2{% \edef \first {##1}% \ifx \first \empty \csname #1\endcsname [##2]{##2}% \else \csname #1\endcsname [\first]{##2}% \fi } } \definestructural {section} \definestructural {subsection} \definestructural {subsubsection} \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|…|. \usepackage {listings} \lstset { basicstyle=\ttfamily, } \def \inlinecode #1{% \lstinline {#1}% } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% codelistings; this sucks hard since we lack access to buffers %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \newcount \othercatcode \othercatcode 12 \newcount \activecatcode \othercatcode 13 \newluatexcatcodetable \vrbcatcodes \setluatexcatcodetable \vrbcatcodes {% \luatexcatcodetable \CatcodeTableIniTeX \catcode 9 \othercatcode %% \tabasciicode \catcode 13 \othercatcode %% \endoflineasciicode \catcode 12 \othercatcode %% \formfeedasciicode \catcode 26 \othercatcode %% \endoffileasciicode \catcode 32 \othercatcode %% \spaceasciicode } \newluatexcatcodetable \literalcatcodes \setluatexcatcodetable \literalcatcodes {% \luatexcatcodetable \CatcodeTableString \catcode 32 \activecatcode %% \spaceasciicode } \def \beginlisting {% \begingroup \luatexcatcodetable \vrbcatcodes \beginlistingindeed% } \directlua { local texprint = tex.print document = document or { } document.printlines = function (buffer) for _, line in next, string.explode (buffer, "\noexpand\n") do texprint (-1, line) texprint (-1, "") end end } \def \beginlistingindeed#1\endlisting{% \endgroup \begingroup \ttfamily \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 \directlua{document.printlines ([==[\detokenize {#1}]==])} \egroup \end {quote} \endgroup } %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% enumerations and lists %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \definelist [#1]#2{% name, itemcode \expandafter \def \csname begin#1\endcsname {% \begin {itemize} \let \normalitem = \item \def \altitem ####1{% \def \first {####1}% #2 } } \expandafter \def \csname end#1\endcsname {% \end {itemize} } } \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}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% columns %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \begindoublecolumns {\begin {multicols} {2}} \def \enddoublecolumns {\end {multicols}} \def \begintriplecolumns {\begin {multicols} {3}} \def \endtriplecolumns {\end {multicols}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% alignment %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \def \begincentered {\begin {center}} \def \endcentered {\end {center}} \def \beginnarrower {\begin {quote}} \def \endnarrower {\end {quote}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% special elements %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \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}