- Move packages to subfolder.

- Add Prime Controls graphics to this repo.
- Expand readme.
This commit is contained in:
Silcantar
2025-08-01 22:54:37 -05:00
parent 0eaf395e0e
commit 21d5f5d0ea
25 changed files with 3269 additions and 34 deletions

32
packages/Color.sty Normal file
View File

@@ -0,0 +1,32 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Color}[2025-07-09]
\RequirePackage{ifthen}
\newboolean{colorIsDarkMode}
\setboolean{colorIsDarkMode}{false}
\DeclareOption{darkmode}{
\setboolean{colorIsDarkMode}{true}
}
\ProcessOptions\relax
% Color import and definition
\RequirePackage{xcolor}
\ifthenelse{\boolean{colorIsDarkMode}}{
\pagecolor[rgb]{0.2,0.2,0.2}
\color[rgb]{0.9,0.9,0.9}
\definecolor{pageColor}{rgb}{0.2,0.2,0.2}
\definecolor{paleGray}{rgb}{0.3,0.3,0.3}
\definecolor{PrimeBlue}{RGB}{149, 164, 237}
\definecolor{PrimePaleBlue}{RGB}{35, 39, 56}
}{
\colorlet{pageColor}{white}
\colorlet{paleGray}{gray!10}
\definecolor{PrimeBlue}{RGB}{25,45,145}
\definecolor{PrimePaleBlue}{RGB}{233,236,251}
}

50
packages/CrossRef.sty Normal file
View File

@@ -0,0 +1,50 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/CrossRef}[2025-07-09]
% Cross references
\newcommand{\refPart}[2][Part~]{#1\ref{pt:#2}}
\newcommand{\refChapter}[2][Chapter~]{#1\ref{ch:#2}}
\newcommand{\refAppendix}[2][Appendix~]{#1\ref{ch:#2}}
\newcommand{\refSection}[2][Section~]{#1\ref{sec:#2}}
\newcommand{\refSubsection}[2][Subsection~]{#1\ref{subsec:#2}}
\newcommand{\refSubsubsection}[2][Sub-subsection~]{#1\ref{sssec:#2}}
\newcommand{\refParagraph}[2][Paragraph]{#1\ref{par:#2}}
\newcommand{\refSubparagraph}[2][Subparagraph~]{#1\ref{subpar:#2}}
\newcommand{\refTable}[2][Table~]{#1\ref{tbl:#2}}
\newcommand{\refFigure}[2][Figure~]{#1\ref{fig:#2}}
\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{\lblPart}[2][]{
\lblGeneral[#1]{#2}{\part}{pt}
}
\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

View File

@@ -0,0 +1,21 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/DocProperties}[2025-07-09]
% Custom document properties.
\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}}
% Macros to insert document properties.
\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

53
packages/Fonts.sty Normal file
View File

@@ -0,0 +1,53 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Fonts}[2025-06-24]
% Specify Fonts
\RequirePackage{fontspec}
\newcommand{\fontpath}{PrimeTeX/fonts}
% Main font: Roboto Serif
\setmainfont{RobotoSerif}[
Path = {\fontpath/RobotoSerif/},
Extension = .ttf,
UprightFont = *-Light,
BoldFont = *-SemiBold,
ItalicFont = *-LightItalic,
BoldItalicFont = *-SemiBoldItalic,
]
% Sans serif font: Roboto
\setsansfont{Roboto}[
Path = {\fontpath/Roboto/},
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]
% Monospace font: Roboto Mono
\setmonofont{RobotoMono}[
Path = {\fontpath/RobotoMono/},
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]
% Headings & Titles font: Roboto Slab
\newfontfamily{\sbfamily}{RobotoSlab}[
Path = {\fontpath/RobotoSlab/},
Extension = .ttf,
UprightFont = *-SemiBold,
BoldFont = *-Black,
]
\newcommand{\serif}[1]{\textrm{#1}}
\newcommand{\sans}[1]{\textsf{#1}}
\newcommand{\mono}[1]{\texttt{#1}}
\newcommand{\slab}[1]{{\sbfamily{}#1}}
\newcommand{\code}[1]{\mono{\small{}#1}}
\newcommand{\objref}[1]{{\sans{\strong{#1}}}}

6
packages/Glossary.sty Normal file
View File

@@ -0,0 +1,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Glossary}[2025-07-09]
% Glossary formatting.
\RequirePackage[xindy,nopostdot,toc,sort=standard]{glossaries}
%#endregion

104
packages/Graphics.sty Normal file
View File

@@ -0,0 +1,104 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Graphics}[2025-07-09]
\RequirePackage{PrimeTeX/packages/Layout}
% Graphics package for including images
\RequirePackage{graphicx}
\RequirePackage[
hypcap=true,
]{caption}
\captionsetup{
justification = centering,
font = {
small,
color=PrimeBlue,
},
}
% Define a justification style that is ragged on the side toward the outside of
% the page. I. e.
\RequirePackage{changepage}
%\RequirePackage{ifthen}
\DeclareCaptionJustification{raggedoutside}{
\checkoddpage
\ifoddpage
\raggedright
\else
\raggedleft
\fi
}
\RequirePackage{calc}
\RequirePackage{wrapfig2}
\newcommand{\iconsize}{0.25in}
\newcommand{\ig}[2][0.5in]{
\includegraphics[keepaspectratio,width=#1]{#2}
}
\newcommand{\cfig}[4]{%
}
\newcommand{\centerfig}[4][]{
\begin{figure}[ht]%
\centering%
\includegraphics[keepaspectratio,#1]{#2}%
\caption{#4}%
\label{fig:#3}%
\end{figure}%
}
\newcommand{\bigfig}[4][\bigfloatoverhang]{%
\bigfloat[#1]{figure}{htp}{%
\captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
\centering\captionof{figure}{#4}\par%
\label{fig:#3}%
}%
}
\newcommand{\doublebigfig}[7][\bigfloatoverhang]{%
\bigfloat[#1]{figure}{p}{%
\captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#2}%
\centering\captionof{figure}{#4}\par%
\label{fig:#3}
\bigskip
\captionsetup{type=figure}%
\includegraphics[keepaspectratio,width=\textwidth]{#5}%
\centering\captionof{figure}{#7}\par%
\label{fig:#6}%
}%
}
\newcommand{\wrapfig}[6][0in]{%
% Syntax:
% \wrapfig[
% horizontal_offset
% ]{
% graphic_file
% }{
% alignment [l,r,i,o]
% }{
% (width|height)=lengthvalue
% }{
% label
% }{
% caption
% }
%
\begin{wrapfigure}{#3}[#1]%
\captionsetup{type=figure}%
\capstart%
\includegraphics[%
keepaspectratio,%
#4%
]{#2}%
\centering\captionof{figure}{#6}%
\label{fig:#5}%
\end{wrapfigure}%
}

8
packages/Hyphenation.sty Normal file
View File

@@ -0,0 +1,8 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Hyphenation}[2025-07-11]
\hyphenation{
over-view
over-views
fac-to-ry-talk
}

7
packages/Index.sty Normal file
View File

@@ -0,0 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Index}[2025-07-09]
% Index formatting.
\RequirePackage{makeidx}
\RequirePackage{xstring}
\newcommand{\idx}[1]{\StrSubstitute{#1}{!}{ }\index{#1}}

92
packages/Layout.sty Normal file
View File

@@ -0,0 +1,92 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Layout}[2025-07-09]
% Suppress warning about \showhyphens being changed.
\let\CheckCommand\providecommand
\RequirePackage{microtype}
% Page Layout
\RequirePackage[
letterpaper,
twoside,
nohead,
width = 342pt,
height = 576pt,
inner = 108pt,
top = 108pt,
marginparwidth = 126pt,
marginparsep = 12pt,
footskip = 36pt,
]{geometry}
\RequirePackage{calc}
\RequirePackage[strict]{changepage}
\newlength{\contentwidth}
\setlength{\contentwidth}{\textwidth + \marginparsep + \marginparwidth}
% Header & Footer Options
\pagestyle{plain}
% Paragraph formatting.
\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex plus 0.5ex minus 0.5ex}
% Float Page Configuration
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
\renewcommand{\bottomfraction}{0.8} % max fraction of floats at bottom
% Parameters for TEXT pages (not float pages):
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4} % 2 may work better
\setcounter{dbltopnumber}{2} % for 2-column pages
\renewcommand{\dbltopfraction}{0.9} % fit big float above 2-col. text
\renewcommand{\textfraction}{0.07} % allow minimal text w. figs
% Parameters for FLOAT pages (not text pages):
\renewcommand{\floatpagefraction}{0.7} % require fuller float pages
% N.B.: floatpagefraction MUST be less than topfraction !!
\renewcommand{\dblfloatpagefraction}{0.7} % require fuller float pages
% Line-breaking zero-width space
\newcommand{\zws}{\hspace{0pt}}
% Line-breaking dot
\newcommand{\bdot}{.\hspace{0pt}}
\newlength{\bigfloatoffset}
\setlength{\bigfloatoffset}{0.25in}
% Maximum width adjustment to fit 2 16x9 screensots on one page.
\newlength{\bigfloatoverhang}
\setlength{\bigfloatoverhang}{0.81in}
\newcommand{\bigfloat}[4][\bigfloatoverhang]{%
\begin{#2}[#3]%
\begin{adjustwidth*}{-#1+\bigfloatoffset}{-#1-\bigfloatoffset}%
\begin{minipage}{#1 * 2 + \textwidth}%
#4%
\end{minipage}%
\end{adjustwidth*}%
\end{#2}%
}
\newlength{\boxoutpadding}
\setlength{\boxoutpadding}{0.5em}
\newcommand{\boxout}[4][\bigfloatoverhang]{%
\bigfloat[#1]{figure}{#2}{%
\fcolorbox{PrimeBlue}{PrimePaleBlue}{%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\vspace{\boxoutpadding}%
{\centering%
\begin{minipage}{\boxoutpadding*-2 + \textwidth}%
\setlength{\parskip}{\medskipamount}%
{\centering\slab{\strong{#3}}\par}%
\small{}#4%
\end{minipage}
\par}%
\vspace{\boxoutpadding}%
\end{minipage}%
}%
}%
}

11
packages/Links.sty Normal file
View File

@@ -0,0 +1,11 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Links}[2025-07-09]
\RequirePackage{PrimeTeX/packages/Color}
% Use Hyperref to automatically create links in the document
\RequirePackage{hyperref}
\hypersetup{colorlinks=true, allcolors=PrimeBlue}
\RequirePackage{hypcap}

76
packages/Marginalia.sty Normal file
View File

@@ -0,0 +1,76 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Marginalia}[2025-07-09]
% Marginalia formatting.
\colorlet{marginTextColor}{PrimeBlue}
\RequirePackage{marginalia}
\marginaliasetup{
ysep = {\parskip},
ysep page bottom = {
- 1in
+ \paperheight
- \voffset
- \topmargin
- \textheight
},
style recto outer = {\raggedright\small\color{marginTextColor}},
style verso outer = {\raggedleft\small\color{marginTextColor}},
}
% Put a glossary definition in a margin paragraph.
\newcommand{\mdef}[2]{%
\index{\glsentryname{#1}}% Add a reference to this in the index.
\strong{#2{#1}}% This is the text that appears on the page.
\marginalia{%
\slab{\strong{\Glsentryname{#1}:}} % Create the title of the margin note.
\glsdesc*{#1}% Create the text of the margin note.
}%
}
\newcommand{\margindef}[1]{%
\mdef{#1}{\gls}%
}
\newcommand{\Margindef}[1]{%
\mdef{#1}{\Gls}%
}
\newcommand{\margindefpl}[1]{%
\mdef{#1}{\glspl}%
}
\newcommand{\Margindefpl}[1]{%
\mdef{#1}{\Glspl}%
}
% Put a footnote in a margin paragraph.
\newcommand{\mnote}[1]{%
\footnotemark%
\marginalia{%
\footnotemark[\value{footnote}]#1%
}%
}
\newcommand{\marginfig}[4][]{%
% Syntax:
% \marginfig[
% (width|height)=lengthvalue, or any other optional \includegraphics
% parameters
% ]{
% graphic_file_name
% }{
% label
% }{
% caption
% }
%
% This strut ensures that the margin figure is counted as part of the
% following paragraph and is vertically aligned with it.
\strut%
\marginalia{%
\captionsetup{%
type = figure,%
%justification = raggedoutside,
}%
\centering\includegraphics[keepaspectratio,#1]{#2}\par%
\captionof{figure}{#4}%
\label{fig:#3}%
}%
}

32
packages/Tables.sty Normal file
View File

@@ -0,0 +1,32 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Tables}[2025-07-09]
% Table formatting.
\RequirePackage{tabularray}
\DeclareTblrTemplate{note-tag}{default}{\textsuperscript{\InsertTblrNoteTag}}
\NewTblrEnviron{tblrBoxout}
\SetTblrInner[tblrBoxout]{
colspec = {Q[c,h]X[1,m]},
hline{1,Z} = {0.6pt,PrimeBlue},
vline{1,Z} = {0.6pt,PrimeBlue},
hline{2} = {0.0pt,PrimePaleBlue},
vline{2} = {0.0pt,PrimePaleBlue},
vborder{Z} = {leftspace=12pt},
columns = {PrimePaleBlue},
}
\NewTblrEnviron{tblrBanded}
\SetTblrOuter[tblrBanded]{
tall,
}
\SetTblrInner[tblrBanded]{
rowhead = 1,
row{odd} = {paleGray},
row{1} = {bg=pageColor, font=\bfseries},
hline{1,Z} = {0.6pt},
hline{2} = {0.4pt},
}
\RequirePackage{csvsimple-l3}

40
packages/TitlePage.sty Normal file
View File

@@ -0,0 +1,40 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/TitlePage}[2025-07-09]
\RequirePackage{graphicx}
% Define custom title page.
\newcommand{\PrimeTitlePage}[1][]{
\begin{titlepage}
\begin{sbfamily}
{\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{sbfamily}
\end{titlepage}
}

22
packages/Titles.sty Normal file
View File

@@ -0,0 +1,22 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{PrimeTeX/packages/Titles}[2025-07-16]
\RequirePackage[raggedright]{titlesec}
\titleformat{\part}[display]{
\normalfont\sbfamily\huge\centering
}{
Part \arabic{part}
}{20pt}{\Huge}
\titleformat{\chapter}[display]{
\normalfont\sbfamily\huge\raggedright
}{
\chaptertitlename{} \thechapter
}{20pt}{\Huge}
\titleformat*{\section}{\sbfamily\Large}
\titleformat*{\subsection}{\sbfamily\large}
\titleformat*{\subsubsection}{\sbfamily}
\titleformat*{\paragraph}{\sbfamily}
\titleformat*{\subparagraph}{\sbfamily}