Files
cs249r_book/_extensions/custom-numbered-blocks/style/foldbox.tex
Zeljko Hrcek e67b575290 Customize TOC part formatting, callout block colors and font size
Added "Part" label before part number in TOC with custom spacing and color.
Also updated styles of custom callout blocks to visually distinguish them from Quarto defaults.
2025-06-28 13:25:00 +02:00

92 lines
2.3 KiB
TeX

%%%% ---foldboxy preamble ----- %%%%%
\definecolor{fbx-default-color1}{HTML}{c7c7d0}
\definecolor{fbx-default-color2}{HTML}{a3a3aa}
\definecolor{fbox-color1}{HTML}{c7c7d0}
\definecolor{fbox-color2}{HTML}{a3a3aa}
% arguments: #1 typelabelnummer: #2 titel: #3
\newenvironment{fbx}[3]{%
\begin{tcolorbox}[
enhanced,
breakable,
%fontupper=\fontsize{8pt}{10}\selectfont,
before skip=6pt, % space avove box
after skip=6pt, % space below box
attach boxed title to top*={xshift=0pt},
boxed title style={
%fuzzy shadow={1pt}{-1pt}{0mm}{0.1mm}{gray},
arc=1.5pt,
rounded corners=north,
sharp corners=south,
top=5pt,
bottom=4pt,
overlay={
\node [left,outer sep=0em, black,draw=none,anchor=west,
rectangle,fill=none,inner sep=0pt]
at ([xshift=4mm]frame.west) {\includegraphics[width=4.2mm]{_extensions/custom-numbered-blocks/style/icons/icon_#1.pdf}};
},
},
colframe=#1-color2,
colbacktitle=#1-color1,
colback=white,
coltitle=black,
titlerule=0mm,
toprule=0.5pt,
bottomrule=0.5pt,
leftrule=2.2pt,
rightrule=0.5pt,
outer arc=1.5pt,
arc=1.5pt,
left=0.3em,
bottomtitle=1mm,
toptitle=1mm,
title=\hspace{2.3em}\textbf{#2}\hspace{0.1em}{#3},
extras middle and last={top=3pt}
]}
{\end{tcolorbox}}
% boxed environment with right border
\newenvironment{fbxSimple}[3]{\begin{tcolorbox}[
enhanced,
breakable,
%fontupper=\fontsize{8pt}{10}\selectfont,
before skip=6pt, % space avove box
after skip=6pt, % space below box
attach boxed title to top*={xshift=0pt},
boxed title style={
%fuzzy shadow={1pt}{-1pt}{0mm}{0.1mm}{gray},
arc=1.5pt,
rounded corners=north,
sharp corners=south,
top=5pt,
bottom=4pt,
overlay={
\node [left,outer sep=0em, black,draw=none,anchor=west,
rectangle,fill=none,inner sep=0pt]
at ([xshift=4mm]frame.west) {\includegraphics[width=4.2mm]{_extensions/custom-numbered-blocks/style/icons/icon_#1.pdf}};
},
},
colframe=#1-color2,
colbacktitle=#1-color1,
colback=white,
coltitle=black,
titlerule=0mm,
toprule=0.5pt,
bottomrule=0.5pt,
leftrule=2.2pt,
rightrule=0.5pt,
outer arc=1.5pt,
arc=1.5pt,
left=0.3em,
bottomtitle=1mm,
toptitle=1mm,
title=\hspace{2.3em}\textbf{#2}\hspace{0.1em}{#3},
extras middle and last={top=3pt}
]}
{\end{tcolorbox}}
%%%% --- end foldboxy preamble ----- %%%%%