I'm trying to come up with my own command to fill what's left of the horizontal space with dots but I want the dots slightly lowered relative to the text. Here's my code :
\newcommand\ansfill{\raisebox{-.2\baselineskip}{\makebox[\linewidth]{\dotfill}}}
This works fine when there's nothing on my line
\ansline
but goes into \hbox overfull error when I add anything as the box from \makebox is always \linewidth.
e.g.
Example Text \ansfill
gives me an overfull hbox error.
I need a parameter that changes depending on what's left of the horizontal space. Something like :
\newcommand\ansfill{\raisebox{-.2\baselineskip}{\makebox[\whatever-that-is-left]{\dotfill}}}
Thanks.

\dotfillwill fill the remaining line for you. – TeXnician Aug 27 '18 at 11:13