I would like to set font sizes of certain nodes in a tikzcd diagram locally. However, simply writing \small
or \tiny
does not seem to cut it: the text remains the same size as before.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}[row sep=-1ex, column sep=2em]
A \arrow[r, "\varphi"] & B \\
{\tiny 0} & {\tiny 1}
\end{tikzcd}
\end{document}
What am I missing here?
(I am aware of the possibility of setting the font size for the entire diagram with \tikzcdset
, but alas, that’s not what I want.)