Refactoring Boxouts.

This commit is contained in:
2025-08-26 17:00:31 -05:00
parent 7945ab0e6b
commit 1ce3cd364f
5 changed files with 207 additions and 99 deletions

View File

@@ -41,17 +41,14 @@
\colorlet{boxedcoloroutline}{black}
\NewDocumentCommand{\boxedcolor}{O{\rule{0pt}{1ex}\rule{1ex}{0pt}} m m}{%
{ % Temporarily set fboxrule and fboxsep.
\setlength{\fboxrule}{0.2pt}%
\setlength{\fboxsep}{1pt}%
%
\fcolorbox{boxedcoloroutline}{#2}{\color{#3}\strut{}#1}%
}%
{\setlength{\fboxrule}{0.2pt}% Temporarily set \fboxrule and \fboxsep.
\setlength{\fboxsep}{1pt}%
\fcolorbox{boxedcoloroutline}{#2}{\color{#3}\strut{}#1}}%
}
\providelength{\warningboxsizeoffset}[12.3599pt]
\providelength{\warningboxwidth}[\textwidth - \fboxsep * 2 - \fboxrule *2]
\NewDocumentCommand{\warningbox}{O{\textwidth-\warningboxsizeoffset} +m}{%
\NewDocumentCommand{\warningbox}{O{\warningboxwidth} +m}{%
\noindent%
\fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{%
\noindent%