Page LayoutLeft and right alignment on a single line

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
Shinka
Posts: 4
Joined: Thu May 21, 2009 3:48 pm

Left and right alignment on a single line

Post by Shinka »

I want to have, on a single line, some text aligned with left-alignment and some text with right-alignment. I've seen it done with;

Code: Select all

\begin{format}
  \employer{l}\title{r}\\
  \location{l}\dates{r}\\
  \body\\
\end{format}
But what if I want to defined my own 'format' ?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10397
Joined: Mon Mar 10, 2008 9:44 pm

Left and right alignment on a single line

Post by Stefan Kottwitz »

Hi Skinka,

you could insert \hfill:

left text\hfill right text

Stefan
LaTeX.org admin
Shinka
Posts: 4
Joined: Thu May 21, 2009 3:48 pm

Re: Left and right alignment on a single line

Post by Shinka »

Exactly what I was looking for, thank you.
Post Reply