Page LayoutLeft and right alignment on the same line

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
sernarrow
Posts: 2
Joined: Fri May 13, 2011 6:50 pm

Left and right alignment on the same line

Post by sernarrow »

Hi,

I am trying to write two names on the same line but one is left aligned and the other is right aligned. I tried aligning by using flushright and flushleft commands but the second name goes to another line. Since I am new I couldn't find any command to do it. Can you give me an example to do it?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10328
Joined: Mon Mar 10, 2008 9:44 pm

Left and right alignment on the same line

Post by Stefan Kottwitz »

Hi,

welcome to the board!

Just use \hfill in the middle.

Stefan
LaTeX.org admin
sernarrow
Posts: 2
Joined: Fri May 13, 2011 6:50 pm

Re: Left and right alignment on the same line

Post by sernarrow »

Thank you Stefan, that works well.
Post Reply