1 % private class for lualatex-doc
2 % see lualatex-doc.tex for copying conditions
3 % Manuel Pégourié-Gonnard
5 \ProvidesClass{lltxdoc}
7 \LoadClass[a4paper]{scrartcl}
8 \RequirePackage{fontspec}
9 \RequirePackage{metalogo, xspace, ifmtarg, xargs, fancyvrb}
10 \RequirePackage[table]{xcolor}
11 \RequirePackage[english]{babel}
12 \RequirePackage[colorlinks=true]{hyperref}
13 \RequirePackage{bookmark}
15 \defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
16 % \setmainfont{Linux Libertine O}
17 \setmainfont{Slabo 27px}
21 \newcommand*\simplelogo [1] {%
22 \ifcsname #1\endcsname \else \badlogocommand \fi
23 \lowercase{\expandafter\simple@logo\expandafter{%
24 \csname #1\expandafter\endcsname\expandafter}}\expandafter{%
25 \csname #1\endcsname}{#1}}
26 \newcommand*\simple@logo [3] {%
27 \newcommand #1 {#2\xspace}%
28 \pdfstringdefDisableCommands{\def#1{#3\space}}}
30 \providecommand \ConTeXt {Con\TeX{}t}
31 \providecommand \pdfTeX {pdf\TeX}
32 \providecommand \TeXLive {\TeX\thinspace Live}
33 \providecommand \MiKTeX {MiK\TeX}
38 \simplelogo {LuaLaTeX}
46 \colorlet{code}{blue!80!black}
47 \fvset{formatcom=\color{code}}
49 \catcode`\ 10 % non-breakable space
51 \newcommand*\email [1] {<\href{mailto:#1}{#1}>}
53 {\href{http://mirror.ctan.org/#1}{\nolinkurl{#1}}}
54 \newcommand \file {\nolinkurl}
55 \newcommand*\note [1] {\noindent\textsf{\bfseries #1.}\quad\ignorespaces}
56 \newcommand \cmd {\texttt}
57 \newcommand \code [1] {\texorpdfstring {\texttt{\color{code}#1}} {#1}}
58 \newcommand*\cs [1] {\code{\textbackslash #1}}
60 \newcommandx*\para [2][2] {%
61 \@ifmtarg{#2}{\para@{#1}{#1}}{\para@{#1}{#2}}}
62 \newcommand \para@ [2] {%
64 \hypertarget{para.#2}{}%
65 \belowpdfbookmark{#1}{para.#2}%
69 \textsf{\bfseries #1\quad}}%
72 \newcommandx*\pararef [3][1, 3] {%
73 \@ifmtarg{#3}{\para@ref{#1}{#2}{#2}}{\para@ref{#1}{#2}{#3}}}
74 \newcommand \para@ref [3] {%
75 \hyperlink{para.#3}{#1{#2}}}
76 \newcommand*\parapageref [1] {%
79 \newcommand \pf {\textsf}
80 \newcommand \pk {\pararef[\pf]}
82 \newcommandx*\pkdesc [6][6] {%
84 \pkditem {Engines} {#3}
85 \pkditem {Formats} {#4}
86 \pkditem {Authors} [\\]{#2}
87 \pkditem {CTAN location} [\\]{#5}[\ctan]
88 \pkditem {Development url} [\\]{#6}[\url]
91 \newcommandx*\pkditem [4][2,4] {\@ifnotmtarg{#3}{%
92 #2\textsf{\bfseries #1:} #4{#3}.%
96 \newenvironment{myquote}{%
97 \list{}{\leftmargin0pt \rightmargin1em}%