- Split PrimeManual package into multiple packages.
- Change original PrimeManual package into a class and rename Manual.
This commit is contained in:
8
Color.sty
Normal file
8
Color.sty
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Color}[2025-07-09]
|
||||||
|
|
||||||
|
% Color import and definition
|
||||||
|
%#region
|
||||||
|
\RequirePackage{xcolor}
|
||||||
|
\definecolor{PrimeBlue}{RGB}{25,45,145}
|
||||||
|
%#endregion
|
||||||
48
CrossRef.sty
Normal file
48
CrossRef.sty
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/CrossRef}[2025-07-09]
|
||||||
|
|
||||||
|
% Cross references
|
||||||
|
%#region
|
||||||
|
%\newcommand{\sectionRef}[2]{\ref{#1:#2}: #2}
|
||||||
|
\newcommand{\refChapter}[1]{Chapter \ref{ch:#1}}
|
||||||
|
\newcommand{\refAppendix}[1]{Appendix \ref{ch:#1}}
|
||||||
|
\newcommand{\refSection}[1]{Section \ref{sec:#1}}
|
||||||
|
\newcommand{\refSubsection}[1]{Subsection \ref{subsec:#1}}
|
||||||
|
\newcommand{\refSubsubsection}[1]{Sub-subsection \ref{sssec:#1}}
|
||||||
|
\newcommand{\refParagraph}[1]{Paragraph \ref{par:#1}}
|
||||||
|
\newcommand{\refSubparagraph}[1]{Subparagraph \ref{subpar:#1}}
|
||||||
|
\newcommand{\refTable}[1]{Table \ref{tbl:#1}}
|
||||||
|
\newcommand{\refFigure}[1]{Figure \ref{fig:#1}}
|
||||||
|
|
||||||
|
\newcommand{\lblGeneral}[4][]{
|
||||||
|
\if\relax\detokenize{#1}\relax % Check if #1 is empty string.
|
||||||
|
#3{#2}\label{#4:#2}
|
||||||
|
\else
|
||||||
|
#3{#2}\label{#4:#1}
|
||||||
|
\fi
|
||||||
|
}
|
||||||
|
\newcommand{\lblChapter}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\chapter}{ch}
|
||||||
|
}
|
||||||
|
\newcommand{\lblSection}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\section}{sec}
|
||||||
|
}
|
||||||
|
\newcommand{\lblSubsection}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\subsection}{subsec}
|
||||||
|
}
|
||||||
|
\newcommand{\lblSubsubsection}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\subsubsection}{sssec}
|
||||||
|
}
|
||||||
|
\newcommand{\lblParagraph}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\paragraph}{par}
|
||||||
|
}
|
||||||
|
\newcommand{\lblSubparagraph}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\subparagraph}{subpar}
|
||||||
|
}
|
||||||
|
\newcommand{\lblTable}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\caption}{tbl}
|
||||||
|
}
|
||||||
|
\newcommand{\lblFigure}[2][]{
|
||||||
|
\lblGeneral[#1]{#2}{\caption}{fig}
|
||||||
|
}
|
||||||
|
%#endregion
|
||||||
24
DocProperties.sty
Normal file
24
DocProperties.sty
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/DocProperties}[2025-07-09]
|
||||||
|
|
||||||
|
% Custom document properties.
|
||||||
|
%#region
|
||||||
|
\DeclareRobustCommand*{\customer}[1]{\gdef\@customer{#1}}
|
||||||
|
\DeclareRobustCommand*{\customerFull}[1]{\gdef\@customerFull{#1}}
|
||||||
|
\DeclareRobustCommand*{\projectNumber}[1]{\gdef\@projectNumber{#1}}
|
||||||
|
\DeclareRobustCommand*{\projectDesc}[1]{\gdef\@projectDesc{#1}}
|
||||||
|
\DeclareRobustCommand*{\version}[1]{\gdef\@version{#1}}
|
||||||
|
%#endregion
|
||||||
|
|
||||||
|
% Macros to insert document properties.
|
||||||
|
%#region
|
||||||
|
\newcommand{\sTitle}{\makeatletter{\@title}}
|
||||||
|
\newcommand{\sAuthor}{\makeatletter{\@author}}
|
||||||
|
\newcommand{\sDate}{\makeatletter{\@date}}
|
||||||
|
\newcommand{\sCustomer}{\makeatletter{\@customer}}
|
||||||
|
\newcommand{\sCustomerFull}{\makeatletter{\@customerFull}}
|
||||||
|
\newcommand{\sProjectNumber}{\makeatletter{\@projectNumber}}
|
||||||
|
\newcommand{\sProjectDesc}{\makeatletter{\@projectDesc}}
|
||||||
|
\newcommand{\sProjectTitle}{\makeatletter{Project \@projectNumber : \@projectDesc}}
|
||||||
|
\newcommand{\sVersion}{\makeatletter{\@version}}
|
||||||
|
%#endregion
|
||||||
32
Fonts.sty
Normal file
32
Fonts.sty
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Fonts}[2025-06-24]
|
||||||
|
|
||||||
|
% Specify Fonts
|
||||||
|
%#region
|
||||||
|
\RequirePackage{fontspec}
|
||||||
|
% Main font: Roboto Serif
|
||||||
|
\setmainfont{RobotoSerif}[
|
||||||
|
Path = ./fonts/RobotoSerif/,
|
||||||
|
Extension = .ttf,
|
||||||
|
UprightFont = *-Light,
|
||||||
|
BoldFont = *-SemiBold,
|
||||||
|
ItalicFont = *-LightItalic,
|
||||||
|
BoldItalicFont = *-SemiBoldItalic,
|
||||||
|
]
|
||||||
|
% Headings & Titles font: Roboto Slab
|
||||||
|
\setsansfont{RobotoSlab}[
|
||||||
|
Path = ./fonts/RobotoSlab/,
|
||||||
|
Extension = .ttf,
|
||||||
|
UprightFont = *-SemiBold,
|
||||||
|
BoldFont = *-Black,
|
||||||
|
]
|
||||||
|
% Monospace font: Roboto Mono
|
||||||
|
\setmonofont{RobotoMono}[
|
||||||
|
Path = ./fonts/RobotoMono/,
|
||||||
|
Extension = .ttf,
|
||||||
|
UprightFont = *-Regular,
|
||||||
|
BoldFont = *-Bold,
|
||||||
|
ItalicFont = *-Italic,
|
||||||
|
BoldItalicFont = *-BoldItalic,
|
||||||
|
]
|
||||||
|
%#endregion
|
||||||
7
Glossary.sty
Normal file
7
Glossary.sty
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Glossary}[2025-07-09]
|
||||||
|
|
||||||
|
% Glossary formatting.
|
||||||
|
%#region
|
||||||
|
\RequirePackage[xindy,nopostdot,toc,sort=standard]{glossaries}
|
||||||
|
%#endregion
|
||||||
33
Graphics.sty
Normal file
33
Graphics.sty
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Graphics}[2025-07-09]
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Layout}
|
||||||
|
|
||||||
|
% Graphics package for including images
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
\RequirePackage[hypcap=true]{caption}
|
||||||
|
|
||||||
|
\newcommand{\ig}[2][0.5in]{
|
||||||
|
\includegraphics[keepaspectratio,width=#1]{#2}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\cfig}[4]{%
|
||||||
|
\begin{figure}[ht]%
|
||||||
|
\centering%
|
||||||
|
#4{#1}%
|
||||||
|
\caption{#3}%
|
||||||
|
\label{fig:#2}%
|
||||||
|
\end{figure}%
|
||||||
|
}
|
||||||
|
\newcommand{\centerfig}[3]{\cfig{#1}{#2}{#3}{\includegraphics}}
|
||||||
|
\newcommand{\centerfigw}[4][\textwidth]{\cfig{#2}{#3}{#4}{\includegraphics[keepaspectratio,width=#1]}}
|
||||||
|
|
||||||
|
\newcommand{\bigfig}[4][1in]{%
|
||||||
|
\bigfloat[#1]{%
|
||||||
|
\captionsetup{type=figure}%
|
||||||
|
\includegraphics[keepaspectratio,width=\bfFigureWidth]{#2}%
|
||||||
|
\captionof{figure}{#4}%
|
||||||
|
\label{fig:#3}%
|
||||||
|
}%
|
||||||
|
}
|
||||||
|
%#endregion
|
||||||
9
Index.sty
Normal file
9
Index.sty
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Index}[2025-07-09]
|
||||||
|
|
||||||
|
% Index formatting.
|
||||||
|
%#region
|
||||||
|
\RequirePackage{makeidx}
|
||||||
|
\RequirePackage{xstring}
|
||||||
|
\newcommand{\idx}[1]{\StrSubstitute{#1}{!}{ }\index{#1}}
|
||||||
|
%#endregion
|
||||||
54
Layout.sty
Normal file
54
Layout.sty
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Layout}[2025-07-09]
|
||||||
|
|
||||||
|
% Suppress warning about \showhyphens being changed.
|
||||||
|
\let\CheckCommand\providecommand
|
||||||
|
|
||||||
|
\RequirePackage{microtype}
|
||||||
|
|
||||||
|
% Page Layout
|
||||||
|
%#region
|
||||||
|
\RequirePackage[pass]{geometry}
|
||||||
|
\RequirePackage{calc}
|
||||||
|
\RequirePackage{ifoddpage}
|
||||||
|
|
||||||
|
\newlength{\contentwidth}
|
||||||
|
\setlength{\contentwidth}{\textwidth+\marginparsep+\marginparwidth}
|
||||||
|
|
||||||
|
\newlength{\bfFigureWidth}
|
||||||
|
\newlength{\bfMarginOffset}
|
||||||
|
\newcommand{\bigfloat}[2][1in]{%
|
||||||
|
\setlength{\bfFigureWidth}{#1*-2+\paperwidth}%
|
||||||
|
\checkoddpage%
|
||||||
|
\ifoddpage%
|
||||||
|
\setlength{\bfMarginOffset}{-1in+#1-\oddsidemargin}%
|
||||||
|
\else%
|
||||||
|
\setlength{\bfMarginOffset}{-1in+#1-\evensidemargin}%
|
||||||
|
\fi%
|
||||||
|
\begin{figure}[ht]%
|
||||||
|
{\leavevmode%
|
||||||
|
\put(\bfMarginOffset,0in){%
|
||||||
|
\begin{minipage}{\bfFigureWidth}%
|
||||||
|
#2%
|
||||||
|
\end{minipage}%
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\end{figure}%
|
||||||
|
}
|
||||||
|
%#endregion
|
||||||
|
|
||||||
|
% Title & Heading Options
|
||||||
|
%#region
|
||||||
|
\RequirePackage[sf,raggedright]{titlesec}
|
||||||
|
%#endregion
|
||||||
|
|
||||||
|
% Header & Footer Options
|
||||||
|
%#region
|
||||||
|
\pagestyle{plain}
|
||||||
|
%#endregion
|
||||||
|
|
||||||
|
% Paragraph formatting.
|
||||||
|
%#region
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{2ex plus 0.5ex minus 0.5ex}
|
||||||
|
%#endregion
|
||||||
10
Links.sty
Normal file
10
Links.sty
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Links}[2025-07-09]
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Color}
|
||||||
|
|
||||||
|
% Use Hyperref to automatically create links in the document
|
||||||
|
%#region
|
||||||
|
\RequirePackage{hyperref}
|
||||||
|
\hypersetup{colorlinks=true, allcolors=PrimeBlue}
|
||||||
|
%#endregion
|
||||||
30
Manual.cls
Normal file
30
Manual.cls
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesClass{PrimeTeX/Manual}[2025-07-09]
|
||||||
|
|
||||||
|
\LoadClass[letterpaper,openany,]{book}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Color}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/CrossRef}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/DocProperties}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Fonts}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Glossary}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Graphics}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Index}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Layout}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Links}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/MarginNotes}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/Tables}
|
||||||
|
|
||||||
|
\RequirePackage{PrimeTeX/TitlePage}
|
||||||
|
|
||||||
|
|
||||||
58
MarginNotes.sty
Normal file
58
MarginNotes.sty
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/MarginNotes}[2025-07-09]
|
||||||
|
|
||||||
|
% Margin Note formatting.
|
||||||
|
%#region
|
||||||
|
\RequirePackage{marginnote}
|
||||||
|
\colorlet{marginTextColor}{PrimeBlue}
|
||||||
|
\renewcommand{\marginfont}{\small\color{marginTextColor}}
|
||||||
|
|
||||||
|
% Put a glossary definition in a margin note.
|
||||||
|
% Optional parameter is vertical adjustment of the note.
|
||||||
|
\newcommand{\mdef}[3][0pt]{%
|
||||||
|
\index{\glsentryname{#2}}% Add a reference to this in the index.
|
||||||
|
\textbf{#3{#2}}% This is the text that appears on the page.
|
||||||
|
\marginnote{% Create the margin note.
|
||||||
|
\textsf{\textbf{%
|
||||||
|
\Glsentryname{#2}:% Create the title of the margin note.
|
||||||
|
}}%
|
||||||
|
\glsdesc*{#2}% Create the text of the margin note.
|
||||||
|
}[#1]%
|
||||||
|
}
|
||||||
|
\newcommand{\margindef}[2][0pt]{%
|
||||||
|
\mdef[#1]{#2}{\gls}%
|
||||||
|
}
|
||||||
|
\newcommand{\Margindef}[2][0pt]{%
|
||||||
|
\mdef[#1]{#2}{\Gls}%
|
||||||
|
}
|
||||||
|
|
||||||
|
% Put a footnote in a margin note.
|
||||||
|
% Optional parameter is vertical adjustment of the note.
|
||||||
|
\newcommand{\mnote}[2][0pt]{%
|
||||||
|
\footnotemark%
|
||||||
|
\marginnote{%
|
||||||
|
\footnotemark[\value{footnote}]#2%
|
||||||
|
}[#1]%
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\mfig}[5][0pt]{%
|
||||||
|
% This strut ensures that the margin figure is counted as part of the
|
||||||
|
% following paragraph and is vertically aligned with it.
|
||||||
|
\strut%
|
||||||
|
\marginnote{%
|
||||||
|
\captionsetup{%
|
||||||
|
type = figure,%
|
||||||
|
font = {color=marginTextColor},%
|
||||||
|
}%
|
||||||
|
{\centering#5{#2}\par}%
|
||||||
|
\captionof{figure}{#4}%
|
||||||
|
\label{fig:#3}%
|
||||||
|
}[#1]%
|
||||||
|
}
|
||||||
|
\newcommand{\marginfig}[4][0pt]{%
|
||||||
|
\mfig[#1]{#2}{#3}{#4}{\includegraphics}%
|
||||||
|
}
|
||||||
|
\newcommand{\marginfigw}[5][0pt]{%
|
||||||
|
\mfig[#1]{#2}{#3}{#4}{\includegraphics[keepaspectratio,width=#5]}%
|
||||||
|
}
|
||||||
|
%#endregion
|
||||||
306
PrimeManual.sty
306
PrimeManual.sty
@@ -1,306 +0,0 @@
|
|||||||
\NeedsTeXFormat{LaTeX2e}
|
|
||||||
\ProvidesPackage{latex-templates/PrimeManual}[2025-06-24]
|
|
||||||
|
|
||||||
% Suppress warning about \showhyphens being changed.
|
|
||||||
\let\CheckCommand\providecommand
|
|
||||||
|
|
||||||
\RequirePackage{microtype}
|
|
||||||
|
|
||||||
% Custom document properties.
|
|
||||||
%#region
|
|
||||||
\DeclareRobustCommand*{\customer}[1]{\gdef\@customer{#1}}
|
|
||||||
\DeclareRobustCommand*{\customerFull}[1]{\gdef\@customerFull{#1}}
|
|
||||||
\DeclareRobustCommand*{\projectNumber}[1]{\gdef\@projectNumber{#1}}
|
|
||||||
\DeclareRobustCommand*{\projectDesc}[1]{\gdef\@projectDesc{#1}}
|
|
||||||
\DeclareRobustCommand*{\version}[1]{\gdef\@version{#1}}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Macros to insert document properties.
|
|
||||||
%#region
|
|
||||||
\newcommand{\sTitle}{\makeatletter{\@title}}
|
|
||||||
\newcommand{\sAuthor}{\makeatletter{\@author}}
|
|
||||||
\newcommand{\sDate}{\makeatletter{\@date}}
|
|
||||||
\newcommand{\sCustomer}{\makeatletter{\@customer}}
|
|
||||||
\newcommand{\sCustomerFull}{\makeatletter{\@customerFull}}
|
|
||||||
\newcommand{\sProjectNumber}{\makeatletter{\@projectNumber}}
|
|
||||||
\newcommand{\sProjectDesc}{\makeatletter{\@projectDesc}}
|
|
||||||
\newcommand{\sProjectTitle}{\makeatletter{Project \@projectNumber : \@projectDesc}}
|
|
||||||
\newcommand{\sVersion}{\makeatletter{\@version}}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Specify Fonts
|
|
||||||
%#region
|
|
||||||
\RequirePackage{fontspec}
|
|
||||||
% Main font: Roboto Serif
|
|
||||||
\setmainfont{RobotoSerif}[
|
|
||||||
Path = ./fonts/RobotoSerif/,
|
|
||||||
Extension = .ttf,
|
|
||||||
UprightFont = *-Light,
|
|
||||||
BoldFont = *-SemiBold,
|
|
||||||
ItalicFont = *-LightItalic,
|
|
||||||
BoldItalicFont = *-SemiBoldItalic,
|
|
||||||
]
|
|
||||||
% Headings & Titles font: Roboto Slab
|
|
||||||
\setsansfont{RobotoSlab}[
|
|
||||||
Path = ./fonts/RobotoSlab/,
|
|
||||||
Extension = .ttf,
|
|
||||||
UprightFont = *-SemiBold,
|
|
||||||
BoldFont = *-Black,
|
|
||||||
]
|
|
||||||
% Monospace font: Roboto Mono
|
|
||||||
\setmonofont{RobotoMono}[
|
|
||||||
Path = ./fonts/RobotoMono/,
|
|
||||||
Extension = .ttf,
|
|
||||||
UprightFont = *-Regular,
|
|
||||||
BoldFont = *-Bold,
|
|
||||||
ItalicFont = *-Italic,
|
|
||||||
BoldItalicFont = *-BoldItalic,
|
|
||||||
]
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Page Layout
|
|
||||||
%#region
|
|
||||||
\RequirePackage[pass]{geometry}
|
|
||||||
\RequirePackage{calc}
|
|
||||||
\RequirePackage{ifoddpage}
|
|
||||||
|
|
||||||
\newlength{\contentwidth}
|
|
||||||
\setlength{\contentwidth}{\textwidth+\marginparsep+\marginparwidth}
|
|
||||||
|
|
||||||
\newlength{\bfFigureWidth}
|
|
||||||
\newlength{\bfMarginOffset}
|
|
||||||
\newcommand{\bigfloat}[2][1in]{%
|
|
||||||
\setlength{\bfFigureWidth}{#1*-2+\paperwidth}%
|
|
||||||
\checkoddpage%
|
|
||||||
\ifoddpage%
|
|
||||||
\setlength{\bfMarginOffset}{-1in+#1-\oddsidemargin}%
|
|
||||||
\else%
|
|
||||||
\setlength{\bfMarginOffset}{-1in+#1-\evensidemargin}%
|
|
||||||
\fi%
|
|
||||||
\begin{figure}[ht]%
|
|
||||||
{\leavevmode%
|
|
||||||
\put(\bfMarginOffset,0in){%
|
|
||||||
\begin{minipage}{\bfFigureWidth}%
|
|
||||||
#2%
|
|
||||||
\end{minipage}%
|
|
||||||
}%
|
|
||||||
}%
|
|
||||||
\end{figure}%
|
|
||||||
}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Title & Heading Options
|
|
||||||
%#region
|
|
||||||
\RequirePackage[sf,raggedright]{titlesec}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Header & Footer Options
|
|
||||||
%#region
|
|
||||||
\pagestyle{plain}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Color import and definition
|
|
||||||
%#region
|
|
||||||
\RequirePackage{xcolor}
|
|
||||||
\definecolor{PrimeBlue}{RGB}{25,45,145}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Cross references
|
|
||||||
%#region
|
|
||||||
%\newcommand{\sectionRef}[2]{\ref{#1:#2}: #2}
|
|
||||||
\newcommand{\refChapter}[1]{Chapter \ref{ch:#1}}
|
|
||||||
\newcommand{\refAppendix}[1]{Appendix \ref{ch:#1}}
|
|
||||||
\newcommand{\refSection}[1]{Section \ref{sec:#1}}
|
|
||||||
\newcommand{\refSubsection}[1]{Subsection \ref{subsec:#1}}
|
|
||||||
\newcommand{\refSubsubsection}[1]{Sub-subsection \ref{sssec:#1}}
|
|
||||||
\newcommand{\refParagraph}[1]{Paragraph \ref{par:#1}}
|
|
||||||
\newcommand{\refSubparagraph}[1]{Subparagraph \ref{subpar:#1}}
|
|
||||||
\newcommand{\refTable}[1]{Table \ref{tbl:#1}}
|
|
||||||
\newcommand{\refFigure}[1]{Figure \ref{fig:#1}}
|
|
||||||
|
|
||||||
\newcommand{\lblGeneral}[4][]{
|
|
||||||
\if\relax\detokenize{#1}\relax % Check if #1 is empty string.
|
|
||||||
#3{#2}\label{#4:#2}
|
|
||||||
\else
|
|
||||||
#3{#2}\label{#4:#1}
|
|
||||||
\fi
|
|
||||||
}
|
|
||||||
\newcommand{\lblChapter}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\chapter}{ch}
|
|
||||||
}
|
|
||||||
\newcommand{\lblSection}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\section}{sec}
|
|
||||||
}
|
|
||||||
\newcommand{\lblSubsection}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\subsection}{subsec}
|
|
||||||
}
|
|
||||||
\newcommand{\lblSubsubsection}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\subsubsection}{sssec}
|
|
||||||
}
|
|
||||||
\newcommand{\lblParagraph}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\paragraph}{par}
|
|
||||||
}
|
|
||||||
\newcommand{\lblSubparagraph}[2][]{
|
|
||||||
\lblGeneral[#1]{#2}{\subparagraph}{subpar}
|
|
||||||
}
|
|
||||||
\newcommand{\lblTable}[2][]{
|
|
||||||
\textbf{\lblGeneral[#1]{#2}{\caption}{tbl}}
|
|
||||||
}
|
|
||||||
\newcommand{\lblFigure}[2][]{
|
|
||||||
\textbf{\lblGeneral[#1]{#2}{\caption}{fig}}
|
|
||||||
}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Graphics package for including images
|
|
||||||
%#region
|
|
||||||
\RequirePackage{graphicx}
|
|
||||||
\RequirePackage[hypcap=true]{caption}
|
|
||||||
|
|
||||||
\newcommand{\ig}[2][0.5in]{
|
|
||||||
\includegraphics[keepaspectratio,width=#1]{#2}
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\cfig}[4]{%
|
|
||||||
\begin{figure}[ht]%
|
|
||||||
\centering%
|
|
||||||
#4{#1}%
|
|
||||||
\caption{#3}%
|
|
||||||
\label{fig:#2}%
|
|
||||||
\end{figure}%
|
|
||||||
}
|
|
||||||
\newcommand{\centerfig}[3]{\cfig{#1}{#2}{#3}{\includegraphics}}
|
|
||||||
\newcommand{\centerfigw}[4][\textwidth]{\cfig{#2}{#3}{#4}{\includegraphics[keepaspectratio,width=#1]}}
|
|
||||||
|
|
||||||
\newcommand{\bigfig}[4][1in]{%
|
|
||||||
\bigfloat[#1]{%
|
|
||||||
\captionsetup{type=figure}%
|
|
||||||
\includegraphics[keepaspectratio,width=\bfFigureWidth]{#2}%
|
|
||||||
\captionof{figure}{#4}%
|
|
||||||
\label{fig:#3}%
|
|
||||||
}%
|
|
||||||
}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Paragraph formatting.
|
|
||||||
%#region
|
|
||||||
\setlength{\parindent}{0pt}
|
|
||||||
\setlength{\parskip}{2ex plus 0.5ex minus 0.5ex}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Table formatting.
|
|
||||||
%#region
|
|
||||||
\RequirePackage{tabularray}
|
|
||||||
\RequirePackage{csvsimple-l3}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Glossary formatting.
|
|
||||||
%#region
|
|
||||||
\RequirePackage[xindy,nopostdot,toc,sort=standard]{glossaries}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Index formatting.
|
|
||||||
%#region
|
|
||||||
\RequirePackage{makeidx}
|
|
||||||
\RequirePackage{xstring}
|
|
||||||
\newcommand{\idx}[1]{\StrSubstitute{#1}{!}{ }\index{#1}}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Margin Note formatting.
|
|
||||||
%#region
|
|
||||||
\RequirePackage{marginnote}
|
|
||||||
\colorlet{marginTextColor}{PrimeBlue}
|
|
||||||
\renewcommand{\marginfont}{\small\color{marginTextColor}}
|
|
||||||
|
|
||||||
% Put a glossary definition in a margin note.
|
|
||||||
% Optional parameter is vertical adjustment of the note.
|
|
||||||
\newcommand{\mdef}[3][0pt]{%
|
|
||||||
\index{\glsentryname{#2}}% Add a reference to this in the index.
|
|
||||||
\textbf{#3{#2}}% This is the text that appears on the page.
|
|
||||||
\marginnote{% Create the margin note.
|
|
||||||
\textsf{\textbf{%
|
|
||||||
\Glsentryname{#2}:% Create the title of the margin note.
|
|
||||||
}}%
|
|
||||||
\glsdesc*{#2}% Create the text of the margin note.
|
|
||||||
}[#1]%
|
|
||||||
}
|
|
||||||
\newcommand{\margindef}[2][0pt]{%
|
|
||||||
\mdef[#1]{#2}{\gls}%
|
|
||||||
}
|
|
||||||
\newcommand{\Margindef}[2][0pt]{%
|
|
||||||
\mdef[#1]{#2}{\Gls}%
|
|
||||||
}
|
|
||||||
|
|
||||||
% Put a footnote in a margin note.
|
|
||||||
% Optional parameter is vertical adjustment of the note.
|
|
||||||
\newcommand{\mnote}[2][0pt]{%
|
|
||||||
\footnotemark%
|
|
||||||
\marginnote{%
|
|
||||||
\footnotemark[\value{footnote}]#2%
|
|
||||||
}[#1]%
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\mfig}[5][0pt]{%
|
|
||||||
% This strut ensures that the margin figure is counted as part of the
|
|
||||||
% following paragraph and is vertically aligned with it.
|
|
||||||
\strut%
|
|
||||||
\marginnote{%
|
|
||||||
\captionsetup{%
|
|
||||||
type = figure,%
|
|
||||||
font = {color=marginTextColor},%
|
|
||||||
}%
|
|
||||||
{\centering#5{#2}\par}%
|
|
||||||
\captionof{figure}{#4}%
|
|
||||||
\label{fig:#3}%
|
|
||||||
}[#1]%
|
|
||||||
}
|
|
||||||
\newcommand{\marginfig}[4][0pt]{%
|
|
||||||
\mfig[#1]{#2}{#3}{#4}{\includegraphics}%
|
|
||||||
}
|
|
||||||
\newcommand{\marginfigw}[5][0pt]{%
|
|
||||||
\mfig[#1]{#2}{#3}{#4}{\includegraphics[keepaspectratio,width=#5]}%
|
|
||||||
}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Use Hyperref to automatically create links in the document
|
|
||||||
%#region
|
|
||||||
\RequirePackage{hyperref}
|
|
||||||
\hypersetup{colorlinks=true, allcolors=PrimeBlue}
|
|
||||||
%#endregion
|
|
||||||
|
|
||||||
% Define custom title page.
|
|
||||||
%#region
|
|
||||||
\newcommand{\PrimeTitlePage}[1]{
|
|
||||||
\begin{titlepage}
|
|
||||||
\begin{sffamily}
|
|
||||||
{\raggedright\noindent\large
|
|
||||||
\vspace*{\stretch{1}}
|
|
||||||
|
|
||||||
\sCustomerFull
|
|
||||||
\medbreak
|
|
||||||
\sProjectTitle
|
|
||||||
\bigbreak
|
|
||||||
{\Huge \sTitle}
|
|
||||||
\vfill
|
|
||||||
{\leavevmode
|
|
||||||
% Move the rule graphic to 0.25 in from the left edge of the
|
|
||||||
% paper and vertically centered on the heartbeat graphic.
|
|
||||||
\put(-\oddsidemargin-0.75in,10pt){
|
|
||||||
\includegraphics{#1/prime_rule.pdf}
|
|
||||||
}
|
|
||||||
% The numbers here are just what looks good.
|
|
||||||
\put(100pt,0pt){
|
|
||||||
\includegraphics{#1/prime_heartbeat.pdf}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
\sAuthor
|
|
||||||
|
|
||||||
Revision \sVersion
|
|
||||||
|
|
||||||
\sDate
|
|
||||||
\vfill
|
|
||||||
}
|
|
||||||
\end{sffamily}
|
|
||||||
\end{titlepage}
|
|
||||||
}
|
|
||||||
%#endregion
|
|
||||||
8
Tables.sty
Normal file
8
Tables.sty
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/Tables}[2025-07-09]
|
||||||
|
|
||||||
|
% Table formatting.
|
||||||
|
%#region
|
||||||
|
\RequirePackage{tabularray}
|
||||||
|
\RequirePackage{csvsimple-l3}
|
||||||
|
%#endregion
|
||||||
42
TitlePage.sty
Normal file
42
TitlePage.sty
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
|
\ProvidesPackage{PrimeTeX/TitlePage}[2025-07-09]
|
||||||
|
|
||||||
|
\RequirePackage{graphicx}
|
||||||
|
|
||||||
|
% Define custom title page.
|
||||||
|
%#region
|
||||||
|
\newcommand{\PrimeTitlePage}[1][]{
|
||||||
|
\begin{titlepage}
|
||||||
|
\begin{sffamily}
|
||||||
|
{\raggedright\noindent\large
|
||||||
|
\vspace*{\stretch{1}}
|
||||||
|
|
||||||
|
\sCustomerFull
|
||||||
|
\medbreak
|
||||||
|
\sProjectTitle
|
||||||
|
\bigbreak
|
||||||
|
{\Huge \sTitle}
|
||||||
|
\vfill
|
||||||
|
{\leavevmode
|
||||||
|
% Move the rule graphic to 0.25 in from the left edge of the
|
||||||
|
% paper and vertically centered on the heartbeat graphic.
|
||||||
|
\put(-\oddsidemargin-0.75in,10pt){
|
||||||
|
\includegraphics{#1prime_rule.pdf}
|
||||||
|
}
|
||||||
|
% The numbers here are just what looks good.
|
||||||
|
\put(100pt,0pt){
|
||||||
|
\includegraphics{#1prime_heartbeat.pdf}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
\sAuthor
|
||||||
|
|
||||||
|
Revision \sVersion
|
||||||
|
|
||||||
|
\sDate
|
||||||
|
\vfill
|
||||||
|
}
|
||||||
|
\end{sffamily}
|
||||||
|
\end{titlepage}
|
||||||
|
}
|
||||||
|
%#endregion
|
||||||
Reference in New Issue
Block a user