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{luamesh}
9 \RequirePackage{fontspec}
10 \RequirePackage{metalogo, xspace, ifmtarg, xargs, fancyvrb}
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}
18 \usepackage{unicode-math}
19 \setmainfont{Libertinus Serif}
20 \setmathfont{Libertinus Math}
24 \newcommand*\simplelogo [1] {%
25 \ifcsname #1\endcsname \else \badlogocommand \fi
26 \lowercase{\expandafter\simple@logo\expandafter{%
27 \csname #1\expandafter\endcsname\expandafter}}\expandafter{%
28 \csname #1\endcsname}{#1}}
29 \newcommand*\simple@logo [3] {%
30 \newcommand #1 {#2\xspace}%
31 \pdfstringdefDisableCommands{\def#1{#3\space}}}
33 \providecommand \ConTeXt {Con\TeX{}t}
34 \providecommand \pdfTeX {pdf\TeX}
35 \providecommand \TeXLive {\TeX\thinspace Live}
36 \providecommand \MiKTeX {MiK\TeX}
41 \simplelogo {LuaLaTeX}
49 \colorlet{code}{blue!80!black}
50 \fvset{formatcom=\color{code}}
52 \catcode`\ 10 % non-breakable space
54 \newcommand*\email [1] {<\href{mailto:#1}{#1}>}
56 {\href{http://mirror.ctan.org/#1}{\nolinkurl{#1}}}
57 \newcommand \file {\nolinkurl}
58 \newcommand*\note [1] {\noindent\textsf{\bfseries #1.}\quad\ignorespaces}
59 \newcommand \cmd {\texttt}
60 \newcommand \code [1] {\texorpdfstring {\texttt{\color{code}#1}} {#1}}
61 \newcommand*\cs [1] {\code{\textbackslash #1}}
63 \newcommandx*\para [2][2] {%
64 \@ifmtarg{#2}{\para@{#1}{#1}}{\para@{#1}{#2}}}
65 \newcommand \para@ [2] {%
67 \hypertarget{para.#2}{}%
68 \belowpdfbookmark{#1}{para.#2}%
72 \textsf{\bfseries #1\quad}}%
75 \newcommandx*\pararef [3][1, 3] {%
76 \@ifmtarg{#3}{\para@ref{#1}{#2}{#2}}{\para@ref{#1}{#2}{#3}}}
77 \newcommand \para@ref [3] {%
78 \hyperlink{para.#3}{#1{#2}}}
79 \newcommand*\parapageref [1] {%
82 \newcommand \pf {\textsf}
83 \newcommand \pk {\pararef[\pf]}
85 \newcommandx*\pkdesc [6][6] {%
87 \pkditem {Engines} {#3}
88 \pkditem {Formats} {#4}
89 \pkditem {Authors} [\\]{#2}
90 \pkditem {CTAN location} [\\]{#5}[\ctan]
91 \pkditem {Development url} [\\]{#6}[\url]
94 \newcommandx*\pkditem [4][2,4] {\@ifnotmtarg{#3}{%
95 #2\textsf{\bfseries #1:} #4{#3}.%
99 \newenvironment{myquote}{%
100 \list{}{\leftmargin0pt \rightmargin1em}%