- 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

@@ -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}
@@ -211,4 +225,10 @@
\def\boxedcolortext{\strut{}#1}%
}%
\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}}