1

In Principles of Mathematical Analysis, Walter Rudin utilizes the following array of numbers:

I want to recreate it in TeX but I don't even know how to start. Can someone help me?

EDITED: I tried to edit some of the answers in post cited in Alenanno's comment. It kinda worked, but I couldn't make the arrows parallel.

My attempt:

$$
\begin{array}{*{6}{c}}
& \tikzmark{e1}x_{11}\tikzmark{s1} & x_{12}\tikzmark{s2} &  x_{13}\tikzmark{s3} & \cdots \\
\\
& \tikzmark{e2}x_{21} & x_{22} & x_{23}\tikzmark{s4} & \cdots \\
\\
& \tikzmark{e3}x_{31} & \tikzmark{e4}x_{32} &   \tikzmark{e5}x_{33}\tikzmark{s5} & \cdots \\
& \vdots & \vdots & \vdots & \ddots \\
\end{array}
$$
\begin{tikzpicture}[overlay,remember picture]
\foreach \i in {1,2,...,5}
  \draw[<-] ($(s\i.north east)+(-0.1,0.1)$) -- ($(e\i.south west)+(0.1,0)$);
\end{tikzpicture}
Gabriel
  • 867

2 Answers2

7

One way would be to use the TikZ matrix library. The arrows may be added using a simple loop and the automatic names assigned by the matrix of nodes operation.

parallel arrows

\documentclass[border=10pt,multi,tikz]{standalone}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}
  \matrix (m) [matrix of math nodes]
  {
    x_{11} & x_{12} & x_{13} & x_{14} & \dots \\
    x_{21} & x_{22} & x_{23} & x_{24} & \dots \\
    x_{31} & x_{32} & x_{33} & x_{34} & \dots \\
    x_{41} & x_{42} & x_{43} & x_{44} & \dots \\
    \dots \\
  };
  \foreach \i in {1,...,4} \draw [->] (m-\i-1.south west) -- (m-1-\i.north east);
\end{tikzpicture}
\end{document}
cfr
  • 198,882
0

Here is a solution with {NiceTabular} of nicematrix (and TikZ to draw the arrows). The environment {NiceTabular} of nicematrix is similar to the environment {tabular} (as provided by array) but creates PGF/TikZ nodes under the cells, rows and columns. Then, it's possible to draw whatever rule you want with TikZ.

\documentclass{article}
\usepackage{nicematrix,tikz}

\begin{document}

$\begin{NiceMatrix} x_{11} & x_{12} & x_{13} & x_{14} & \cdots \ x_{21} & x_{22} & x_{23} & x_{24} & \cdots \ x_{31} & x_{32} & x_{33} & x_{34} & \cdots \ x_{41} & x_{42} & x_{43} & x_{44} & \cdots \ \Hdotsfor{5} \ \CodeAfter \tikz \foreach \i in {2,...,5} { \draw [->,shorten > = 2pt] (\i-|1) -- (1-|\i) ; } ; \end{NiceMatrix}$

\end{document}

Output of the above code

F. Pantigny
  • 40,250