- Refine boxedcolor macro.

- Tentatively replace nowidow package with lua-widow-control.
This commit is contained in:
2025-08-18 16:13:23 -05:00
parent c914902f59
commit 89340afd62
4 changed files with 243 additions and 53 deletions

View File

@@ -38,14 +38,23 @@
\RequirePackage{PrimeTeX/packages/Layout}
\newcommand{\boxedcolor}[1]{%
\colorlet{boxedcoloroutline}{black}
\newcommand{\boxedcolor}[3][\rule{0pt}{1ex}\rule{1ex}{0pt}]{%
\providelength[\fboxsep]{\fboxsepdefault}%
\setlength{\fboxsep}{2pt}%
\fcolorbox{black}{#1}{{\rule{0pt}{1ex}\rule{1ex}{0pt}}}%
\providelength[\fboxrule]{\fboxruledefault}%
%
\setlength{\fboxsep}{1pt}%
\setlength{\fboxrule}{0.2pt}
%
\fcolorbox{boxedcoloroutline}{#2}{\color{#3}\strut{}#1}%
%
\setlength{\fboxsep}{\fboxsepdefault}%
\setlength{\fboxrule}{\fboxruledefault}%
}
\providelength[12.3599pt]{\warningboxsizeoffset}
\newcommand{\warningbox}[2][\textwidth - \warningboxsizeoffset]{%
\noindent%
\fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{%

View File

@@ -41,10 +41,15 @@
\setlength{\contentwidth}{\textwidth + \marginparsep + \marginparwidth}
% Widow & Orphan control.
\RequirePackage[
defaultlines = 4,
all,
]{nowidow}
% \RequirePackage[
% defaultlines = 4,
% all,
% ]{nowidow}
\RequirePackage{lua-widow-control}
\ifthenelse{\boolean{isDraft}}{
\lwcdraft{draft}
}{}
% Paragraph formatting.
\setlength{\parindent}{0pt}