How can I set a length of \dotfill ?
I used \dotfill {3 cm} and \dotfill \phantom{3 cm} without success. I can create a box and put dotted line there, but can it not be simpler?
\documentclass{article}
\begin{document}
Write down your name ? \dotfill \newline
What is your age ? \dotfill {3 cm} and Gender \dotfill {3cm}
\end{document}
Best Answer
Here is
\dotline[<period>]{length}
. EDITED to\leavevmode
.