TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know how to place multiple nodes with same content in TikZ.

I've made a macro for it, but I think that it could have a different approach.

    node {\LARGE\bm{$\times$}}%


    (1,1) \cross
    (3,1) \cross
    (1,4) \cross
    (3,4) \cross;


So, my question is: is there any way to do something like this?

\cross{(1,1), (3,1), (1,4), (3,4)}
share|improve this question
Welcome to TeX.sx! Usually, we don't put a greeting or a "thank you" in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Upvoting is the preferred way here to say "thank you" to users who helped you. – Harish Kumar Jan 20 '13 at 1:03
Oh, I'm sorry. I'll remember it next time, thanks. – Gutierrez PS Jan 20 '13 at 1:09
@GutierrezPS, you can use a loop: \foreach \p in {(1,1),(3,1),(1,4),(3,4)}{\draw \p node {\LARGE\bm{$\times$}};}. – Sigur Jan 20 '13 at 1:11
Hm, nice approach. But it's more code than I've posted. Is there a way to put this on a macro? I mean, a macro for \cross{(1,1), (3,1), (1,4), (3,4)} with this loop? – Gutierrez PS Jan 20 '13 at 1:27
Can you write your answer separate from your question? It helps make this site more organized. :-) – hpesoj626 Jan 20 '13 at 7:36
up vote 2 down vote accepted

I've figured out that Sigur's solution was exactly what I wanted (I just needed to put in a macro). So, instead of

\newcommand{\contact}{ node {\LARGE\bm{$\times$}} }

I've used

\newcommand{\contacts}[1]{ %
    \foreach \p in {#1}{\p node {\LARGE\bm{$\times$}}} %

In this case, \contacts should be used inside a \draw block:

\draw \contacts((1,1),(5,1),(1,4),(3,1),(5,4));

That produces something like:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.