- Make all packages Expl3.
- Replace ifthen dependency with wrappers for Latex3 conditionals. - Debug CrossRef and WrapBoxout.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{PrimeTeX/packages/Layout}%{2025-09-03}{1.0}{Layout.}
|
||||
\ProvidesExplPackage{PrimeTeX/packages/Layout}{2025-09-03}{1.0}{Layout.}
|
||||
|
||||
% Suppress warning about \showhyphens being changed.
|
||||
\let\CheckCommand\providecommand
|
||||
@@ -21,7 +21,7 @@
|
||||
% Suppress "Underfull \hbox" infos.
|
||||
\hbadness=10000
|
||||
|
||||
\ifthenelse{\boolean{isDraft}}{
|
||||
\bool_if:NTF \g_draft_bool{
|
||||
\geometry{showframe}
|
||||
\hfuzz = 0.5pt
|
||||
\vfuzz = 0.0pt
|
||||
@@ -44,7 +44,7 @@
|
||||
footskip = 0.5in, % 36pt,
|
||||
}
|
||||
|
||||
\ifthenelse{\boolean{isElectronic}}{
|
||||
\bool_if:NTF \g_electronic_bool {
|
||||
% \geometry{}
|
||||
}{
|
||||
\geometry{twoside}
|
||||
@@ -65,7 +65,7 @@
|
||||
\ProvideLength{\marparwidth}[\marginparsep + \marginparwidth]
|
||||
\ProvideLength{\contentwidth}[\textwidth + \marparwidth]
|
||||
|
||||
\ifthenelse{\boolean{isDraft}}{
|
||||
\bool_if:NTF \g_draft_bool{
|
||||
\lwcsetup{showcolours=true,}
|
||||
}{}
|
||||
|
||||
@@ -89,24 +89,26 @@
|
||||
\renewcommand{\dblfloatpagefraction}{0.8} % require fuller float pages
|
||||
|
||||
\NewDocumentEnvironment{SmartAdjustWidth}{
|
||||
O{\boolean{isElectronic}}
|
||||
O{\IsElectronic}
|
||||
m
|
||||
m
|
||||
+b
|
||||
}{%
|
||||
\ifthenelse{#1}{%
|
||||
\begin{adjustwidth}{#2}{#3}%
|
||||
#4%
|
||||
\end{adjustwidth}%
|
||||
}{%
|
||||
\begin{adjustwidth*}{#2}{#3}%
|
||||
#4%
|
||||
\end{adjustwidth*}%
|
||||
}%
|
||||
}{
|
||||
\bool_if:nTF {#1} {
|
||||
\begin{adjustwidth}{#2}{#3}
|
||||
#4
|
||||
\end{adjustwidth}
|
||||
}{
|
||||
\begin{adjustwidth*}{#2}{#3}
|
||||
#4
|
||||
\end{adjustwidth*}
|
||||
}
|
||||
}{}
|
||||
|
||||
|
||||
\ExplSyntaxOff
|
||||
\AtBeginDocument{
|
||||
\ifthenelse{\boolean{isElectronic}}{
|
||||
\If{\IsElectronic}{
|
||||
\newgeometry{
|
||||
inner = 0.75in,
|
||||
top = 66pt, % 11/12in
|
||||
@@ -119,7 +121,7 @@
|
||||
marginratio = 2:3,
|
||||
}
|
||||
\savegeometry{tinyMargin}
|
||||
}{
|
||||
}[
|
||||
\newgeometry{
|
||||
twoside = true,
|
||||
inner = 0.75in,
|
||||
@@ -134,7 +136,7 @@
|
||||
marginratio = 2:3,
|
||||
}
|
||||
\savegeometry{tinyMargin}
|
||||
}
|
||||
]
|
||||
\restoregeometry
|
||||
|
||||
\NewDocumentEnvironment{SmallMargin}{O{0.0in} O{-0.25in}}{
|
||||
|
||||
Reference in New Issue
Block a user