From 8e94f452fe9e303ed6e6eafc96bd378549a1c4d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 30 Jan 2022 15:43:42 +0100 Subject: [PATCH] add documentation for thmstyle --- doc/environments/thmstyle/.latexmkrc | 4 ++ doc/environments/thmstyle/Makefile | 8 +++ doc/environments/thmstyle/thmstyle.tex | 78 ++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 doc/environments/thmstyle/.latexmkrc create mode 100644 doc/environments/thmstyle/Makefile create mode 100644 doc/environments/thmstyle/thmstyle.tex diff --git a/doc/environments/thmstyle/.latexmkrc b/doc/environments/thmstyle/.latexmkrc new file mode 100644 index 0000000..4c81cd6 --- /dev/null +++ b/doc/environments/thmstyle/.latexmkrc @@ -0,0 +1,4 @@ +$makeindex = "makeindex -s gind.ist %O -o %D %S"; +$clean_ext .= ' glo'; +$clean_ext .= ' hd'; +$clean_ext .= ' ins'; diff --git a/doc/environments/thmstyle/Makefile b/doc/environments/thmstyle/Makefile new file mode 100644 index 0000000..e174370 --- /dev/null +++ b/doc/environments/thmstyle/Makefile @@ -0,0 +1,8 @@ +doc: + latexmk + +full: + latexmk -gg + +clean: + latexmk -C diff --git a/doc/environments/thmstyle/thmstyle.tex b/doc/environments/thmstyle/thmstyle.tex new file mode 100644 index 0000000..954aa33 --- /dev/null +++ b/doc/environments/thmstyle/thmstyle.tex @@ -0,0 +1,78 @@ +\documentclass[full]{l3doc} + +\title{The \pkg{thmstyle} package} +\author{Maximilian Keßler} + +\begin{document} + +\maketitle + +\begin{abstract} + Just a convenience package that provides easy-to-use interface + for creating \pkg{mdframed} and \pkg{thmtools} styles. + Also provides some defaults. +\end{abstract} + +\begin{documentation} + +\section{User macros} + +\begin{function}{\declarefancymdfstyle} + \begin{syntax} + \cs{declarefancymdfstyle}\oarg{background color}\marg{left margin color}\oarg{name} + \end{syntax} + Makes \meta{name} a \pkg{mdframed} style with given background and + left margin color. + + If \meta{name} is not given, it is defaulted to + \enquote{md\meta{left margin color}margin} + or + \enquote{md\meta{left margin color}and\meta{background color}fill} + corresponding to whether the \meta{background color} has been given. +\end{function} + +\begin{function}{\declarefancythmstyle} + \begin{syntax} + \cs{declarefancythmstyle}\oarg{background color}\marg{left margin color}\oarg{name} + \end{syntax} + + Same as \cs{declarefancymdstyle}, but directly declares a + style for \pkg{thmtools}. + The naming behaves the same except \texttt{md} is replaced with \texttt{thm} +\end{function} + +\section{Default styles} +\subsection{colors} +We use the \pkg{xcolor package}. + +You can load this package with the \texttt{default styles} option. +This will make the \pkg{thmtools} styles available given in +\autoref{tab:default-styles}. + +\begin{table}[htpb] + \centering + \begin{tabular}{c | c | c} + Name & Left margin color & Background color \\ + \hline + thmredmarginandfill & red & red!8 \\ + thmorangemarginandfill & orange & orange!10 \\ + thmbluemarginandfill & blue & blue!7 \\ + thmgreenmargin & green!70!black & none \\ + thmgoldmargin & RGB(218,165,32) & none \\ + thmyellowmargin & yellow!80!orange & none \\ + thmgraymargin & gray & none \\ + thmvioletmarginandfill & violet & violet!7 \\ + thmvioletmargin & violet & none \\ + thmredmarginandbuliefill & red & blue!7 \\ + thmredmargin & red & none \\ + thmorangemarginbluefill & orange & blue!7 \\ + thmblackmargindandfill & black & violet!20!gray!20 \\ + thmblackmargin & black & none \\ + \end{tabular} + \caption{Default styles provided by \pkg{thmstyle}} + \label{tab:default-styles} +\end{table} + +\end{documentation} + +\end{document}