3

I am currently making the last adjustments to my groups BSc thesis and I am writing the acknowledgement. Currently it looks like:

Title
A lot of text.
                                             Name Family name, City, Month Year
Name2 Family name2
Name3 Family name3
...

But I would like it to be:

Title
A lot of text.
                                             Name Family name, City, Month Year
                                             Name2 Family name2
                                             Name3 Family name3
                                             ...

I.e, for the signature to be left aligned, but starting as many characters from the right edge as needed by the longest line in the block.

How is the achieved in the best way?

3

You can use a \pbox with the \textwidth option from the pbox package and right-align that with an \hfill like this:

\documentclass{article}

\usepackage{pbox}

\begin{document}

Title

A lot of text.

\hfill\pbox{\textwidth}{
  Name Family name, City, Month Year\\
  Name2 Family name2\\
  Name3 Family name3
}

\end{document}

The \textwidth option makes sure that the\pbox is precisely as wide as the text containing it and then the \hfill shifts that as far to the right as possible. Note that you have to put line breaks between the names, otherwise they would end up on a single line.

This produces the following output:

2
  • 3
    With no package: \hspace*{\fill}\begin{tabular}{@{}l@{}} a\\b\\c\end{tabular} – egreg Apr 24 '16 at 15:56
  • Excellent answers. Thank you a lot, both of you. – GLaDER Apr 25 '16 at 12:28

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.