So I am trying to familiarize myself with tikz \foreach command through this link Yet something strange happened. According the the linke, if I am trying to iterize two variable at the same time instead of one after the other, I should use / to separate the two. Thus a code like
\foreach \x / \y in {1/2,a/b} {``\x\ and \y''}
should yield
“1 and 2”“a and b”
But when I typed in the exact same code, instead I got a bland page.
Here is my code for reproducing purpose:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\tikz
\foreach \x / \y in {1/2,a/b} {``\x\ and \y''};
\end{document}
Thanks for the help in advance.
\tikz
? You aren’t drawing a picture.\tikz
just drops the text as it is not in a node. Either drop\tikz
, or use nodes.