I'm struggling to make the following code work:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\foreach \point in {(0,0),(0,2),(2,0),(2,2)} {
\begin{scope}[shift={\point}]
\fill (0,0) circle (0.1) ;
\end{scope}
}
\end{tikzpicture}
\end{document}
The log contains
Package tikz Error: Cannot parse this coordinate.
See the tikz package documentation for explanation. Type H for immediate help. ...
l.11 } This error message was generated by an \errmessage command, so I can't give any explicit help. Pretend that you're Hercule Poirot: Examine all clues, and deduce the truth by order and method.Missing character: There is no ( in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no , in font nullfont!
Missing character: There is no 0 in font nullfont!
Missing character: There is no ) in font nullfont!
Is there a way to make use of these coordinates directly, or should I resort to the X/Y style?
Update: (to address the claim that () solves the problem). I have fully updated the Miktex installation through console. However, the following lines (directly connected to the usage of shift + ()) still appear:
File: epstopdf-sys.cfg 2021/03/18 v2.0 Configuration of epstopdf for MiKTeX ))
Missing character: There is no ) in font nullfont!
Missing character: There is no ) in font nullfont!
Missing character: There is no ) in font nullfont!
Missing character: There is no ) in font nullfont!
[1]
Exactly one brace for each coordinate in the list (checked with a different number of points).
[shift={(\point)}]
>>>( )
is addedMissing character: There is no ) in font nullfont!
. So, I supposed this is not the solution.\documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \foreach \point in {(0,0),(0,2),(2,0),(2,2)} \fill[shift={(\point)}] (0,0) circle (0.1) ; \end{tikzpicture} \end{document}
\foreach
loop. After correcting error in MWE, as pointed @Black Mild in his comment, your MWE works fine (no errors, no warnings, no bad boxes. I tested with recent MiKTeX bundle. SO, it seems that your installation of LaTeX is outdated.\expanded{\noexpand\begin{scope}[shift={\point}]}
works for me…