- Change parameter order in \providelength to match \setlength.

- Remove Part name from appendix and back matter headers.
This commit is contained in:
Silcantar
2025-08-24 22:33:29 -05:00
parent 662b4201ad
commit 7945ab0e6b
6 changed files with 18 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
\RequirePackage{PrimeTeX/packages/Layout}
\RequirePackage{PrimeTeX/packages/Color}
\providelength[0.5em]{\boxoutpadding}
\providelength{\boxoutpadding}[0.5em]
\colorlet{boxoutbgcolor}{PrimePaleBlue}
\colorlet{boxoutfgcolor}{PrimeBlue}

View File

@@ -49,7 +49,7 @@
}%
}
\providelength[12.3599pt]{\warningboxsizeoffset}
\providelength{\warningboxsizeoffset}[12.3599pt]
\NewDocumentCommand{\warningbox}{O{\textwidth-\warningboxsizeoffset} +m}{%
\noindent%

View File

@@ -7,8 +7,8 @@
\RequirePackage{wrapfig2}
\providelength[0.25in]{\iconsize}
\providelength[10pt]{\igh} % igh = Inline Graphics Height.
\providelength{\iconsize}[0.25in]
\providelength{\igh}[10pt] % igh = Inline Graphics Height.
% Shorthand command for \includegraphics.
\NewDocumentCommand{\ig}{O{width=0.5in} m}{%
@@ -51,10 +51,10 @@
\RequirePackage{tabularray}
\providelength[3pt]{\twinfigspace}
\providelength[
\providelength{\twinfigspace}[3pt]
\providelength{\twinfigwidth}[
\textwidth / 2 + \bigfloatoverhang - \twinfigspace
]{\twinfigwidth}
]
\NewDocumentCommand{\twinfig}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m m m >{\TrimSpaces}m m%

View File

@@ -17,14 +17,17 @@
\setlength{\outsideheaderoffset}{1.0in}
\NewDocumentCommand{\chapappname}{}{Chapter \thechapter{}: }
\NewDocumentCommand{\partlabel}{}{\partname{} \thepart{}: \parttitle}
\NewDocumentCommand{\Appendix}{}{
\appendix
\RenewDocumentCommand{\chapappname}{}{Appendix \thechapter{}: }
\RenewDocumentCommand{\partlabel}{}{}
}
\NewDocumentCommand{\BackMatter}{}{
\RenewDocumentCommand{\chapappname}{}{}
\RenewDocumentCommand{\partlabel}{}{}
}
\NewDocumentCommand{\parttitle}{}{}
@@ -35,13 +38,13 @@
\ifthenelse{\boolean{isElectronic}}{
\fancyhfoffset[L]{\insideheaderoffset}
\fancyhfoffset[R]{\outsideheaderoffset}
\fancyhead[L]{\partname{} \thepart{}: \parttitle}
\fancyhead[L]{\partlabel}
\fancyhead[R]{\chapappname{}\leftmark}
\fancyfoot[R]{\thepage}
}{
\fancyhfoffset[LE,RO]{\outsideheaderoffset}
\fancyhead[LE]{\partname{} \thepart{}: \parttitle}
\fancyhead[LE]{\partlabel}
\fancyhead[RO]{\chapappname\leftmark}
\fancyfoot[LE,RO]{\thepage}

View File

@@ -9,12 +9,12 @@
\hfuzz = 6.0pt
\vfuzz = 0.0pt
\providecommand{\providelength}[2][0pt]{%
\NewDocumentCommand{\providelength}{m O{0pt}}{%
\ifdeflength{#2}{% It is already defined!
}{% Not defined, so define it!
\newlength{#2}%
\newlength{#1}%
}%
\setlength{#2}{#1}%
\setlength{#1}{#2}%
}
\RequirePackage{microtype}
@@ -47,8 +47,9 @@
\RequirePackage{calc}
\RequirePackage[strict]{changepage}
\newlength{\contentwidth}
\setlength{\contentwidth}{\textwidth + \marginparsep + \marginparwidth}
%\newlength{\contentwidth}
\providelength{\marparwidth}[\marginparsep + \marginparwidth]
\providelength{\contentwidth}[\textwidth + \marparwidth]
\RequirePackage[balanced]{lua-widow-control}
\ifthenelse{\boolean{isDraft}}{