Too many changes to list lol

This commit is contained in:
2025-08-21 13:30:51 -05:00
parent f3ac6f75ca
commit 9138161f91
11 changed files with 208 additions and 122 deletions

View File

@@ -1,3 +1,7 @@
\RequirePackage{PrimeTeX/packages/Boxout}
\RequirePackage{PrimeTeX/packages/Caption}
\ifthenelse{\boolean{isDarkMode}\AND\boolean{isElectronic}}{ \ifthenelse{\boolean{isDarkMode}\AND\boolean{isElectronic}}{
\RequirePackage[darkmode]{PrimeTeX/packages/Color} \RequirePackage[darkmode]{PrimeTeX/packages/Color}
}{ }{

View File

@@ -1,17 +1,50 @@
\ifthenelse{\boolean{isElectronic}}{
\newgeometry{ \newgeometry{
margin = 1in, %margin = 1in,
% twoside = true, inner = 48pt,
% inner = 1in, top = 1in,
% top = 1in, marginratio = 2:3,
% marginratio = 2:3,
} }
\savegeometry{smallMargin} \savegeometry{smallMargin}
\newgeometry{ \newgeometry{
margin = 0.25in, % margin = 0.25in,
% twoside = true, inner = 24pt,
% inner = 0.25in, top = 0.25in,
% top = 0.25in, marginratio = 2:3,
% marginratio = 2:3,}
} }
\savegeometry{tinyMargin} \savegeometry{tinyMargin}
}{
\newgeometry{
%margin = 1in,
twoside = true,
inner = 48pt,
top = 1in,
marginratio = 2:3,
}
\savegeometry{smallMargin}
\newgeometry{
%margin = 0.25in,
twoside = true,
inner = 24pt,
top = 0.25in,
marginratio = 2:3,
}
\savegeometry{tinyMargin}
}
\restoregeometry \restoregeometry
\NewDocumentEnvironment{SmallMargin}{O{0.0in} O{-0.25in}}{
\clearpage
\loadgeometry{smallMargin}
\providelength[\insideheaderoffset]{\defaultinsideheaderoffset}
\providelength[\outsideheaderoffset]{\defaultoutsideheaderoffset}
\setlength{\insideheaderoffset}{#1}
\setlength{\outsideheaderoffset}{#2}
\pagestyle{fancy}
}{
\clearpage
\setlength{\insideheaderoffset}{\defaultinsideheaderoffset}
\setlength{\outsideheaderoffset}{\defaultoutsideheaderoffset}
\pagestyle{fancy}
\restoregeometry
}

52
packages/Boxout.sty Normal file
View File

@@ -0,0 +1,52 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Boxout}[2025-08-20]
\RequirePackage{PrimeTeX/packages/Layout}
\RequirePackage{PrimeTeX/packages/Color}
\providelength[0.5em]{\boxoutpadding}
\colorlet{boxoutbgcolor}{PrimePaleBlue}
\colorlet{boxoutfgcolor}{PrimeBlue}
\NewDocumentCommand{\boxout}{%
O{0in} m m >{\TrimSpaces}m +m%
}{%
\begin{wrapfigure}{#2}[#1]%
\fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{#3}%
\vspace{\boxoutpadding}%
{\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#4}%
\setlength{\parskip}{\medskipamount}%
{\Centering\slab{\strong{#4}}\par}%
\justifying\small{}#5%
\end{minipage}%
\par}%
\vspace{\boxoutpadding}%
\end{minipage}%
}%
\end{wrapfigure}%
}
\NewDocumentCommand{\bigboxout}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m +m%
}{%
\bigfloat[#1]{figure}{#2}{%
\fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\vspace{\boxoutpadding}%
{\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#3}%
\setlength{\parskip}{\medskipamount}%
{\Centering\slab{\strong{#3}}\par}%
\justifying\small{}#4%
\end{minipage}%
\par}%
\vspace{\boxoutpadding}%
\end{minipage}%
}%
}%
}

30
packages/Caption.sty Normal file
View File

@@ -0,0 +1,30 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Caption}[2025-08-20]
\RequirePackage[
hypcap=true,
]{caption}
\captionsetup{
justification = Centering,
font = {
small,
color=PrimeBlue,
},
}
% Define a justification style that is ragged on the side toward the outside of
% the page. I. e. RaggedRight on
\RequirePackage{changepage}
%\RequirePackage{ifthen}
\DeclareCaptionJustification{RaggedOutside}{%
\ifthenelse{\boolean{isElectronic}}{%
\RaggedRight%
}{%
\checkoddpage%
\ifoddpage%
\RaggedRight%
\else%
\RaggedLeft%
\fi%
}%
}

View File

@@ -4,35 +4,7 @@
\RequirePackage{PrimeTeX/packages/Layout} \RequirePackage{PrimeTeX/packages/Layout}
% Graphics package for including images % Graphics package for including images
\RequirePackage{graphicx} \RequirePackage[final]{graphicx}
\RequirePackage[
hypcap=true,
]{caption}
\captionsetup{
justification = Centering,
font = {
small,
color=PrimeBlue,
},
}
% Define a justification style that is ragged on the side toward the outside of
% the page. I. e. RaggedRight on
\RequirePackage{changepage}
%\RequirePackage{ifthen}
\DeclareCaptionJustification{RaggedOutside}{%
\ifthenelse{\boolean{isElectronic}}{%
\RaggedRight%
}{%
\checkoddpage%
\ifoddpage%
\RaggedRight%
\else%
\RaggedLeft%
\fi%
}%
}
\RequirePackage{calc} \RequirePackage{calc}
@@ -40,8 +12,8 @@
\NewDocumentCommand{\iconsize}{}{0.25in} \NewDocumentCommand{\iconsize}{}{0.25in}
\NewDocumentCommand{\ig}{O{0.5in} m}{ \NewDocumentCommand{\ig}{O{width=0.5in} m}{
\includegraphics[keepaspectratio,width=#1]{#2} \includegraphics[keepaspectratio,#1]{#2}
} }
\NewDocumentCommand{\centerfig}{O{} m >{\TrimSpaces}m m}{ \NewDocumentCommand{\centerfig}{O{} m >{\TrimSpaces}m m}{
@@ -88,7 +60,7 @@
\NewDocumentCommand{\twinfig}{% \NewDocumentCommand{\twinfig}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m m m >{\TrimSpaces}m m% O{\bigfloatoverhang} m >{\TrimSpaces}m m m >{\TrimSpaces}m m%
}{% }{%
\bigfloat[#1]{figure}{htpb}{% \bigfloat[#1]{table}{htpb}{%
\begin{tblr}{% \begin{tblr}{%
colspec = {% colspec = {%
*{2}{Q[c,m,wd=\twinfigwidth]}% *{2}{Q[c,m,wd=\twinfigwidth]}%

View File

@@ -5,17 +5,29 @@
\RequirePackage{fancyhdr} \RequirePackage{fancyhdr}
\pagestyle{fancy} \pagestyle{fancy}
% Clear all header & footer formatting.
\fancyhf{} \fancyhf{}
\renewcommand{\headrulewidth}{0pt} \renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}
\newlength{\outsideheaderoffset}
\setlength{\outsideheaderoffset}{1.0in}
\newlength{\insideheaderoffset} \newlength{\insideheaderoffset}
\setlength{\insideheaderoffset}{0.5in} \setlength{\insideheaderoffset}{0.5in}
\newlength{\outsideheaderoffset}
\setlength{\outsideheaderoffset}{1.0in}
\NewDocumentCommand{\parttitle}{} \NewDocumentCommand{\chapappname}{}{Chapter \thechapter{}: }
\NewDocumentCommand{\Appendix}{}{
\appendix
\RenewDocumentCommand{\chapappname}{}{Appendix \thechapter{}: }
}
\NewDocumentCommand{\BackMatter}{}{
\RenewDocumentCommand{\chapappname}{}{}
}
\NewDocumentCommand{\parttitle}{}{}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}} \renewcommand{\chaptermark}[1]{\markboth{#1}{}}
@@ -24,13 +36,13 @@
\fancyhfoffset[L]{\insideheaderoffset} \fancyhfoffset[L]{\insideheaderoffset}
\fancyhfoffset[R]{\outsideheaderoffset} \fancyhfoffset[R]{\outsideheaderoffset}
\fancyhead[L]{\partname{} \thepart{}: \parttitle} \fancyhead[L]{\partname{} \thepart{}: \parttitle}
\fancyhead[R]{\chaptername{} \thechapter{}: \leftmark} \fancyhead[R]{\chapappname{}\leftmark}
\fancyfoot[R]{\thepage} \fancyfoot[R]{\thepage}
}{ }{
\fancyhfoffset[LE,RO]{\outsideheaderoffset} \fancyhfoffset[LE,RO]{\outsideheaderoffset}
\fancyhead[LE]{\partname{} \thepart{}: \parttitle} \fancyhead[LE]{\partname{} \thepart{}: \parttitle}
\fancyhead[RO]{\chaptername{} \thechapter{}: \leftmark} \fancyhead[RO]{\chapappname\leftmark}
\fancyfoot[LE,RO]{\thepage} \fancyfoot[LE,RO]{\thepage}
} }
@@ -42,8 +54,11 @@
\renewcommand{\footrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt}
\ifthenelse{\boolean{isElectronic}}{ \ifthenelse{\boolean{isElectronic}}{
\fancyhfoffset[L]{\insideheaderoffset}
\fancyhfoffset[R]{\outsideheaderoffset}
\fancyfoot[R]{\thepage} \fancyfoot[R]{\thepage}
}{ }{
\fancyhfoffset[LE,RO]{\outsideheaderoffset}
\fancyfoot[LE,RO]{\thepage} \fancyfoot[LE,RO]{\thepage}
} }
} }

View File

@@ -3,6 +3,11 @@
% Suppress warning about \showhyphens being changed. % Suppress warning about \showhyphens being changed.
\let\CheckCommand\providecommand \let\CheckCommand\providecommand
% Suppress "Underfull \hbox" infos.
\hbadness=10000
% Suppress small overfill infos.
\hfuzz = 6.0pt
\vfuzz = 0.0pt
\providecommand{\providelength}[2][0pt]{% \providecommand{\providelength}[2][0pt]{%
\ifdeflength{#2}{% It is already defined! \ifdeflength{#2}{% It is already defined!
@@ -14,6 +19,7 @@
\RequirePackage{microtype} \RequirePackage{microtype}
% Page Layout
\RequirePackage[ \RequirePackage[
letterpaper, letterpaper,
width = 4.75in, % 342pt, width = 4.75in, % 342pt,
@@ -27,7 +33,11 @@
footskip = 0.5in, % 36pt, footskip = 0.5in, % 36pt,
]{geometry} ]{geometry}
% Page Layout \ifthenelse{\boolean{isDraft}}{
\geometry{showcrop}
% \geometry{showframe}
}{}
\ifthenelse{\boolean{isElectronic}}{ \ifthenelse{\boolean{isElectronic}}{
% \geometry{} % \geometry{}
}{ }{
@@ -40,15 +50,9 @@
\newlength{\contentwidth} \newlength{\contentwidth}
\setlength{\contentwidth}{\textwidth + \marginparsep + \marginparwidth} \setlength{\contentwidth}{\textwidth + \marginparsep + \marginparwidth}
% Widow & Orphan control.
% \RequirePackage[
% defaultlines = 4,
% all,
% ]{nowidow}
\RequirePackage[balanced]{lua-widow-control} \RequirePackage[balanced]{lua-widow-control}
\ifthenelse{\boolean{isDraft}}{ \ifthenelse{\boolean{isDraft}}{
\lwcsetup{draft} \lwcsetup{draft=false,showcolours=true}
}{} }{}
% Paragraph formatting. % Paragraph formatting.
@@ -73,7 +77,7 @@
% Line-breaking zero-width space % Line-breaking zero-width space
\NewDocumentCommand{\zws}{}{\hspace{0pt}} \NewDocumentCommand{\zws}{}{\hspace{0pt}}
% Line-breaking dot % Line-breaking dot
\NewDocumentCommand{\bdot}{}{.\hspace{0pt}} \NewDocumentCommand{\bdot}{}{.\zws}
\newlength{\bigfloatoffset} \newlength{\bigfloatoffset}
\setlength{\bigfloatoffset}{0.25in} \setlength{\bigfloatoffset}{0.25in}
@@ -83,66 +87,30 @@
\setlength{\bigfloatoverhang}{0.81in} \setlength{\bigfloatoverhang}{0.81in}
\NewDocumentCommand{\bigfloat}{O{\bigfloatoverhang} m m +m}{% \NewDocumentCommand{\bigfloat}{O{\bigfloatoverhang} m m +m}{%
\providelength[\fboxsep]{\fboxsepdefault}%
\setlength{\fboxsep}{0pt}%
\begin{#2}[#3]% \begin{#2}[#3]%
\ifthenelse{\boolean{isElectronic}}{ \ifthenelse{\boolean{isElectronic}}{%
% adjustwidth adjusts all pages the same.
\begin{adjustwidth}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}% \begin{adjustwidth}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}%
\begin{minipage}{#1 * 2 + \textwidth}% \begin{minipage}{#1 * 2 + \textwidth}%
\ifthenelse{\boolean{isDraft}}{%
\rule{\textwidth}{1pt}\zws%
}{}%
#4% #4%
\end{minipage}% \end{minipage}%
\end{adjustwidth}% \end{adjustwidth}%
}{ }{%
% adjustwidth* accounts for twosided document.
\begin{adjustwidth*}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}% \begin{adjustwidth*}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}%
\begin{minipage}{#1 * 2 + \textwidth}% \begin{minipage}{#1 * 2 + \textwidth}%
\ifthenelse{\boolean{isDraft}}{%
\rule{\textwidth}{1pt}\zws%
}{}%
#4% #4%
\end{minipage}% \end{minipage}%
\end{adjustwidth*}% \end{adjustwidth*}%
} }%
\end{#2}% \end{#2}%
} \setlength{\fboxsep}{\fboxsepdefault}%
\providelength[0.5em]{\boxoutpadding}
\colorlet{boxoutbgcolor}{PrimePaleBlue}
\colorlet{boxoutfgcolor}{PrimeBlue}
\NewDocumentCommand{\boxout}{%
O{0in} m m >{\TrimSpaces}m +m%
}{%
\begin{wrapfigure}{#2}[#1]%
\fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{#3}%
\vspace{\boxoutpadding}%
{\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#4}%
\setlength{\parskip}{\medskipamount}%
{\Centering\slab{\strong{#4}}\par}%
\justifying\small{}#5%
\end{minipage}%
\par}%
\vspace{\boxoutpadding}%
\end{minipage}%
}%
\end{wrapfigure}%
}
\NewDocumentCommand{\bigboxout}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m +m%
}{%
\bigfloat[#1]{figure}{#2}{%
\fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\vspace{\boxoutpadding}%
{\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#3}%
\setlength{\parskip}{\medskipamount}%
{\Centering\slab{\strong{#3}}\par}%
\justifying\small{}#4%
\end{minipage}%
\par}%
\vspace{\boxoutpadding}%
\end{minipage}%
}%
}%
} }

View File

@@ -7,9 +7,17 @@
\RequirePackage{hyperref} \RequirePackage{hyperref}
\ifthenelse{\boolean{isElectronic}}{ \ifthenelse{\boolean{isElectronic}}{
\hypersetup{colorlinks=true, allcolors=PrimeBlue} \hypersetup{
final,
colorlinks=true,
allcolors=PrimeBlue,
}
}{ }{
\hypersetup{colorlinks=true, allcolors=textColor} \hypersetup{
final,
colorlinks=true,
allcolors=textColor
}
} }
\RequirePackage{hypcap} \RequirePackage{hypcap}

View File

@@ -5,11 +5,15 @@
\RequirePackage{tabularray} \RequirePackage{tabularray}
% Enable putting a list in a tabularray % Enable putting a list in a tabularray
\UseTblrLibrary{varwidth} %\UseTblrLibrary{varwidth}
\renewcommand{\TblrOverlap}[1]{#1}
% \DeclareTblrTemplate{note-tag}{default}{
% \textsuperscript{\textrm{\InsertTblrNoteTag}}
% }
%\DeclareTblrTemplate{note-sep}{default}{\space}
\DeclareTblrTemplate{note-tag}{default}{
\textsuperscript{\textrm{\InsertTblrNoteTag}}
}
\DeclareTblrTemplate{remark-tag}{default}{ \DeclareTblrTemplate{remark-tag}{default}{
\strong{\InsertTblrRemarkTag} \strong{\InsertTblrRemarkTag}
} }

View File

@@ -7,7 +7,7 @@
\NewDocumentCommand{\PrimeTitlePage}{O{}}{ \NewDocumentCommand{\PrimeTitlePage}{O{}}{
\begin{titlepage} \begin{titlepage}
\begin{sbfamily} \begin{sbfamily}
{\RaggedRight\noindent\large {\noindent\large\raggedright
\vspace*{\stretch{1}} \vspace*{\stretch{1}}
\sCustomerFull \sCustomerFull

View File

@@ -6,13 +6,13 @@
\renewcommand{\thepart}{\arabic{part}} \renewcommand{\thepart}{\arabic{part}}
\titleformat{\part}[display]{ \titleformat{\part}[display]{
\normalfont\sbfamily\huge\Centering \normalfont\sbfamily\huge
}{ }{
\partname{} \thepart \partname{} \thepart
}{20pt}{\Huge} }{20pt}{\Huge}
\titleformat{\chapter}[display]{ \titleformat{\chapter}[display]{
\normalfont\sbfamily\huge\RaggedRight \normalfont\sbfamily\huge\raggedright
}{ }{
\chaptertitlename{} \thechapter \chaptertitlename{} \thechapter
}{20pt}{\Huge} }{20pt}{\Huge}