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

In the literature of sequence transformations, some algorithms are nicely represented as lozenge diagrams, e.g.

Wynn epsilon

or in an extended form,

Wynn table

I could probably cheat and use matrix, array or some such construct, but might there be a better way to render these in LaTeX?

share|improve this question
up vote 7 down vote accepted

I would use TikZ to draw such diagrams. Here's a small example drawing your diagram:

\matrix (m) [matrix of math nodes, row sep=2em, column sep=2em] {%
      & \varepsilon_k^{(n)}   &  \\
  \varepsilon_{k-1}^{(n+1)} & &  \varepsilon_{k+1}^{(n)} \\
      & \varepsilon_k^{(n+1)} &  \\ };
\path[-stealth] (m-2-1) edge (m-1-2) edge (m-3-2) ;
\path[stealth-] (m-2-3) edge (m-3-2) edge (m-1-2) ;


alt text

Alternative packages for such diagrams are xy-pic, amscd and PSTricks.

For more TikZ examples visit the TikZ example gallery or this blog TikZ category.

For the extended diagram, a matrix would be sufficient. But you could use the TikZ matrix of math nodes feature as well as in the first example, thus you could benefit from all features of TikZ like arrows, labelling, positioning and many more.

share|improve this answer
Hmm... as I suspected, I would require a package for this. Is there really no native way to do these lozenges in TeX/LaTeX? – user914 Aug 20 '10 at 18:19
You won't get nice arrows. – Caramdir Aug 20 '10 at 18:26
What are your reasons not to use a package? I would understand if you don't have TikZ installed, but amscd and xy-pic should be available on many systems. – Stefan Kottwitz Aug 20 '10 at 18:33
Stefan: Well not very deep reasons, admittedly: the computer where I do the typesetting isn't mine to modify. But maybe I can coax the owner into letting me install TikZ. :) – user914 Aug 20 '10 at 22:46
That's an important reason. Show him the TikZ example gallery texample.net/tikz/examples , what can be done with TikZ, it might convince him. ;-) – Stefan Kottwitz Aug 20 '10 at 23:45

For the first diagram you could use any package that is used for drawing commutative diagrams. I usually use TikZ (see also Commutative Diagramms using TikZ).

The second picture can be typeset like this:

    \epsilon_{-1}^{(0)} = 0 &                          &                    &                    & \\
                            & \epsilon_{0}^{(0)} = S_0 &                    &                    & \\
    \epsilon_{-1}^{(1)} = 0 &                          & \epsilon_{1}^{(0)} &                    & \\
                            & \epsilon_{0}^{(1)} = S_1 &                    & \epsilon_{2}^{(0)} & \\
    \epsilon_{-1}^{(2)} = 0 &                          & \epsilon_{1}^{(1)} &                    & \ddots \\
    \vdots                  & \epsilon_{0}^{(2)} = S_2 &                    & \epsilon_{2}^{(1)} & \\
    \vdots                  & \vdots                   & \epsilon_{1}^{(1)} &                    & \ddots \\
    \vdots                  & \vdots                   & \vdots             & \epsilon_{2}^{(2)} & \\
    \vdots                  & \vdots                   & \vdots             & \vdots             & \ddots \\

enter image description here

share|improve this answer
Caramdir (I'll reply here in your answer): Well if I don't need the arrows, like in the extended diagram, what would be the proper way of using matrix (or any of the other similar commands)? – user914 Aug 20 '10 at 22:49
Thanks for the edit! – user914 Aug 21 '10 at 13:26

I agree with Stefan, TikZ would be the best way to go:



    \foreach \x in {-1,...,3}
    {   \foreach \y in {0,...,3}
        {   \ifthenelse{\x=-1}{\xdef\more{=0}}{\ifthenelse{\x=0}{\xdef\more{=S_\y}}{\xdef\more{}}}
            \node[right] at (\x,\y) {$\epsilon_{\x}^{(\y)}\more$};
            \ifthenelse{\x=3}{\draw[dotted] (\x+0.5,\y) -- (\x+1,\y);}{}
            \ifthenelse{\y=3}{\draw[dotted] (\x+0.2,\y+0.5) -- (\x+0.2,6-\x/2);}{}

    \node (l) at (0,0) {$\epsilon^{n+1}_{k-1}$};
    \node (b) at (2,0) {$\epsilon^{n+1}_{k-1}$};
    \node (t) at (2,-2) {$\epsilon^{n+1}_{k-1}$};
    \node (r) at (4,-2) {$\epsilon^{n+1}_{k-1}$};
    \draw[-latex] (l.20) -- (t.200);
    \draw[-latex] (l.340) -- (b.160);
    \draw[-latex] (t.340) -- (r.160);
    \draw[-latex] (b.20) -- (r.200);


enter image description here

share|improve this answer

Your Answer


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