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 am using a TikZ matrix to make a diagram where the entries in a row vary considerably in size:




        \foreach \x in {0.1, 0.3,...,1}
            \foreach \y in {0.1, 0.3,...,1}
                \fill (\x,\y) circle [radius=\r/5 pt];

    feature box/.style = {rectangle, draw, anchor=center},

    \matrix [
        matrix of math nodes,
        column sep = 1cm,
        row sep = 0.1cm
        |(a)| a & \node [feature box] (f1) {\RandomDots}; \\
        |(b)| b & \node [feature box] (f2) {\RandomDots}; \\

    \draw [->] (a) -- (f1);
    \draw [->] (b) -- (f2);

The resulting image looks like this:

enter image description here

However, I would like the connections to be horizontal/the box from \RandomDots to be vertically aligned with the letters in the first column.

Does anyone know of a way to do this?

share|improve this question
Adding nodes={anchor=east} (or west) to your matrix can help in this specific case. – percusse Jun 6 '12 at 14:04
up vote 4 down vote accepted


\draw [->] (a) -- (f1.west|-a);

\draw [->] (b) -- (f2.west|-b);
share|improve this answer
Thanks a lot! I didn't realize that connection from Karl's example :-) – Robert Jun 6 '12 at 22:06

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.