# Tag Info

6

You get ! Missing = inserted for \ifnum. because \repeat has \ifnum#1>\z@ so #1 has to expand to a number, but it is \repeat{2}{1} which includes many non expandable constructs such as \@repeat, \relax and \advance. Also although unrelated to the error in this fragment, it is a very bad idea to redefine \repeat as it is part of the basic \loop ...

4

You can use coordinate inside a path to name the exact coordinates. You were naming the node below the desired coordinates. Code \documentclass[tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (h) at (0, 3); \coordinate (O) at (0, 0); \draw (O) -- +(-3, 0); \draw[-latex] (O) -- +(3, 0) node[right, font = ...

3

David has already explained why the nested \repeat command can't work and also why it's a bad idea to use the name \repeat. Here's a different definition, based on expl3: I'd say it's way easier, judge for yourself. \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \cs_set_eq:NN \xrepeat \prg_replicate:nn \ExplSyntaxOff \begin{document} ...

Only top voted, non community-wiki answers of a minimum length are eligible