diff --git a/commonincludes.def b/commonincludes.def index 9fd9373..0382033 100644 --- a/commonincludes.def +++ b/commonincludes.def @@ -35,8 +35,6 @@ \RequirePackage{hyperref} -%\RequirePackage{hypcap} - \RequirePackage{ifthen} \RequirePackage{lua-widow-control} @@ -65,8 +63,6 @@ % Color import and definition \RequirePackage{xcolor} -\RequirePackage{xstring} - % A lot of other packages require Layout, so load it first. \RequirePackage{PrimeTeX/packages/Layout} diff --git a/graphics/Prime_Controls_nofont.svg b/graphics/Prime-Controls-nofont.svg similarity index 100% rename from graphics/Prime_Controls_nofont.svg rename to graphics/Prime-Controls-nofont.svg diff --git a/graphics/Prime_Controls.pdf b/graphics/Prime-Controls.pdf similarity index 100% rename from graphics/Prime_Controls.pdf rename to graphics/Prime-Controls.pdf diff --git a/graphics/Prime_Controls.svg b/graphics/Prime-Controls.svg similarity index 100% rename from graphics/Prime_Controls.svg rename to graphics/Prime-Controls.svg diff --git a/graphics/prime_controls.png b/graphics/prime-controls.png similarity index 100% rename from graphics/prime_controls.png rename to graphics/prime-controls.png diff --git a/graphics/prime_heartbeat.pdf b/graphics/prime-heartbeat.pdf similarity index 100% rename from graphics/prime_heartbeat.pdf rename to graphics/prime-heartbeat.pdf diff --git a/graphics/prime_heartbeat.pdf_tex b/graphics/prime-heartbeat.pdf-tex similarity index 100% rename from graphics/prime_heartbeat.pdf_tex rename to graphics/prime-heartbeat.pdf-tex diff --git a/graphics/prime_heartbeat.svg b/graphics/prime-heartbeat.svg similarity index 100% rename from graphics/prime_heartbeat.svg rename to graphics/prime-heartbeat.svg diff --git a/graphics/prime_rule.pdf b/graphics/prime-rule.pdf similarity index 100% rename from graphics/prime_rule.pdf rename to graphics/prime-rule.pdf diff --git a/graphics/prime_rule.pdf_tex b/graphics/prime-rule.pdf-tex similarity index 100% rename from graphics/prime_rule.pdf_tex rename to graphics/prime-rule.pdf-tex diff --git a/graphics/prime_rule.svg b/graphics/prime-rule.svg similarity index 100% rename from graphics/prime_rule.svg rename to graphics/prime-rule.svg diff --git a/packages/Boxout.sty b/packages/Boxout.sty index 0610029..a2d4ceb 100644 --- a/packages/Boxout.sty +++ b/packages/Boxout.sty @@ -8,15 +8,15 @@ \NewTblrEnviron{tblrBoxout} \SetTblrInner[tblrBoxout]{ - cells = {boxoutBG}, + cells = {boxoutBGColor}, hborder{1} = {belowspace=\boxoutpadding}, hborder{Z} = {abovespace=\boxoutpadding}, - hlines = {0pt,boxoutBG}, - hline{1,Z} = {\boxoutrule,boxoutFG}, + hlines = {0pt,boxoutBGColor}, + hline{1,Z} = {\boxoutrule,boxoutFGColor}, vborder{1} = {rightspace=\boxoutpadding}, vborder{Z} = {leftspace=\boxoutpadding}, - vlines = {0pt,boxoutBG}, - vline{1,Z} = {\boxoutrule,boxoutFG}, + vlines = {0pt,boxoutBGColor}, + vline{1,Z} = {\boxoutrule,boxoutFGColor}, } \tl_const:Nn \c_Boxout_innerspec_tl {colspec={X[l,h]}} @@ -47,10 +47,10 @@ }{ \group_begin: \keys_set:nn{Boxout}{#1} \bool_if:nT \l_Boxout_warning_bool { - \colorlet{boxoutBG}{warningBG} - \colorlet{boxoutFG}{warningFG} + \colorlet{boxoutBGColor}{warningBGColor} + \colorlet{boxoutFGColor}{warningFGColor} } - \color{text} + \color{textColor} \label{box:#2} \tl_if_empty:nTF {#3} { \expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}} diff --git a/packages/Caption.sty b/packages/Caption.sty index 2940f8b..f4256d4 100644 --- a/packages/Caption.sty +++ b/packages/Caption.sty @@ -16,7 +16,7 @@ }% } -\cs_new_protected:Nn \__MyCaption_format_default: {\Centering\small\color{caption}} +\cs_new_protected:Nn \__MyCaption_format_default: {\Centering\small\color{captionColor}} \keys_define:nn {MyCaption} { before .bool_set:N = \l_MyCaption_before_bool, diff --git a/packages/Color.sty b/packages/Color.sty index d2649c6..92145ff 100644 --- a/packages/Color.sty +++ b/packages/Color.sty @@ -122,58 +122,58 @@ \ifthenelse{\boolean{isDarkMode}\AND\boolean{isElectronic}}{ % Page and text colors. - \colorlet{page}{PrimeDarkGray} - \colorlet{text}{PrimePastelGray} + \colorlet{pageColor}{PrimeDarkGray} + \colorlet{textColor}{PrimePastelGray} - \colorlet{caption}{PrimePastelBlue} + \colorlet{captionColor}{PrimePastelBlue} - \colorlet{marginText}{PrimePastelBlue} + \colorlet{marginTextColor}{PrimePastelBlue} - \colorlet{link}{PrimeLightBlue} + \colorlet{linkColor}{PrimeLightBlue} % Banded table rows. - \colorlet{bandedRow}{PrimeGray} + \colorlet{bandedRowColor}{PrimeGray} % Boxout colors. - \colorlet{boxoutBG}{PrimeDarkBlue} - \colorlet{boxoutFG}{PrimeLightBlue} + \colorlet{boxoutBGColor}{PrimeDarkBlue} + \colorlet{boxoutFGColor}{PrimeLightBlue} % Warning Box colors. - \colorlet{warningBG}{PrimeDarkOrange} - \colorlet{warningFG}{PrimeOrange} + \colorlet{warningBGColor}{PrimeDarkOrange} + \colorlet{warningFGColor}{PrimeOrange} % Layout preview frame color. - \colorlet{layout}{PrimeGray} + \colorlet{layoutColor}{PrimeGray} }{ % Page and text colors. - \colorlet{page}{white} - \colorlet{text}{black} + \colorlet{pageColor}{white} + \colorlet{textColor}{black} - \colorlet{caption}{PrimeDarkBlue} + \colorlet{captionColor}{PrimeDarkBlue} - \colorlet{marginText}{PrimeDarkBlue} + \colorlet{marginTextColor}{PrimeDarkBlue} - \colorlet{link}{PrimeBlue} + \colorlet{linkColor}{PrimeBlue} % Banded table rows. - \colorlet{bandedRow}{PrimePaleGray} + \colorlet{bandedRowColor}{PrimePaleGray} % Boxout colors. - \colorlet{boxoutBG}{PrimePaleBlue} - \colorlet{boxoutFG}{PrimeBlue} + \colorlet{boxoutBGColor}{PrimePaleBlue} + \colorlet{boxoutFGColor}{PrimeBlue} % Warning Box colors. - \colorlet{warningBG}{PrimePastelOrange} - \colorlet{warningFG}{PrimeBrightOrange} + \colorlet{warningBGColor}{PrimePastelOrange} + \colorlet{warningFGColor}{PrimeBrightOrange} % Layout preview frame color. - \colorlet{layout}{PrimePaleBlue} + \colorlet{layoutColor}{PrimePaleBlue} } -\pagecolor{page} -\color{text} +\pagecolor{pageColor} +\color{textColor} -\colorlet{boxedcoloroutline}{text} +\colorlet{boxedcoloroutline}{textColor} \NewDocumentCommand{\boxedcolor}{ % #1: Text inside box. diff --git a/packages/Floats.sty b/packages/Floats.sty index 549f162..f05e486 100644 --- a/packages/Floats.sty +++ b/packages/Floats.sty @@ -98,7 +98,7 @@ } \begin{minipage}{\linewidth} \ifthenelse{\boolean{isDraft}}{ - {\color{layout}\rule{\textwidth}{1pt}\zws} + {\color{layoutColor}\rule{\textwidth}{1pt}\zws} #2 }{ #2 diff --git a/packages/Fonts.sty b/packages/Fonts.sty index 0503bf8..67af2a2 100644 --- a/packages/Fonts.sty +++ b/packages/Fonts.sty @@ -61,13 +61,19 @@ \NewDocumentCommand{\code}{m}{\mono{\small{}#1}} \NewDocumentCommand{\emoji}{m}{{\emfamily{}#1}} +% Line-breaking zero-width space. +\NewDocumentCommand{\zws}{}{\hspace{0pt}} +% Line-breaking dot. +\NewDocumentCommand{\bdot}{}{.\zws} + +% MenuKeys configuration. \renewmenumacro{\directory}[/]{hyphenatepaths} \renewmenumacro{\keys}[+]{shadowedangularkeys} \renewmenumacro{\menu}[>]{angularmenus} \RenewDocumentCommand{\ctrlname}{}{$\wedge$} -% Line-breaking zero-width space -\NewDocumentCommand{\zws}{}{\hspace{0pt}} -% Line-breaking dot -\NewDocumentCommand{\bdot}{}{.\zws} \ No newline at end of file +\NewDocumentCommand{\ControlString}{}{Ctrl\,\ctrl} +\NewDocumentCommand{\EnterString}{}{Enter\,\return} +\NewDocumentCommand{\ShiftString}{}{Shift\,\shift} +\NewDocumentCommand{\AltString}{}{Alt\,\altmac} \ No newline at end of file diff --git a/packages/Index.sty b/packages/Index.sty index de700c1..fe4cd95 100644 --- a/packages/Index.sty +++ b/packages/Index.sty @@ -1,4 +1,10 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{PrimeTeX/packages/Index}[2025-07-09] +\ProvidesExplPackage{PrimeTeX/packages/Index}{2025-09-15}{1.0}{ + Index commands. +} -\NewDocumentCommand{\idx}{m}{\StrSubstitute{#1}{!}{ }\index{#1}} \ No newline at end of file +\NewDocumentCommand{\idx}{m}{ + \str_set:Nn \l_tmpa_str {#1} + \str_replace_all:Nnn \l_tmpa_str {!} {~} + \index{\l_tmpa_str} +} \ No newline at end of file diff --git a/packages/Layout.sty b/packages/Layout.sty index 92e8064..f807bfd 100644 --- a/packages/Layout.sty +++ b/packages/Layout.sty @@ -14,9 +14,9 @@ % Redefine the commands geometry uses to draw the page frame to customize the % color. -\renewcommand{\Gm@vrule}{\color{layout}\vrule width 0.2pt height\textheight depth\z@} -\renewcommand{\Gm@hrule}{\color{layout}\hrule height 0.2pt depth\z@ width\textwidth} -\renewcommand{\Gm@hruled}{\color{layout}\hrule height\z@ depth0.2pt width\textwidth} +\renewcommand{\Gm@vrule}{\color{layoutColor}\vrule width 0.2pt height\textheight depth\z@} +\renewcommand{\Gm@hrule}{\color{layoutColor}\hrule height 0.2pt depth\z@ width\textwidth} +\renewcommand{\Gm@hruled}{\color{layoutColor}\hrule height\z@ depth0.2pt width\textwidth} % Suppress "Underfull \hbox" infos. \hbadness=10000 diff --git a/packages/Links.sty b/packages/Links.sty index b8b05e0..b795753 100644 --- a/packages/Links.sty +++ b/packages/Links.sty @@ -14,11 +14,11 @@ \ifthenelse{\boolean{isElectronic}}{ \hypersetup{ - allcolors = link, + allcolors = linkColor, } }{ \hypersetup{ - allcolors = text, + allcolors = textColor, pdfduplex = DuplexFlipLongEdge, pdfpagelayout = TwoPageRight, } diff --git a/packages/Marginalia.sty b/packages/Marginalia.sty index 4db8c2d..93f39d0 100644 --- a/packages/Marginalia.sty +++ b/packages/Marginalia.sty @@ -17,15 +17,15 @@ - \textheight }, yshift = {7pt}, % Just a magic number that lines up margin notes with their reference. - style~recto~outer = {\RaggedRight\small\color{marginText}}, - style~verso~outer = {\RaggedLeft\small\color{marginText}}, + style~recto~outer = {\RaggedRight\small\color{marginTextColor}}, + style~verso~outer = {\RaggedLeft\small\color{marginTextColor}}, } \NewDocumentCommand{\MarginHyperSetup}{}{ \ifthenelse{\boolean{isElectronic}}{ - \hypersetup{allcolors = link} + \hypersetup{allcolors = linkColor} }{ - \hypersetup{allcolors = marginText} + \hypersetup{allcolors = marginTextColor} } } @@ -77,7 +77,7 @@ \marginalia{ \MarginHyperSetup \begin{MyCaption}[ - format={\RaggedOutside\small\color{caption}} + format={\RaggedOutside\small\color{captionColor}} ]{fig:#3}{#4} \Centering\includegraphics[keepaspectratio,#1]{#2} \end{MyCaption} diff --git a/packages/Tables.sty b/packages/Tables.sty index 185639b..44a2902 100644 --- a/packages/Tables.sty +++ b/packages/Tables.sty @@ -15,20 +15,20 @@ hline{2} = {0.4pt}, } -\DeclareTblrTemplate{remark-tag}{default}{ - \strong{\InsertTblrRemarkTag} +\DeclareTblrTemplate{remark-tag}{default}{% + \strong{\InsertTblrRemarkTag}% } \NewTblrEnviron{tblrBanded} \SetTblrInner[tblrBanded]{ rowhead = 1, - row{odd} = {bandedRow}, - row{1} = {bg=page, font=\bfseries}, + row{odd} = {bandedRowColor}, + row{1} = {bg=pageColor, font=\bfseries}, hline{1,Z} = {0.6pt}, hline{2} = {0.4pt}, } -\NewTblrTableCommand{\midtitle}[1][page]{ +\NewTblrTableCommand{\midtitle}[1][pageColor]{ \SetCell[c=2]{ c, bg = #1, diff --git a/packages/TitlePage.sty b/packages/TitlePage.sty index 476eb08..a04f0a1 100644 --- a/packages/TitlePage.sty +++ b/packages/TitlePage.sty @@ -19,11 +19,11 @@ % 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} + \includegraphics{#1prime-rule.pdf} } % The numbers here are just what looks good. \put(100pt,0pt){ - \includegraphics{#1prime_heartbeat.pdf} + \includegraphics{#1prime-heartbeat.pdf} } }