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