Change italic font to LightItalic, add figure label macro.

This commit is contained in:
Silcantar
2025-07-02 23:06:08 -05:00
parent 9008b9e641
commit ad30cc2a41

View File

@@ -25,32 +25,34 @@
%\RequirePackage[mark]{gitinfo2} %\RequirePackage[mark]{gitinfo2}
% Specify Fonts % Specify Fonts
\RequirePackage{fontspec} %#region
% Main font: Roboto Serif \RequirePackage{fontspec}
\setmainfont{RobotoSerif}[ % Main font: Roboto Serif
Path = ./fonts/RobotoSerif/, \setmainfont{RobotoSerif}[
Extension = .ttf, Path = ./fonts/RobotoSerif/,
UprightFont = *-Light, Extension = .ttf,
BoldFont = *-Bold, UprightFont = *-Light,
ItalicFont = *-Italic, BoldFont = *-SemiBold,
BoldItalicFont = *-BoldItalic, ItalicFont = *-LightItalic,
] BoldItalicFont = *-SemiBoldItalic,
% Headings & Titles font: Roboto Slab ]
\setsansfont{RobotoSlab}[ % Headings & Titles font: Roboto Slab
Path = ./fonts/RobotoSlab/, \setsansfont{RobotoSlab}[
Extension = .ttf, Path = ./fonts/RobotoSlab/,
UprightFont = *-Regular, Extension = .ttf,
BoldFont = *-Bold, UprightFont = *-SemiBold,
] BoldFont = *-Black,
% Monospace font: Roboto Mono ]
\setmonofont{RobotoMono}[ % Monospace font: Roboto Mono
Path = ./fonts/RobotoMono/, \setmonofont{RobotoMono}[
Extension = .ttf, Path = ./fonts/RobotoMono/,
UprightFont = *-Regular, Extension = .ttf,
BoldFont = *-Bold, UprightFont = *-Regular,
ItalicFont = *-Italic, BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic, ItalicFont = *-Italic,
] BoldItalicFont = *-BoldItalic,
]
%#endregion
% Page Layout % Page Layout
\RequirePackage[pass]{geometry} \RequirePackage[pass]{geometry}
@@ -145,28 +147,38 @@
} }
% Cross references % Cross references
\newcommand{\refGeneral}[3][]{ %#region
\if\relax\detokenize{#1}\relax % Check if #1 is empty string. \newcommand{\sectionRef}[3][]{#1 \ref{#2:#3}: #3}
#3{#2}\label{ch:#2}
\else \newcommand{\lblGeneral}[4][]{
#3{#2}\label{ch:#1} \if\relax\detokenize{#1}\relax % Check if #1 is empty string.
\fi #3{#2}\label{#4:#2}
} \else
\newcommand{\refChapter}[2][]{ #3{#2}\label{#4:#1}
\refGeneral[#1]{#2}{\chapter} \fi
} }
\newcommand{\refSection}[2][]{ \newcommand{\lblChapter}[2][]{
\refGeneral[#1]{#2}{\section} \lblGeneral[#1]{#2}{\chapter}{ch}
} }
\newcommand{\refSubsection}[2][]{ \newcommand{\lblSection}[2][]{
\refGeneral[#1]{#2}{\subsection} \lblGeneral[#1]{#2}{\section}{sec}
} }
\newcommand{\refSubsubsection}[2][]{ \newcommand{\lblSubsection}[2][]{
\refGeneral[#1]{#2}{\subsubsection} \lblGeneral[#1]{#2}{\subsection}{subsec}
} }
\newcommand{\refParagraph}[2][]{ \newcommand{\lblSubsubsection}[2][]{
\refGeneral[#1]{#2}{\paragraph} \lblGeneral[#1]{#2}{\subsubsection}{sssec}
} }
\newcommand{\refSubparagraph}[2][]{ \newcommand{\lblParagraph}[2][]{
\refGeneral[#1]{#2}{\subparagraph} \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