- Fix Boxout default format.

- Add colors and macros for code snippet syntax highlighting.
- Change default mono font weight back regular.
This commit is contained in:
Silcantar
2025-09-26 23:00:27 -05:00
parent dc861e9530
commit 9d072c8191
3 changed files with 24 additions and 4 deletions

View File

@@ -83,7 +83,7 @@
\tl_if_empty:nTF {#3} {
% No header
\expanded{\noexpand\begin{tblrBoxout}{\l_Boxout_innerspec_tl}}
\__Boxout_format:\ignorespaces#4\\
\__Boxout_default_format:\__Boxout_format:\ignorespaces#4\\
\end{tblrBoxout}
}{
% Yes header

View File

@@ -155,6 +155,13 @@
% Layout preview frame color.
\colorlet{layoutColor}{PrimeGray}
% Code snippet syntax highlighting colors.
\colorlet{codeKeywordColor}{PrimeLightBlue}
\colorlet{codeOperatorColor}{PrimeLightOrange}
\colorlet{codeCommentColor}{PrimeLightMint}
\colorlet{codeNumberColor}{PrimeLightPink}
\colorlet{codeStringColor}{PrimeLightLime}
} {
% Page and text colors.
\colorlet{pageColor}{white}
@@ -188,6 +195,13 @@
% Layout preview frame color.
\colorlet{layoutColor}{PrimePaleBlue}
% Code snippet syntax highlighting colors.
\colorlet{codeKeywordColor}{PrimeDarkBlue}
\colorlet{codeOperatorColor}{PrimeDarkOrange}
\colorlet{codeCommentColor}{PrimeDarkMint}
\colorlet{codeNumberColor}{PrimeDarkPink}
\colorlet{codeStringColor}{PrimeDarkLime}
}
\pagecolor{pageColor}
@@ -212,3 +226,9 @@
}%
\fcolorbox{boxedcoloroutline}{#2}{\small\color{#3}\boxedcolortext}%
}
\NewDocumentCommand{\codekw}{m}{{\color{codeKeywordColor}#1}}
\NewDocumentCommand{\codeop}{m}{{\color{codeOperatorColor}#1}}
\NewDocumentCommand{\codecm}{m}{{\color{codeCommentColor}#1}}
\NewDocumentCommand{\codenm}{m}{{\color{codeNumberColor}#1}}
\NewDocumentCommand{\codest}{m}{{\color{codeStringColor}#1}}

View File

@@ -34,9 +34,9 @@
\setmonofont{RobotoMono}[
Path = {\fontpath/RobotoMono/},
Extension = .ttf,
UprightFont = *-Medium,
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-MediumItalic,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
]