[texhax] adding different amounts of dots for formatting

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Thu May 7 10:17:15 CEST 2009


> Jeremy C. Reed wrote:
> > I want output like this (using random text):
> > 
> >          Vim modus	tractatos suscipiantur at . . . . . . . . ius
> > cu homero nominati	mediocrem feugait nusquam per et  . . . 
> . sanctus 
> >          consulatu	concludaturque  . . . . . . . . . . . . . mei
> >     Dicat legendos	concludaturque ne ius tale  . . . . . . . dicit 
> 
> Maybe something like this (sorry, I do not know how
> to force \begin {tabular} to create the equivalent
> of an \halign to \hsize {}) --
> 
> \documentclass {minimal}
> \begin {document}
> \begin {tabular}{ r l l }
>                      & \hbox to 0,6 \hsize {} & \\
>           Vim modus  &   tractatos suscipiantur at \dotfill & ius \\
> cu homero nominati  &   mediocrem feugait nusquam per et 
> \dotfill &  sanctus \\
>           consulatu  &   concludaturque \dotfill & mei \\
>      Dicat legendos  &   concludaturque ne ius tale \dotfill 
> & dicit \\
> \end {tabular}
> \end {document}
> 
> I'm sure a wizard could get the \dotfill into the preamble,
> but LaTeX remains more-or-less impenetrable to me :-(

And here's how to do it:

\documentclass{article}
\usepackage{array}
\begin{document}
\setlength{\tabcolsep}{0.5em}
\begin{tabular}{rp{0.6\hsize}<{\space\dotfill}@{\space}l}
           Vim modus & tractatos suscipiantur at         & ius     \\
  cu homero nominati & mediocrem feugait nusquam per et  & sanctus \\
           consulatu & concludaturque                    & mei     \\
      Dicat legendos & concludaturque ne ius tale        & dicit   \\
\end{tabular}
\end{document}

The \setlength{\tabcolsep}{0.5em} command is just a reminder of how to
change intercolumn space and the @{\space} in the table preamble is a
reminder pf how to do it "per column".

As a final comment, let me once again advertise Robin Fairbairns' "The UK
TeX FAQ", usually linked at the bottom of every single posting to this list.

Cheers, Phil



More information about the texhax mailing list