Debian Codegraph @

texmf-dist/doc/lualatex/luamesh/luameshdoc.cls

raw
1 % copy of the private class for lualatex-doc, lltxdoc.sty. 2017 version.
2 % see lualatex-doc.tex for copying conditions
3 % Manuel Pégourié-Gonnard
4
5 \ProvidesClass{luameshdoc}
6
7 \LoadClass[a4paper]{scrartcl}
8 \RequirePackage{luamesh}
9 \RequirePackage{fontspec}
10 \RequirePackage{metalogo, xspace, ifmtarg, xargs, fancyvrb}
11 \RequirePackage[backend=biber,sorting=ynt]{biblatex}
12 \RequirePackage[english]{babel}
13
14 \RequirePackage[colorlinks=true]{hyperref}
15
16 %\RequirePackage{bookmark}
17
18 \defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}
19 % \setmainfont{Linux Libertine O}
20 %\setmainfont{Slabo 27px}
21 \usepackage{unicode-math}
22 \setmainfont{Libertinus Serif}
23 \setmathfont{Libertinus Math}
24 \setsansfont{Kurier}
25 \setmonofont{Monaco}
26
27 \newcommand*\simplelogo [1] {%
28 \ifcsname #1\endcsname \else \badlogocommand \fi
29 \lowercase{\expandafter\simple@logo\expandafter{%
30 \csname #1\expandafter\endcsname\expandafter}}\expandafter{%
31 \csname #1\endcsname}{#1}}
32 \newcommand*\simple@logo [3] {%
33 \newcommand #1 {#2\xspace}%
34 \pdfstringdefDisableCommands{\def#1{#3\space}}}
35
36 \providecommand \ConTeXt {Con\TeX{}t}
37 \providecommand \pdfTeX {pdf\TeX}
38 \providecommand \TeXLive {\TeX\thinspace Live}
39 \providecommand \MiKTeX {MiK\TeX}
40
41 \simplelogo {TeX}
42 \simplelogo {LaTeX}
43 \simplelogo {LuaTeX}
44 \simplelogo {LuaLaTeX}
45 \simplelogo {XeTeX}
46 \simplelogo {XeLaTeX}
47 \simplelogo {ConTeXt}
48 \simplelogo {pdfTeX}
49 \simplelogo {MiKTeX}
50 \simplelogo {TeXLive}
51
52 \colorlet{code}{blue!80!black}
53 \fvset{formatcom=\color{code}}
54 \DefineShortVerb|
55 \catcode`\ 10 % non-breakable space
56
57 \newcommand*\email [1] {<\href{mailto:#1}{#1}>}
58 \newcommand*\ctan [1]
59 {\href{http://mirror.ctan.org/#1}{\nolinkurl{#1}}}
60 \newcommand \file {\nolinkurl}
61 \newcommand*\note [1] {\noindent\textsf{\bfseries #1.}\quad\ignorespaces}
62 \newcommand \cmd {\texttt}
63 \newcommand \code [1] {\texorpdfstring {\texttt{\color{code}#1}} {#1}}
64 \newcommand*\cs [1] {\code{\textbackslash #1}}
65
66 \newcommandx*\para [2][2] {%
67 \@ifmtarg{#2}{\para@{#1}{#1}}{\para@{#1}{#2}}}
68 \newcommand \para@ [2] {%
69 \par \medskip
70 \hypertarget{para.#2}{}%
71 \belowpdfbookmark{#1}{para.#2}%
72 \noindent
73 \label{para.#2}%
74 \makebox [0pt][r] {%
75 \textsf{\bfseries #1\quad}}%
76 \ignorespaces
77 }
78 \newcommandx*\pararef [3][1, 3] {%
79 \@ifmtarg{#3}{\para@ref{#1}{#2}{#2}}{\para@ref{#1}{#2}{#3}}}
80 \newcommand \para@ref [3] {%
81 \hyperlink{para.#3}{#1{#2}}}
82 \newcommand*\parapageref [1] {%
83 \autopagref{para.#1}}
84
85 \newcommand \pf {\textsf}
86 \newcommand \pk {\pararef[\pf]}
87
88 \newcommandx*\pkdesc [6][6] {%
89 \para {#1}
90 \pkditem {Engines} {#3}
91 \pkditem {Formats} {#4}
92 \pkditem {Authors} [\\]{#2}
93 \pkditem {CTAN location} [\\]{#5}[\ctan]
94 \pkditem {Development url} [\\]{#6}[\url]
95 \newline
96 }
97 \newcommandx*\pkditem [4][2,4] {\@ifnotmtarg{#3}{%
98 #2\textsf{\bfseries #1:} #4{#3}.%
99 }}
100
101
102 \newenvironment{myquote}{%
103 \list{}{\leftmargin0pt \rightmargin1em}%
104 \item\relax
105 \small
106 }{%
107 \endlist
108 }