integrate documentation of thmstyle into dtx file

This commit is contained in:
Maximilian Keßler 2022-01-31 00:25:06 +01:00
parent 5437b8606c
commit 97a2df27b5
2 changed files with 74 additions and 75 deletions

View File

@ -1,78 +1,5 @@
\documentclass[full]{l3doc}
\title{The \pkg{thmstyle} package}
\author{Maximilian Keßler}
\usepackage{mkessler-todo}
\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}
\DocInput{../../../src/environments/thmstyle/thmstyle.dtx}
\end{document}

View File

@ -47,9 +47,81 @@
%
% \begin{documentation}
%
% \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}
%
% \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{DeclareFancyMdfStyle}, 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}
%
% \begin{variable}{gold}
%
% Golden color.
%
%
% \end{variable}
%
% 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 & gold & 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}
%
%
%
%
% \begin{implementation}