[Tex/LaTex] On lozenge diagrams

diagrams

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?

Best Answer

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

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
\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) ;
\end{tikzpicture}
\end{document} 

Output:

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.