Debian Codegraph @

texmf-dist/doc/latex/mathsemantics/mathsemantics-documentation-local.sty

raw
1 % commands used in the docs.
2 \ProvidesPackage{mathsemantics-documentation-local}
3 \RequirePackage{fontawesome5}
4 % Load the metalogo package (which provides the \XeTeX command)
5 \RequirePackage{metalogo}
6
7 \RequirePackage{xcolor}
8 \RequirePackage{lineno}
9 \RequirePackage{scrdate}
10 \RequirePackage{lastpage}
11 \RequirePackage{scrlayer-scrpage}
12 \RequirePackage{stmaryrd}
13 \RequirePackage{enumitem}
14 \RequirePackage{ccicons}
15 \usepackage[useregional]{datetime2}
16 \RequirePackage{minted}
17 \usemintedstyle{vs}
18 % load fonts
19 \RequirePackage{microtype}
20 \RequirePackage[proportional]{libertine}
21 \RequirePackage[libertine,liby]{newtxmath}
22 \RequirePackage[scaled=0.95,varqu,varl]{inconsolata}
23
24 \RequirePackage{hyperref}
25 \RequirePackage[nameinlink,capitalize,noabbrev]{cleveref}
26 % Load Package - after minted
27 \RequirePackage[shortbb]{mathsemantics}
28
29 \definecolor{TolMutedBlue}{HTML}{332288}
30 \definecolor{TolMutedGreen}{HTML}{117733}
31 \definecolor{TolMutedWine}{HTML}{882255}
32
33 \crefformat{footnote}{#2\footnotemark[#1]#3}
34 \hypersetup{
35 pdfpagemode=UseOutlines,
36 colorlinks=true,
37 linkcolor=TolMutedBlue,
38 filecolor=TolMutedWine,
39 urlcolor=TolMutedWine,
40 citecolor=TolMutedGreen,
41 plainpages=false,
42 hypertexnames=false
43 }
44
45
46 % Set up the appearance of author, date, title, and section headings etc.
47 \renewcommand*{\sectfont}{\color{TolMutedBlue}\sffamily}
48 \setkomafont{author}{\large\normalfont\sffamily}
49 \setkomafont{date}{\large\normalfont\sffamily}
50 \setkomafont{title}{\color{TolMutedBlue}\normalfont\sffamily\scshape}
51 \addtokomafont{pageheadfoot}{\normalfont\sffamily\footnotesize}
52 \addtokomafont{section}{\scshape}
53 \addtokomafont{subsection}{\scshape}
54 \addtokomafont{subsubsection}{\scshape\itshape}
55 \pagestyle{scrheadings}
56 \KOMAoptions{headsepline=true}
57 \KOMAoptions{footsepline=true}
58 \KOMAoptions{plainfootsepline=true}
59
60 \rohead[]{mathsemantics.sty}
61 \lehead[]{R. Bergmann}
62 \refoot[]{\ISOToday}
63 \cofoot[]{\ccbysa}
64 \ofoot[page~\thepage~of~\pageref*{LastPage}]{page~\thepage~of~\pageref*{LastPage}}
65 \useosf
66
67 % Define a command which displays a command inline
68 \NewDocumentCommand\codeCommand{v}{\mintinline{LaTeX}|#1|}
69
70 % Define a command which displays code and renders its results
71 \NewDocumentCommand\codeExample{v}{%
72 \faIcon{code}\hspace{.25cm}%
73 \mintinline{LaTeX}{#1}
74 \hspace{.5cm}\faEye[regular]\hspace{.25cm}%
75 \scantokens{#1\noexpand}%
76 }
77
78 % Define a command which just renders the result but does not display the code
79 \NewDocumentCommand\justCodeExample{v}{%
80 \faEye[regular]\hspace{.25cm}%
81 \scantokens{#1\noexpand}%
82 }
83
84 % Define a command which displays code and renders its results in math mode
85 \NewDocumentCommand\mathCodeExample{v}{%
86 \faIcon{code}$_{\hspace{-.5ex}\text{\color{TolMutedGreen}\faIcon{dollar-sign}}}$\hspace{.125cm}%
87 \mintinline{LaTeX}{#1}
88 \hspace{.5cm}
89 \faEye[regular]\hspace{.125cm}\scantokens{$\displaystyle #1\noexpand$}%
90 }
91
92 \newcommand{\mathsemanticsWarning}{{ \color{TolVibrantOrange}\faIcon{exclamation-triangle}\ }}
93 \newcommand{\file}[1]{\nolinkurl{#1}}
94
95 % Define a command which displays colors
96 \NewDocumentCommand\colorExample{v}{%
97 \faIcon{tint}%
98 \hspace{.25cm}
99 \makebox[.3\textwidth][l]{\textcolor{#1}{#1}}%
100 \hspace{.5cm}%
101 \colorbox{#1}{\textcolor{white}{\faIcon{fill}}\hspace{.25cm}#1\hspace{.25cm}}%
102 }
103
104 % Define a new description type list
105 \newenvironment{commandlist}{\begin{description}[style=multiline,leftmargin=.25\textwidth,font=\texttt]}{\end{description}}
106 \newenvironment{dictionarylist}{\begin{description}[style=multiline,leftmargin=.5\textwidth,font=\textbf, topsep=0pt,itemsep=-1.1ex,partopsep=1ex,parsep=1ex]}{\end{description}}