1

I'm trying to create a line at the end of a document which will just display a name on the left and the date on the right. I've attached an example.

I've considered using tables, but that seems like overkill for something like that and I couldn't come up with decent search terms to define my problem.

How could I recreate such a line?

Example

Edit: The solution should be working as well, if the name would be substituted with a image.

2
  • \noindent Name Name \hfill Date. You may also need a \vspace{<length>} prior to it, if extra vertical space is required. Commented Mar 21, 2016 at 17:52
  • thank you. If you create an answer with that, I'll mark it solved! Commented Mar 21, 2016 at 17:54

1 Answer 1

3

As suggested in my comment to the OP, the use of \hfill provides infinitely stretchable glue that can push the surrounding material up against opposite margins. The \noindent is needed to avoid a leading paragraph indentation. Finally, I added a leading \vspace{\baselineskip} to provide a blank line before the desired name-date line.

Werner rightly notes in a comment that \nobreak may also be needed if the pagination would place the closing line on its own separate page.

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\vspace{\baselineskip}
\noindent Name Name \hfill Date
\end{document}

enter image description here

1
  • 1
    ...might need a \nobreak if this happens around the page boundary.
    – Werner
    Commented Mar 21, 2016 at 18:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .