From 65ef946340300b72cddefd3c8f98508c6f4ee543 Mon Sep 17 00:00:00 2001 From: Joshua Lucas Date: Mon, 30 Jun 2025 16:24:19 -0500 Subject: [PATCH] Add glossary and index formatting. --- PrimeManual.sty | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/PrimeManual.sty b/PrimeManual.sty index da8203f..25860d8 100644 --- a/PrimeManual.sty +++ b/PrimeManual.sty @@ -22,7 +22,7 @@ \newcommand{\sProjectTitle}{\makeatletter{Project \@projectNumber : \@projectDesc}} \newcommand{\sVersion}{\makeatletter{\@version}} -\RequirePackage[mark]{gitinfo2} +%\RequirePackage[mark]{gitinfo2} % Specify Fonts \RequirePackage{fontspec} @@ -84,19 +84,20 @@ {\Huge \sTitle} \vfill {\leavevmode - % Move the graphic to 0.25 in from the left edge of the paper. + % 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{graphics/prime_rule.pdf} } % The numbers here are just what looks good. - \put(100,0){ + \put(100pt,0pt){ \includegraphics{graphics/prime_heartbeat.pdf} } } \sAuthor - Revision \gitVtagn %\sVersion + Revision \sVersion \sDate \vfill @@ -112,8 +113,14 @@ % Table formatting. \renewcommand{\arraystretch}{1.5} +% Glossary formatting. \RequirePackage[nopostdot,toc]{glossaries} +% Index formatting. +\RequirePackage{makeidx} +\RequirePackage{xstring} +\newcommand{\idx}[1]{\StrSubstitute{#1}{!}{ }\index{#1}} + % Margin Note formatting. \RequirePackage{marginnote} % -38pt seems to be just the right vertical adjustment to align margin notes @@ -122,9 +129,10 @@ \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{"} \ No newline at end of file +\newcommand{\margindef}[2][0pt]{% + \index{\glsentryname{#2}}% Add a reference to this in the index. + \textbf{\gls{#2}}% This is the text that appears on the page. + \marginnote{% Create the margin note. + \margintitle{\Glsentryname{#2}:% Create the title of the margin note. + } \glsdesc*{#2}}[#1]% Create the text of the margin note. +} \ No newline at end of file