[Tex/LaTex] Vertical dotted column in matrix

matrices

If I wanted to "draw" dots in entire row, I'd use for expample \hdotsfor{4}, but how can I "draw" an entire column with dots, I haven't found something like \vdotsfor. With \hdotsfor{5} we get this,

\documentclass[11pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{lmodern} % load a font with all the characters
\begin{document}
    $$ 
    \begin{bmatrix}
    x_{11}       & x_{12} & x_{13} & \dots & x_{1n} \\
    x_{21}       & x_{22} & x_{23} & \dots & x_{2n} \\
    \hdotsfor{5} \\
    x_{d1}       & x_{d2} & x_{d3} & \dots & x_{dn}
    \end{bmatrix}   
    $$

\end{document}

matrix

But how can I do something like this:
vertical dotted column

Best Answer

You can get inspiration from the macro \vdotfill<number of lines> shown in this code:

\def\vdotfill#1{\vtop to0pt{\null \dimen0=#1\baselineskip\advance\dimen0 by-.4ex 
   \kern-1.6ex \cleaders\hbox{\lower.4ex\vbox to1ex{}.}\vskip\dimen0 \vss}}

$$
  \pmatrix{ x_{11} & x_{12} & x_{13} & \vdotfill4 & x_{1n} \cr
            x_{21} & x_{22} & x_{23} &            & x_{2n} \cr
            \multispan3 \dotfill     &            & \dotfill \cr
            x_{d1} & x_{d2} & x_{d3} &            & x_{dn} }
$$

\bye

vdotfill