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[...@xp\shdots@for\else\hd...@for\@ne{#1}\fi}
\newmuskip\dotsspace@
\def\shd...@for#1]{\hdots@for{#1}}
\def\hd...@for#1#2{\multicolumn{#2}c%
  {...@th\dotsspace@1.5mu\mkern-#1\dotsspace@
   \xleaders\hbox{...@th\mkern#1\dotsspace@.\mkern#1\dotssp...@$}%
           \hfill
   \mkern-#1\dotssp...@}%
   }

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to