diff --git a/PrimeManual.sty b/PrimeManual.sty index 1b9f0fc..39d3a73 100644 --- a/PrimeManual.sty +++ b/PrimeManual.sty @@ -25,32 +25,34 @@ %\RequirePackage[mark]{gitinfo2} % Specify Fonts -\RequirePackage{fontspec} -% Main font: Roboto Serif -\setmainfont{RobotoSerif}[ - Path = ./fonts/RobotoSerif/, - Extension = .ttf, - UprightFont = *-Light, - 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, -] +%#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 \RequirePackage[pass]{geometry} @@ -145,28 +147,38 @@ } % Cross references -\newcommand{\refGeneral}[3][]{ - \if\relax\detokenize{#1}\relax % Check if #1 is empty string. - #3{#2}\label{ch:#2} - \else - #3{#2}\label{ch:#1} - \fi -} -\newcommand{\refChapter}[2][]{ - \refGeneral[#1]{#2}{\chapter} -} -\newcommand{\refSection}[2][]{ - \refGeneral[#1]{#2}{\section} -} -\newcommand{\refSubsection}[2][]{ - \refGeneral[#1]{#2}{\subsection} -} -\newcommand{\refSubsubsection}[2][]{ - \refGeneral[#1]{#2}{\subsubsection} -} -\newcommand{\refParagraph}[2][]{ - \refGeneral[#1]{#2}{\paragraph} -} -\newcommand{\refSubparagraph}[2][]{ - \refGeneral[#1]{#2}{\subparagraph} -} \ No newline at end of file +%#region + \newcommand{\sectionRef}[3][]{#1 \ref{#2:#3}: #3} + + \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 \ No newline at end of file