0

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.)

1 Answer 1

2

Using \scriptscriptstyle or \scriptstyle where the text not 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 \\
{\scriptscriptstyle 0} & {\scriptscriptstyle 1}
\end{tikzcd}
\end{document}

enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{cd}
\begin{document}
\begin{tikzcd}[row sep=-1ex, column sep=2em]
A \arrow[r, "\varphi"] & B \\
{\scriptstyle 0} & {\scriptstyle 1}
\end{tikzcd}
\end{document}

enter image description here

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .