130 lines
3.5 KiB
TeX
130 lines
3.5 KiB
TeX
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{latex-templates/PrimeManual}[2025-06-24]
|
|
%
|
|
% Suppress warning about \showhyphens being changed.
|
|
\let\CheckCommand\providecommand
|
|
|
|
\RequirePackage{microtype}
|
|
|
|
\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}}
|
|
|
|
\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}}
|
|
|
|
\RequirePackage[mark]{gitinfo2}
|
|
|
|
% Specify Fonts
|
|
\RequirePackage{fontspec}
|
|
% Main font: Roboto Serif
|
|
\setmainfont{RobotoSerif}[
|
|
Path = ./fonts/RobotoSerif/,
|
|
Extension = .ttf,
|
|
UprightFont = *-Regular,
|
|
BoldFont = *-Bold,
|
|
ItalicFont = *-Italic,
|
|
BoldItalicFont = *-BoldItalic,
|
|
]
|
|
% Headings & Titles font: Roboto Slab
|
|
\setsansfont{RobotoSlab}[
|
|
Path = ./fonts/RobotoSlab/,
|
|
Extension = .ttf,
|
|
UprightFont = *-Regular,
|
|
BoldFont = *-Bold,
|
|
]
|
|
% Monospace font: Roboto Mono
|
|
\setmonofont{RobotoMono}[
|
|
Path = ./fonts/RobotoMono/,
|
|
Extension = .ttf,
|
|
UprightFont = *-Regular,
|
|
BoldFont = *-Bold,
|
|
ItalicFont = *-Italic,
|
|
BoldItalicFont = *-BoldItalic,
|
|
]
|
|
|
|
% Title & Heading Options
|
|
\RequirePackage[sf,raggedright]{titlesec}
|
|
|
|
% Header & Footer Options
|
|
\pagestyle{plain}
|
|
|
|
% Color import and definition
|
|
\RequirePackage{color}
|
|
\definecolor{PrimeBlue}{RGB}{25,45,145}
|
|
|
|
% Use Hyperref to automatically create links in the document
|
|
\RequirePackage{hyperref}
|
|
\hypersetup{colorlinks=true, allcolors=PrimeBlue}
|
|
|
|
% Graphics package for including images
|
|
\RequirePackage{graphicx}
|
|
\RequirePackage{calc}
|
|
|
|
% Define custom title page.
|
|
\newcommand{\PrimeTitlePage}{
|
|
\begin{titlepage}
|
|
\begin{sffamily}
|
|
{\raggedright\noindent\large
|
|
\vspace*{\stretch{1}}
|
|
|
|
\sCustomerFull
|
|
\medbreak
|
|
\sProjectTitle
|
|
\bigbreak
|
|
{\Huge \sTitle}
|
|
\vfill
|
|
{\leavevmode
|
|
% Move the graphic to 0.25 in from the left edge of the paper.
|
|
\put(-\oddsidemargin-0.75in,10pt){
|
|
\includegraphics{graphics/prime_rule.pdf}
|
|
}
|
|
% The numbers here are just what looks good.
|
|
\put(100,0){
|
|
\includegraphics{graphics/prime_heartbeat.pdf}
|
|
}
|
|
}
|
|
|
|
\sAuthor
|
|
|
|
Revision \gitVtagn %\sVersion
|
|
|
|
\sDate
|
|
\vfill
|
|
}
|
|
\end{sffamily}
|
|
\end{titlepage}
|
|
}
|
|
|
|
% Paragraph formatting.
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{2ex plus 0.5ex minus 0.5ex}
|
|
|
|
% Table formatting.
|
|
\renewcommand{\arraystretch}{1.5}
|
|
|
|
\RequirePackage[nopostdot,toc]{glossaries}
|
|
|
|
% Margin Note formatting.
|
|
\RequirePackage{marginnote}
|
|
% -38pt seems to be just the right vertical adjustment to align margin notes
|
|
% with the reference in the text.
|
|
\renewcommand{\marginnotevadjust}{-38pt}
|
|
\renewcommand{\marginfont}{\small\color{PrimeBlue}}
|
|
|
|
\newcommand{\margintitle}[1]{\paragraph{\textbf{#1}}}
|
|
\newcommand{\margindef}[2][0pt]{\textbf{\gls{#2}}\marginnote{\margintitle{\gls{#2}:} \glsdesc{#2}}[#1]}
|
|
|
|
% Quote formatting
|
|
%\RequirePackage[english]{babel}
|
|
%\RequirePackage[autostyle, english=american]{csquotes}
|
|
%\MakeOuterQuote{"} |