2

How can I fill blank spaces with \dotfill in \tabbing environment? How can I adjust the length of \dotfill?

\documentclass{article}
\begin{document}

\begin{tabbing}
\hspace*{3cm}\=\hspace*{2cm}\= \kill
column1a \> column2a \> column3a \\
column1b \> column2b \> column3b 
\end{tabbing}

\end{document}

tabbing

  • 1
    Apparently, the cells’ contents are always boxed at their natural width; the space between cells in a row is added later. – egreg Mar 10 '17 at 11:34
2

You could try to replace tabbing by tabular or longtable:

\documentclass{article}
\usepackage{array}
\begin{document}

\begin{tabular}{@{}p{3cm}<{\dotfill}@{}p{2cm}<{\dotfill}@{}p{\dimexpr\linewidth-5cm}<{\dotfill}@{}}
column1a & column2a & column3a \\
column1b & column2b & column3b 
\end{tabular}

\end{document}

enter image description here

resp.

\documentclass{article}
\usepackage{array,longtable}
\begin{document}

\begin{longtable}{@{}p{3cm}<{\dotfill}@{}p{2cm}<{\dotfill}@{}p{\dimexpr\linewidth-5cm}@{}}
column1a & column2a & column3a \\
column1b & column2b & column3b 
\end{longtable}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.