summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty')
-rw-r--r--macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty106
1 files changed, 106 insertions, 0 deletions
diff --git a/macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty b/macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty
new file mode 100644
index 0000000000..87ff66da0b
--- /dev/null
+++ b/macros/latex/contrib/mathsemantics/mathsemantics-documentation-local.sty
@@ -0,0 +1,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}}