Some \(\LaTeX\) code to start the week
Well, we’re back from the bank holiday weekend, I’m writing up a short note in \(\LaTeX\) for a project I want to work on in the future, and I want to write a small callout in a similar way to how one would in Quarto. Anyway, I quite like the pandoc-esque style of callout that’s implemented in Quarto, and since for this note I’m using Overleaf I figured I would spend a few minutes re-implementing it. Here it is. In the preamble:
% packages required
\usepackage{tcolorbox} % for the base `tcolorbox` environment
\usepackage{xcolor} % for colours
\tcbuselibrary{skins} % in order to use the `enhanced` and `overlay` features
% custom calloutbox definition
\newtcolorbox{mycalloutbox}[1]{%
% for the fancy drawing code
enhanced, % no background color
colback=white, % no visible frame
colframe=white, % title colour
coltitle=gray, % title colour
coltext=gray, \draw[gray, line width=1pt]
overlay={% thin vertical line on the left
(frame.south west)--(frame.north west);}, \bfseries\sffamily, % sans serif title
fonttitle=% custom title
title={#1} }
And in the main body:
\begin{mycalloutbox}{This is my title}
%
And this is my content.%
\end{mycalloutbox}
Enjoy!
Citation
BibTeX citation:
@online{mclatchie2025,
author = {Yann McLatchie},
title = {A Custom Callout Block in {\$\textbackslash LaTeX\$}},
date = {2025-05-06},
url = {https://yannmclatchie.github.io/blog/posts/callouts},
langid = {en}
}
For attribution, please cite this work as:
Yann McLatchie. 2025. “A Custom Callout Block in $\LaTeX$.”
May 6, 2025. https://yannmclatchie.github.io/blog/posts/callouts.