2

I would like to right align dotted lines in a table as shown in the attached picture. Any idea how this can be achieved?

right align dotted lines example

\renewcommand{\arraystretch}{2.0}
\begin{tabular}{| L{80mm} @{} L{15mm} @{} L{65mm}|}
    \hline
    \multicolumn{3}{| L{160mm} |}{
        \textbf{Naam-voornaam:} ...................................................
    } 
    \\

    \textbf{Geboortedatum:} 
    \framebox(12,12){} \framebox(12,12){} / \framebox(12,12){} \framebox(12,12){} / 
            \framebox(12,12){} \framebox(12,12){} \framebox(12,12){} \framebox(12,12){}
    & \textbf{Adres:} 
    & ...................................................
    \\

    &
    &
    ...................................................
    \\

    \textbf{Tel. of GSM:} ...................................................
    & \textbf{Email:} 
    & .......................... @ .............................................
    \\

    \hline
\end{tabular}
  • Have a look at xhfill. –  Feb 25 '19 at 13:27
  • Next time you ask a question, please post a complete working example of your code (including \documentclass, preamble etc.) This will make helping you a lot easier for others. – sheß Feb 25 '19 at 13:49

1 Answers1

1

You can either define your own command and modify it as needed, e.g. based on this answer you could come up with something like:

\newcommand\dotsuntilendofline{\leavevmode\xleaders\hbox{.}\hfill\kern0pt}

or you just use \dotfill. This could give you screenshot of compiled pdf

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\begin{document}
    \renewcommand{\arraystretch}{2.0}
    \begin{tabular}{| L{0.5\textwidth} @{} L{0.1\textwidth} @{} L{0.4\textwidth}|}
     \hline
     \multicolumn{3}{|l|}{ \textbf{Naam-voornaam:} \dotfill } 
     \\
     \textbf{Geboortedatum:} \framebox(12,12){} \framebox(12,12){} / \framebox(12,12){} \framebox(12,12){} / \framebox(12,12){} \framebox(12,12){} \framebox(12,12){} \framebox(12,12){} & \textbf{Adres:} & \dotfill \\
     & & \dotfill \\
     \textbf{Tel. of GSM:} \dotfill & \textbf{Email:} & \dotfill @ \dotfill \\
     \hline
    \end{tabular}
\end{document}
sheß
  • 3,622