hdotsfor replacement
Dear All, is there a replacement of "hdotsfor" from LaTeX to fill several cells in a matrix row with one long series of dots? Sincerely, Michail
On Mon, 17 Aug 2009, Michail Vidiassov wrote:
Dear All,
is there a replacement of "hdotsfor" from LaTeX to fill several cells in a matrix row with one long series of dots?
Not that I know of. Currently, you can manually do this using TeX primitives. \starttext \startformula \startmathmatrix \NC a \NC b \NC c \NR \NC \spanomit\spanomit{\dotfill} \NR \NC e \NC d \NC adlsadjsak \NR \stopmathmatrix \startmathmatrix \NC a \NC b \NC c \NR \NC 45 \NC \omit\spanomit{\dotfill} \NR \NC e \NC d \NC adlsadjsak \NR \stopmathmatrix \stopformula \stoptext Hans, can we have a command to do this? Basically, \hdotsfor does two things. Span a specific number of columns and fill them with dots. The spacing between the dots should be configurable. This is how amsmath defines it. \newcommand{\hdotsfor}[1]{% \ifx[#1\@xp\shdots@for\else\hdots@for\@ne{#1}\fi} \newmuskip\dotsspace@ \def\shdots@for#1]{\hdots@for{#1}} \def\hdots@for#1#2{\multicolumn{#2}c% {\m@th\dotsspace@1.5mu\mkern-#1\dotsspace@ \xleaders\hbox{$\m@th\mkern#1\dotsspace@.\mkern#1\dotsspace@$}% \hfill \mkern-#1\dotsspace@}% } I think that in Context, we can have the following. \definemathmatrix[matrix][dotspaces=...] and then in a matrix environment, \DC[3] (dot columns 3) expands to the correct number of \omit and \spanomits. What do you think? Aditya
Dear Aditya and All, On Sun, 16 Aug 2009, Aditya Mahajan wrote:
is there a replacement of "hdotsfor" from LaTeX to fill several cells in a matrix row with one long series of dots?
Not that I know of. Currently, you can manually do this using TeX primitives.
\startformula \startmathmatrix \NC a \NC b \NC c \NR \NC \spanomit\spanomit{\dotfill} \NR \NC e \NC d \NC adlsadjsak \NR \stopmathmatrix \startmathmatrix \NC a \NC b \NC c \NR \NC 45 \NC \omit\spanomit{\dotfill} \NR \NC e \NC d \NC adlsadjsak \NR \stopmathmatrix \stopformula
"\multispan{num}{\dotfill}" may be an alternative for \omit\spanomit\spanomit\..., but half of the white space separating columns has to be added before dots in any case. How to do get that amount? In the above examples dots appear to be shifted to the left from the desired position. Sincerely, Michail
participants (2)
-
Aditya Mahajan
-
Michail Vidiassov