Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Basically I want a \vdotsfor command that does what \hdotsfor does but for vertical dots. Need to increase spacing of dots over two rows so it looks pretty instead of having to use two \vdots on both rows. (The other thread that is top-related to this has some code but it doesn't do anything for me.)

share|improve this question
    
"The other thread that is top-related..." Which other thread? –  Willie Wong Apr 18 '11 at 13:19
    
Sorry, this: tex.stackexchange.com/questions/7656/… –  P.A Apr 18 '11 at 13:21
    
Would this help: tex.stackexchange.com/questions/4746/… –  morbusg Apr 18 '11 at 16:43

1 Answer 1

I'm not sue whether this is what the OP wants: basically I put vertical dots inside a \multirow command, adapting the spread to the number of rows spanned. The spacing doesn't work, so I provide an extra argument to shift the thing vertically.

\documentclass{article}
\usepackage{multirow}
\newcommand{\vdotrows}[2][-15pt]{%
  \multirow{#2}{*}{%
    \vbox {%
      \baselineskip = \dimexpr 2pt\relax 
      \multiply\baselineskip by #2\relax
      \advance\baselineskip by 2pt\relax
      \lineskiplimit = 0pt\relax
      \kern 6pt\relax
      \vskip #1\relax%
      \hbox {.}\hbox {.}\hbox {.}}%
  }%
}
\begin{document}
\[
\left(
\begin{array}{ccccc}
  1            & 2            & \cdots & 2 & 2      \\
  \vdotrows[4pt]{3} & 1       &        &   & 2      \\
               & \vdotrows{2} & \ddots &   & \vdots \\
               &              &        & 1 & 2      \\
  1            & 1            & \cdots & 1 & 1      \\
\end{array}
\right)
\]
\end{document}
share|improve this answer

Your Answer

 
discard

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.