- 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

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 218 KiB

View File

@@ -7,47 +7,47 @@
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:export-ydpi="300"
inkscape:export-xdpi="300"
inkscape:export-filename="D:\OneDrive - Prime Controls\Customers\NTMWD\Projects\2157030 - NTMWD Transmission System SCADA Network Split\Training\graphics\prime_heartbeat.png"
sodipodi:docname="prime_heartbeat.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 4.93892 9.1722798"
width="14pt"
height="26pt"
width="14pt">
viewBox="0 0 4.93892 9.1722798"
version="1.1"
id="svg8"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="prime_heartbeat.svg"
inkscape:export-filename="D:\OneDrive - Prime Controls\Customers\NTMWD\Projects\2157030 - NTMWD Transmission System SCADA Network Split\Training\graphics\prime_heartbeat.png"
inkscape:export-xdpi="300"
inkscape:export-ydpi="300">
<defs
id="defs2">
<inkscape:perspective
id="perspective865"
inkscape:persp3d-origin="60.854552 : 3.5277998 : 1"
inkscape:vp_z="121.70911 : 4.9389197 : 1"
inkscape:vp_y="0 : 999.99997 : 0"
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 4.9389197 : 1"
sodipodi:type="inkscape:persp3d" />
inkscape:vp_y="0 : 999.99997 : 0"
inkscape:vp_z="121.70911 : 4.9389197 : 1"
inkscape:persp3d-origin="60.854552 : 3.5277998 : 1"
id="perspective865" />
</defs>
<sodipodi:namedview
inkscape:pagecheckerboard="true"
inkscape:window-maximized="0"
inkscape:window-y="0"
inkscape:window-x="873"
inkscape:window-height="1360"
inkscape:window-width="1678"
units="pt"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="pt"
inkscape:cy="1.4030163"
inkscape:cx="21.449826"
inkscape:zoom="15.839192"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
id="base"
pagecolor="#ffffff"
id="base" />
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="15.839192"
inkscape:cx="21.449826"
inkscape:cy="1.4030163"
inkscape:document-units="pt"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="pt"
inkscape:window-width="1678"
inkscape:window-height="1360"
inkscape:window-x="2553"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:pagecheckerboard="true" />
<metadata
id="metadata5">
<rdf:RDF>
@@ -56,28 +56,28 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer"
inkscape:label="Layer 1">
id="layer1">
<path
sodipodi:nodetypes="ccccccccccccc"
d="M 1.4107754,0 V 3.5278 L 1.05834,3.5279723 H 0 V 4.2333599 5.6446523 L 3.5274554,9.1726244 V 5.6444799 l 0.3529524,1.724e-4 h 1.05834 V 4.2333599 3.5279723 Z"
id="path833-3"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="path833-3" />
d="m 3.5281444,0 v 3.5278 l 0.3524354,1.723e-4 h 1.05834 V 4.2333599 5.6446523 L 1.4114644,9.1726244 V 5.6444799 L 1.058512,5.6446523 H 1.72e-4 V 4.2333599 3.5279723 Z"
sodipodi:nodetypes="ccccccccccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 4.9389198,4.9389198 -1e-7,0.7055599 -3.5277998,3.5277999 V 5.2916998 L 1.05834,5.6444798 H 0 v -0.70556 H 0.70556 L 2.1166799,3.5277999 V 7.4083797 L 4.5861397,4.9389198 Z"
id="path833"
sodipodi:nodetypes="cccccccccccc" />
<path
sodipodi:nodetypes="cccccccccccc"
id="path833"
d="M 0,4.9389198 7.2338335e-8,5.6444797 3.5277999,9.1722796 V 5.2916998 l 0.3527799,0.35278 h 1.05834 v -0.70556 h -0.70556 L 2.8222399,3.5277999 V 7.4083797 L 0.35278007,4.9389198 Z"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:#192d91;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 4.9389198,3.5277999 C 3.7629865,2.3518666 2.5870532,1.1759333 1.4111199,0 V 3.8805798 L 1.05834,3.5277999 H 0 v 0.7055599 h 0.70556004 l 1.41111986,1.41112 V 1.7638999 l 2.4694599,2.4694599 h 0.35278 z"
id="path833-0"
sodipodi:nodetypes="cccccccccccc" />
d="M 0,3.5277999 C 1.1759333,2.3518666 2.3518666,1.1759333 3.5277999,0 V 3.8805798 L 3.8805798,3.5277999 h 1.05834 v 0.7055599 h -0.70556 l -1.4111199,1.41112 V 1.7638999 L 0.35278,4.2333598 H 0 Z"
style="fill:#192d91;fill-opacity:1;stroke:none;stroke-width:0.264585px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

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}