- Replace all \newcommands with \NewDocumentCommand.

- Add Ragged2e dependency for better alignment options.
- Refine marginalia, widow control.
This commit is contained in:
Silcantar
2025-08-18 22:00:52 -05:00
parent 89340afd62
commit 0c84476fc5
12 changed files with 115 additions and 110 deletions

View File

@@ -56,12 +56,12 @@
\input{PrimeTeX/commonincludes.def} \input{PrimeTeX/commonincludes.def}
\newcommand{\IfAdminManual}[2]{ \NewDocumentCommand{\IfAdminManual}{+m +m}{
\ifthenelse{\boolean{isAdminManual}}{#1}{#2} \ifthenelse{\boolean{isAdminManual}}{#1}{#2}
} }
\newcommand{\IfElectronic}[2]{ \NewDocumentCommand{\IfElectronic}{+m +m}{
\ifthenelse{\boolean{isElectronic}}{#1}{#2} \ifthenelse{\boolean{isElectronic}}{#1}{#2}
} }
\newcommand{\rem}[1]{} \NewDocumentCommand{\rem}{+m}{}

View File

@@ -40,7 +40,7 @@
\colorlet{boxedcoloroutline}{black} \colorlet{boxedcoloroutline}{black}
\newcommand{\boxedcolor}[3][\rule{0pt}{1ex}\rule{1ex}{0pt}]{% \NewDocumentCommand{\boxedcolor}{O{\rule{0pt}{1ex}\rule{1ex}{0pt}} m m}{%
\providelength[\fboxsep]{\fboxsepdefault}% \providelength[\fboxsep]{\fboxsepdefault}%
\providelength[\fboxrule]{\fboxruledefault}% \providelength[\fboxrule]{\fboxruledefault}%
% %
@@ -55,7 +55,7 @@
\providelength[12.3599pt]{\warningboxsizeoffset} \providelength[12.3599pt]{\warningboxsizeoffset}
\newcommand{\warningbox}[2][\textwidth - \warningboxsizeoffset]{% \NewDocumentCommand{\warningbox}{O{\textwidth-\warningboxsizeoffset} +m}{%
\noindent% \noindent%
\fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{% \fcolorbox{WarningBoxFGColor}{WarningBoxBGColor}{%
\noindent% \noindent%

View File

@@ -2,48 +2,48 @@
\ProvidesPackage{PrimeTeX/packages/CrossRef}[2025-07-09] \ProvidesPackage{PrimeTeX/packages/CrossRef}[2025-07-09]
% Cross references % Cross references
\newcommand{\refPart}[2][Part~]{#1\ref{pt:#2}} \NewDocumentCommand{\refPart}{O{Part~} m}{#1\ref{pt:#2}}
\newcommand{\refChapter}[2][Chapter~]{#1\ref{ch:#2}} \NewDocumentCommand{\refChapter}{O{Chapter~} m}{#1\ref{ch:#2}}
\newcommand{\refAppendix}[2][Appendix~]{#1\ref{ch:#2}} \NewDocumentCommand{\refAppendix}{O{Appendix~} m}{#1\ref{ch:#2}}
\newcommand{\refSection}[2][Section~]{#1\ref{sec:#2}} \NewDocumentCommand{\refSection}{O{Section~} m}{#1\ref{sec:#2}}
\newcommand{\refSubsection}[2][Subsection~]{#1\ref{subsec:#2}} \NewDocumentCommand{\refSubsection}{O{Subsection~} m}{#1\ref{subsec:#2}}
\newcommand{\refSubsubsection}[2][Sub-subsection~]{#1\ref{sssec:#2}} \NewDocumentCommand{\refSubsubsection}{O{Sub-subsection~} m}{#1\ref{sssec:#2}}
\newcommand{\refParagraph}[2][Paragraph]{#1\ref{par:#2}} \NewDocumentCommand{\refParagraph}{O{Paragraph} m}{#1\ref{par:#2}}
\newcommand{\refSubparagraph}[2][Subparagraph~]{#1\ref{subpar:#2}} \NewDocumentCommand{\refSubparagraph}{O{Subparagraph~} m}{#1\ref{subpar:#2}}
\newcommand{\refTable}[2][Table~]{#1\ref{tbl:#2}} \NewDocumentCommand{\refTable}{O{Table~} m}{#1\ref{tbl:#2}}
\newcommand{\refFigure}[2][Figure~]{#1\ref{fig:#2}} \NewDocumentCommand{\refFigure}{O{Figure~} m}{#1\ref{fig:#2}}
\newcommand{\lblGeneral}[4][]{ \NewDocumentCommand{\lblGeneral}{>{\TrimSpaces}O{} >{\TrimSpaces}m m >{\TrimSpaces}m}{
\if\relax\detokenize{#1}\relax % Check if #1 is empty string. \if\relax\detokenize{#1}\relax % Check if #1 is empty string.
#3{#2}\label{#4:#2} #3{#2}\label{#4:#2}
\else \else
#3{#2}\label{#4:#1} #3{#2}\label{#4:#1}
\fi \fi
} }
\newcommand{\lblPart}[2][]{ \NewDocumentCommand{\lblPart}{O{} m}{
\lblGeneral[#1]{#2}{\part}{pt} \lblGeneral[#1]{#2}{\part}{pt}
} }
\newcommand{\lblChapter}[2][]{ \NewDocumentCommand{\lblChapter}{O{} m}{
\lblGeneral[#1]{#2}{\chapter}{ch} \lblGeneral[#1]{#2}{\chapter}{ch}
} }
\newcommand{\lblSection}[2][]{ \NewDocumentCommand{\lblSection}{O{} m}{
\lblGeneral[#1]{#2}{\section}{sec} \lblGeneral[#1]{#2}{\section}{sec}
} }
\newcommand{\lblSubsection}[2][]{ \NewDocumentCommand{\lblSubsection}{O{} m}{
\lblGeneral[#1]{#2}{\subsection}{subsec} \lblGeneral[#1]{#2}{\subsection}{subsec}
} }
\newcommand{\lblSubsubsection}[2][]{ \NewDocumentCommand{\lblSubsubsection}{O{} m}{
\lblGeneral[#1]{#2}{\subsubsection}{sssec} \lblGeneral[#1]{#2}{\subsubsection}{sssec}
} }
\newcommand{\lblParagraph}[2][]{ \NewDocumentCommand{\lblParagraph}{O{} m}{
\lblGeneral[#1]{#2}{\paragraph}{par} \lblGeneral[#1]{#2}{\paragraph}{par}
} }
\newcommand{\lblSubparagraph}[2][]{ \NewDocumentCommand{\lblSubparagraph}{O{} m}{
\lblGeneral[#1]{#2}{\subparagraph}{subpar} \lblGeneral[#1]{#2}{\subparagraph}{subpar}
} }
\newcommand{\lblTable}[2][]{ \NewDocumentCommand{\lblTable}{O{} m}{
\lblGeneral[#1]{#2}{\caption}{tbl} \lblGeneral[#1]{#2}{\caption}{tbl}
} }
\newcommand{\lblFigure}[2][]{ \NewDocumentCommand{\lblFigure}{O{} m}{
\lblGeneral[#1]{#2}{\caption}{fig} \lblGeneral[#1]{#2}{\caption}{fig}
} }

View File

@@ -9,13 +9,13 @@
\DeclareRobustCommand*{\version}[1]{\gdef\@version{#1}} \DeclareRobustCommand*{\version}[1]{\gdef\@version{#1}}
% Macros to insert document properties. % Macros to insert document properties.
\newcommand{\sTitle}{\makeatletter{\@title}} \NewDocumentCommand{\sTitle}{}{\makeatletter{\@title}}
\newcommand{\sAuthor}{\makeatletter{\@author}} \NewDocumentCommand{\sAuthor}{}{\makeatletter{\@author}}
\newcommand{\sDate}{\makeatletter{\@date}} \NewDocumentCommand{\sDate}{}{\makeatletter{\@date}}
\newcommand{\sCustomer}{\makeatletter{\@customer}} \NewDocumentCommand{\sCustomer}{}{\makeatletter{\@customer}}
\newcommand{\sCustomerFull}{\makeatletter{\@customerFull}} \NewDocumentCommand{\sCustomerFull}{}{\makeatletter{\@customerFull}}
\newcommand{\sProjectNumber}{\makeatletter{\@projectNumber}} \NewDocumentCommand{\sProjectNumber}{}{\makeatletter{\@projectNumber}}
\newcommand{\sProjectDesc}{\makeatletter{\@projectDesc}} \NewDocumentCommand{\sProjectDesc}{}{\makeatletter{\@projectDesc}}
\newcommand{\sProjectTitle}{\makeatletter{Project \@projectNumber : \@projectDesc}} \NewDocumentCommand{\sProjectTitle}{}{\makeatletter{Project \@projectNumber : \@projectDesc}}
\newcommand{\sVersion}{\makeatletter{\@version}} \NewDocumentCommand{\sVersion}{}{\makeatletter{\@version}}
%#endregion %#endregion

View File

@@ -4,7 +4,7 @@
% Specify Fonts % Specify Fonts
\RequirePackage{fontspec} \RequirePackage{fontspec}
\newcommand{\fontpath}{PrimeTeX/fonts} \NewDocumentCommand{\fontpath}{}{PrimeTeX/fonts}
% Main font: Roboto Serif % Main font: Roboto Serif
\setmainfont{RobotoSerif}[ \setmainfont{RobotoSerif}[
@@ -48,13 +48,13 @@
BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic, BoldItalicFont = RobotoSerif/RobotoSerif-ExtraBoldItalic,
] ]
\newcommand{\serif}[1]{\textrm{#1}} \NewDocumentCommand{\serif}{m}{\textrm{#1}}
\newcommand{\sans}[1]{\textsf{#1}} \NewDocumentCommand{\sans}{m}{\textsf{#1}}
\newcommand{\mono}[1]{\texttt{#1}} \NewDocumentCommand{\mono}{m}{\texttt{#1}}
\newcommand{\slab}[1]{{\sbfamily{}#1}} \NewDocumentCommand{\slab}{m}{{\sbfamily{}#1}}
\newcommand{\code}[1]{\mono{\small{}#1}} \NewDocumentCommand{\code}{m}{\mono{\small{}#1}}
\newcommand{\objref}[1]{{\sans{\strong{#1}}}} \NewDocumentCommand{\objref}{m}{{\sans{\strong{#1}}}}
\RequirePackage{amssymb} \RequirePackage{amssymb}

View File

@@ -10,7 +10,7 @@
hypcap=true, hypcap=true,
]{caption} ]{caption}
\captionsetup{ \captionsetup{
justification = centering, justification = Centering,
font = { font = {
small, small,
color=PrimeBlue, color=PrimeBlue,
@@ -18,59 +18,62 @@
} }
% Define a justification style that is ragged on the side toward the outside of % Define a justification style that is ragged on the side toward the outside of
% the page. I. e. % the page. I. e. RaggedRight on
\RequirePackage{changepage} \RequirePackage{changepage}
%\RequirePackage{ifthen} %\RequirePackage{ifthen}
\DeclareCaptionJustification{raggedoutside}{ \DeclareCaptionJustification{RaggedOutside}{%
\checkoddpage \ifthenelse{\boolean{isElectronic}}{%
\ifoddpage \RaggedRight%
\raggedright }{%
\else \checkoddpage%
\raggedleft \ifoddpage%
\fi \RaggedRight%
\else%
\RaggedLeft%
\fi%
}%
} }
\RequirePackage{calc} \RequirePackage{calc}
\RequirePackage{wrapfig2} \RequirePackage{wrapfig2}
\newcommand{\iconsize}{0.25in} \NewDocumentCommand{\iconsize}{}{0.25in}
\newcommand{\ig}[2][0.5in]{ \NewDocumentCommand{\ig}{O{0.5in} m}{
\includegraphics[keepaspectratio,width=#1]{#2} \includegraphics[keepaspectratio,width=#1]{#2}
} }
\newcommand{\cfig}[4]{% \NewDocumentCommand{\centerfig}{O{} m >{\TrimSpaces}m m}{
}
\newcommand{\centerfig}[4][]{
\begin{figure}[htpb]% \begin{figure}[htpb]%
\centering% \Centering%
\includegraphics[keepaspectratio,#1]{#2}% \includegraphics[keepaspectratio,#1]{#2}%
\caption{#4}% \caption{#4}%
\label{fig:#3}% \label{fig:#3}%
\end{figure}% \end{figure}%
} }
\newcommand{\bigfig}[4][\bigfloatoverhang]{% \NewDocumentCommand{\bigfig}{O{\bigfloatoverhang} m >{\TrimSpaces}m m}{%
\bigfloat[#1]{figure}{htpb}{% \bigfloat[#1]{figure}{htpb}{%
\captionsetup{type=figure}% \captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#2}% \includegraphics[keepaspectratio,width=\textwidth]{#2}%
\centering\captionof{figure}{#4}\par% \Centering\captionof{figure}{#4}\par%
\label{fig:#3}% \label{fig:#3}%
}% }%
} }
\newcommand{\doublebigfig}[7][\bigfloatoverhang]{% \NewDocumentCommand{\doublebigfig}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m m m >{\TrimSpaces}m m%
}{%
\bigfloat[#1]{figure}{p}{% \bigfloat[#1]{figure}{p}{%
\captionsetup{type=figure}% \captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#2}% \includegraphics[keepaspectratio,width=\textwidth]{#2}%
\centering\captionof{figure}{#4}\par% \Centering\captionof{figure}{#4}\par%
\label{fig:#3} \label{fig:#3}
\bigskip \bigskip
\captionsetup{type=figure}% \captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#5}% \includegraphics[keepaspectratio,width=\textwidth]{#5}%
\centering\captionof{figure}{#7}\par% \Centering\captionof{figure}{#7}\par%
\label{fig:#6}% \label{fig:#6}%
}% }%
} }
@@ -82,7 +85,9 @@
\textwidth / 2 + \bigfloatoverhang - \twinfigspace \textwidth / 2 + \bigfloatoverhang - \twinfigspace
]{\twinfigwidth} ]{\twinfigwidth}
\newcommand{\twinfig}[7][\bigfloatoverhang]{% \NewDocumentCommand{\twinfig}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m m m >{\TrimSpaces}m m%
}{%
\bigfloat[#1]{figure}{htpb}{% \bigfloat[#1]{figure}{htpb}{%
\begin{tblr}{% \begin{tblr}{%
colspec = {% colspec = {%
@@ -119,7 +124,9 @@
}% }%
} }
\newcommand{\wrapfig}[6][0in]{% \NewDocumentCommand{\wrapfig}{%
O{0in} m m m >{\TrimSpaces}m m%
}{%
% Syntax: % Syntax:
% \wrapfig[% % \wrapfig[%
% horizontal_offset % horizontal_offset
@@ -142,7 +149,7 @@
keepaspectratio,% keepaspectratio,%
#4% #4%
]{#2}% ]{#2}%
\centering\captionof{figure}{#6}% \Centering\captionof{figure}{#6}%
\label{fig:#5}% \label{fig:#5}%
\end{wrapfigure}% \end{wrapfigure}%
} }

View File

@@ -15,7 +15,7 @@
\newlength{\insideheaderoffset} \newlength{\insideheaderoffset}
\setlength{\insideheaderoffset}{0.5in} \setlength{\insideheaderoffset}{0.5in}
\newcommand{\parttitle}{} \NewDocumentCommand{\parttitle}{}
\renewcommand{\chaptermark}[1]{ \markboth{#1}{} } \renewcommand{\chaptermark}[1]{ \markboth{#1}{} }

View File

@@ -4,4 +4,4 @@
% Index formatting. % Index formatting.
\RequirePackage{makeidx} \RequirePackage{makeidx}
\RequirePackage{xstring} \RequirePackage{xstring}
\newcommand{\idx}[1]{\StrSubstitute{#1}{!}{ }\index{#1}} \NewDocumentCommand{\idx}{m}{\StrSubstitute{#1}{!}{ }\index{#1}}

View File

@@ -46,9 +46,9 @@
% all, % all,
% ]{nowidow} % ]{nowidow}
\RequirePackage{lua-widow-control} \RequirePackage[balanced]{lua-widow-control}
\ifthenelse{\boolean{isDraft}}{ \ifthenelse{\boolean{isDraft}}{
\lwcdraft{draft} \lwcsetup{draft}
}{} }{}
% Paragraph formatting. % Paragraph formatting.
@@ -71,9 +71,9 @@
\renewcommand{\dblfloatpagefraction}{0.8} % require fuller float pages \renewcommand{\dblfloatpagefraction}{0.8} % require fuller float pages
% Line-breaking zero-width space % Line-breaking zero-width space
\newcommand{\zws}{\hspace{0pt}} \NewDocumentCommand{\zws}{}{\hspace{0pt}}
% Line-breaking dot % Line-breaking dot
\newcommand{\bdot}{.\hspace{0pt}} \NewDocumentCommand{\bdot}{}{.\hspace{0pt}}
\newlength{\bigfloatoffset} \newlength{\bigfloatoffset}
\setlength{\bigfloatoffset}{0.25in} \setlength{\bigfloatoffset}{0.25in}
@@ -82,7 +82,7 @@
\newlength{\bigfloatoverhang} \newlength{\bigfloatoverhang}
\setlength{\bigfloatoverhang}{0.81in} \setlength{\bigfloatoverhang}{0.81in}
\newcommand{\bigfloat}[4][\bigfloatoverhang]{% \NewDocumentCommand{\bigfloat}{O{\bigfloatoverhang} m m +m}{%
\begin{#2}[#3]% \begin{#2}[#3]%
\ifthenelse{\boolean{isElectronic}}{ \ifthenelse{\boolean{isElectronic}}{
\begin{adjustwidth}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}% \begin{adjustwidth}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}%
@@ -100,31 +100,24 @@
\end{#2}% \end{#2}%
} }
% \newcommand{\bignotfloat}[2][\bigfloatoverhang]{% \providelength[0.5em]{\boxoutpadding}
% \begin{adjustwidth*}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}%
% \begin{minipage}{#1 * 2 + \textwidth}%
% #2%
% \end{minipage}%
% \end{adjustwidth*}%
% }
\newlength{\boxoutpadding} \colorlet{boxoutbgcolor}{PrimePaleBlue}
\setlength{\boxoutpadding}{0.5em} \colorlet{boxoutfgcolor}{PrimeBlue}
\newcommand{\boxoutbgcolor}{PrimePaleBlue} \NewDocumentCommand{\boxout}{%
\newcommand{\boxoutfgcolor}{PrimeBlue} O{0in} m m >{\TrimSpaces}m +m%
}{%
\newcommand{\boxout}[5][0in]{%
\begin{wrapfigure}{#2}[#1]% \begin{wrapfigure}{#2}[#1]%
\fcolorbox{\boxoutfgcolor}{\boxoutbgcolor}{% \fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{#3}% \begin{minipage}{#3}%
\vspace{\boxoutpadding}% \vspace{\boxoutpadding}%
{\centering% {\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}% \begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#4}% \label{box:#4}%
\setlength{\parskip}{\medskipamount}% \setlength{\parskip}{\medskipamount}%
{\centering\slab{\strong{#4}}\par}% {\Centering\slab{\strong{#4}}\par}%
\small{}#5% \justifying\small{}#5%
\end{minipage}% \end{minipage}%
\par}% \par}%
\vspace{\boxoutpadding}% \vspace{\boxoutpadding}%
@@ -133,17 +126,19 @@
\end{wrapfigure}% \end{wrapfigure}%
} }
\newcommand{\bigboxout}[4][\bigfloatoverhang]{% \NewDocumentCommand{\bigboxout}{%
O{\bigfloatoverhang} m >{\TrimSpaces}m +m%
}{%
\bigfloat[#1]{figure}{#2}{% \bigfloat[#1]{figure}{#2}{%
\fcolorbox{\boxoutfgcolor}{\boxoutbgcolor}{% \fcolorbox{boxoutfgcolor}{boxoutbgcolor}{%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}% \begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\vspace{\boxoutpadding}% \vspace{\boxoutpadding}%
{\centering% {\Centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}% \begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\label{box:#3}% \label{box:#3}%
\setlength{\parskip}{\medskipamount}% \setlength{\parskip}{\medskipamount}%
{\centering\slab{\strong{#3}}\par}% {\Centering\slab{\strong{#3}}\par}%
\small{}#4% \justifying\small{}#4%
\end{minipage}% \end{minipage}%
\par}% \par}%
\vspace{\boxoutpadding}% \vspace{\boxoutpadding}%

View File

@@ -4,6 +4,9 @@
% Marginalia formatting. % Marginalia formatting.
\colorlet{marginTextColor}{PrimeBlue} \colorlet{marginTextColor}{PrimeBlue}
% Allow hyphenation in narrow margin paragraphs.
\RequirePackage{ragged2e}
\RequirePackage{marginalia} \RequirePackage{marginalia}
\marginaliasetup{ \marginaliasetup{
ysep = {\parskip}, ysep = {\parskip},
@@ -17,12 +20,12 @@
- \textheight - \textheight
}, },
yshift = {7pt}, % Just a magic number that lines up margin notes with their reference. yshift = {7pt}, % Just a magic number that lines up margin notes with their reference.
style recto outer = {\raggedright\small\color{marginTextColor}}, style recto outer = {\RaggedRight\small\color{marginTextColor}},
style verso outer = {\raggedleft\small\color{marginTextColor}}, style verso outer = {\RaggedLeft\small\color{marginTextColor}},
} }
% Put a glossary definition in a margin paragraph. % Put a glossary definition in a margin paragraph.
\newcommand{\mdef}[3][]{% \NewDocumentCommand{\mdef}{O{} m m}{%
\index{\glsentryname{#2}}% Add a reference to this in the index. \index{\glsentryname{#2}}% Add a reference to this in the index.
\strong{#3{#2}}% This is the text that appears on the page. \strong{#3{#2}}% This is the text that appears on the page.
\marginalia[#1]{% \marginalia[#1]{%
@@ -30,28 +33,28 @@
\glsdesc*{#2}% Create the text of the margin note. \glsdesc*{#2}% Create the text of the margin note.
}% }%
} }
\newcommand{\margindef}[2][]{% \NewDocumentCommand{\margindef}{O{} m}{%
\mdef[#1]{#2}{\gls}% \mdef[#1]{#2}{\gls}%
} }
\newcommand{\Margindef}[2][]{% \NewDocumentCommand{\Margindef}{O{} m}{%
\mdef[#1]{#2}{\Gls}% \mdef[#1]{#2}{\Gls}%
} }
\newcommand{\margindefpl}[2][]{% \NewDocumentCommand{\margindefpl}{O{} m}{%
\mdef[#1]{#2}{\glspl}% \mdef[#1]{#2}{\glspl}%
} }
\newcommand{\Margindefpl}[2][]{% \NewDocumentCommand{\Margindefpl}{O{} m}{%
\mdef[#1]{#2}{\Glspl}% \mdef[#1]{#2}{\Glspl}%
} }
% Put a footnote in a margin paragraph. % Put a footnote in a margin paragraph.
\newcommand{\mnote}[2][]{% \NewDocumentCommand{\mnote}{O{} +m}{%
\footnotemark% \footnotemark%
\marginalia[#1]{% \marginalia[#1]{%
\footnotemark[\value{footnote}]#2% \footnotemark[\value{footnote}]#2%
}% }%
} }
\newcommand{\marginfig}[4][]{% \NewDocumentCommand{\marginfig}{O{} m m +m}{%
% Syntax: % Syntax:
% \marginfig[ % \marginfig[
% (width|height)=lengthvalue, or any other optional \includegraphics % (width|height)=lengthvalue, or any other optional \includegraphics
@@ -70,10 +73,10 @@
\marginalia{% \marginalia{%
\captionsetup{% \captionsetup{%
type = figure,% type = figure,%
%justification = raggedoutside, justification = RaggedOutside,%
}% }%
\centering\includegraphics[keepaspectratio,#1]{#2}\par% \Centering\includegraphics[keepaspectratio,#1]{#2}\par%
\captionof{figure}{#4}% \noindent\captionof{figure}{#4}%
\label{fig:#3}% \label{fig:#3}%
}% }%
} }

View File

@@ -4,10 +4,10 @@
\RequirePackage{graphicx} \RequirePackage{graphicx}
% Define custom title page. % Define custom title page.
\newcommand{\PrimeTitlePage}[1][]{ \NewDocumentCommand{\PrimeTitlePage}{O{}}{
\begin{titlepage} \begin{titlepage}
\begin{sbfamily} \begin{sbfamily}
{\raggedright\noindent\large {\RaggedRight\noindent\large
\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\Centering
}{ }{
\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}