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