- Fix \Appendices command.

- Create float for code.
- Adjust fallback font weights.
- Redefine Center environment to eliminate extra space.
- Create TblrEnviron for code.
This commit is contained in:
2025-10-17 16:52:39 -05:00
parent 47f2b67b98
commit acbc1dd669
6 changed files with 45 additions and 11 deletions

View File

@@ -160,7 +160,7 @@
\colorlet{codeKeywordColor}{PrimeLightBlue} \colorlet{codeKeywordColor}{PrimeLightBlue}
\colorlet{codeOperatorColor}{PrimeLightPink} \colorlet{codeOperatorColor}{PrimeLightPink}
\colorlet{codeCommentColor}{PrimeLightMint} \colorlet{codeCommentColor}{PrimeLightMint}
\colorlet{codeNumberColor}{textColor} \colorlet{codeNumberColor}{textColor}%{PrimeLightLime}
\colorlet{codeStringColor}{PrimeLightLime} \colorlet{codeStringColor}{PrimeLightLime}
} { } {
% Page and text colors. % Page and text colors.
@@ -200,7 +200,7 @@
\colorlet{codeKeywordColor}{PrimeBlue} \colorlet{codeKeywordColor}{PrimeBlue}
\colorlet{codeOperatorColor}{PrimePink} \colorlet{codeOperatorColor}{PrimePink}
\colorlet{codeCommentColor}{PrimeMint} \colorlet{codeCommentColor}{PrimeMint}
\colorlet{codeNumberColor}{textColor} \colorlet{codeNumberColor}{textColor}%{PrimeLime}
\colorlet{codeStringColor}{PrimeLime} \colorlet{codeStringColor}{PrimeLime}
} }

View File

@@ -64,8 +64,8 @@
\@@_heading:nnnnn {subparagraph} {#1} {#2} {#3} {#4} \@@_heading:nnnnn {subparagraph} {#1} {#2} {#3} {#4}
} }
\NewDocumentCommand{\Appendices}{}{ \NewDocumentCommand{\Appendices}{t^}{
\@@_heading:nnnnn {part} {\c_true_bool} {\c_false_bool} {Appendices} { \@@_heading:nnnnn {part} {\c_true_bool} {#1} {Appendices} {
\c_@@_appendices_label_str \c_@@_appendices_label_str
} }
} }

View File

@@ -360,4 +360,27 @@
\\ \\
\end{tblr} \end{tblr}
\end{BigFloat} \end{BigFloat}
\group_end: } \group_end: }
\NewDocumentEnvironment{CodeFloat}{
% #1: Label.
>{\TrimSpaces}m
% #2: Caption.
+m
% #3: Number of indentations.
m
% #4: Body text.
+b
}{
\begin{figure}
\begin{MyCaption}{fig:#1}{#2}
\Centering
\begin{tblrCode}{
colspec = {*{#3}{l}},
hline{1,Z} = {0.6pt},
}
#4
\end{tblrCode}
\end{MyCaption}
\end{figure}
}{}

View File

@@ -23,8 +23,8 @@
luaotfload.add_fallback( luaotfload.add_fallback(
"Roboto", { "Roboto", {
"NotoSans:mode=harf;", "NotoSans-Medium:mode=harf;",
"NotoSansSymbols:mode=harf;", "NotoSansSymbols-SemiBold:mode=harf;",
"NotoSansSymbols2:mode=harf;", "NotoSansSymbols2:mode=harf;",
"NotoEmoji:mode=harf;", "NotoEmoji:mode=harf;",
} }
@@ -33,7 +33,7 @@
luaotfload.add_fallback( luaotfload.add_fallback(
"RobotoMono", { "RobotoMono", {
"NotoMono:mode=harf;", "NotoMono:mode=harf;",
"NotoSansSymbols:mode=harf;", "NotoSansSymbols-SemiBold:mode=harf;",
"NotoSansSymbols2:mode=harf;", "NotoSansSymbols2:mode=harf;",
"NotoEmoji:mode=harf;", "NotoEmoji:mode=harf;",
} }
@@ -41,10 +41,10 @@
luaotfload.add_fallback( luaotfload.add_fallback(
"RobotoSlab", { "RobotoSlab", {
"NotoSerif:mode=harf;", "NotoSerif-SemiBold:mode=harf;",
"NotoSansSymbols:mode=harf;", "NotoSansSymbols-SemiBold:mode=harf;",
"NotoSansSymbols2:mode=harf;", "NotoSansSymbols2:mode=harf;",
"NotoEmoji:mode=harf;", "NotoEmoji-SemiBold:mode=harf;",
} }
) )
} }
@@ -56,6 +56,8 @@
BoldFont = *-SemiBold, BoldFont = *-SemiBold,
ItalicFont = *-LightItalic, ItalicFont = *-LightItalic,
BoldItalicFont = *-SemiBoldItalic, BoldItalicFont = *-SemiBoldItalic,
SlantFont = RobotoSlab-SemiBold,
BoldSlantFont = RobotoSlab-Black,
RawFeature = {fallback=RobotoSerif}, RawFeature = {fallback=RobotoSerif},
] ]

View File

@@ -108,6 +108,8 @@
} }
}{} }{}
\RenewDocumentEnvironment{Center}{}{\group_begin:\Centering}{\par\group_end:}
\ExplSyntaxOff \ExplSyntaxOff
\AtBeginDocument{ \AtBeginDocument{

View File

@@ -30,6 +30,13 @@
hline{2} = {0.4pt}, hline{2} = {0.4pt},
} }
\NewTblrEnviron{tblrCode}
\SetTblrInner[tblrCode]{
rows = {font=\ttfamily\small},
hlines = {0pt},
colsep = {0pt},
}
\NewTblrTableCommand{\midtitle}[2][pageColor]{ \NewTblrTableCommand{\midtitle}[2][pageColor]{
\SetCell[c=#2]{ \SetCell[c=#2]{
c, m, c, m,