[OS X TeX] Re: (relative amateur) right aligning a paragraph in LaTeX

Samuel samuel.lelievre.tex at free.fr
Sat Nov 11 22:20:23 EST 2006

Jason Davies wrote on 11 Nov 2006:

>Probably foolishly I moved my cv into LaTeX (foolishly
>because precise knowledge is required to get the layout
>to work). I am therefore throwing myself on your mercy
>on this...

Don't worry, many people write their CV using LaTeX, you can
manage that but as you point out you need a few tricks which
maybe you didn't use to need for other tasks because now the
layout is something you want more control on.

One way to align text to the right of the page is \hfill and
another way is \raggedright or \flushright.

For your "dates & post details" issue, use a table, in which
post details come in a p{Xcm} instead of r, l, or c, column.
If the post details overrun a line they'll align the way you
want and dates of different lengths won't matter.

For instance, assuming the text width is 15cm (which you can
control with packages such as vmargin or geometry):

July 2005 -- present
& \emph{Current position} at Where-I'm-working now\\
& in charge of this-and-that\\[3pt]
January 2003 -- June 2005
& \emph{Previous-position} at Previous-place\\
September 1998 -- December 2002
& \emph{Position-before} at Place-before, Country-before,
with two visits per term at That-place in That-country
from March 2000 to July 2002, developing a joint project\\

In writing a CV I often find it convenient for lists such as
lists of dates and some details to use tables the same width
as the textwidth.  I usually prefer longtable to tabular for
its ability to spread over a page break.
I set the textwidth using a package like vmargin or geometry
and I keep exact control of table widths by using p{Xcm} for
column types and @{} as column separators.

You might want to have a look at the longtable package; some
other interesting packages are ragged2e and booktabs.

You can fine-tune vertical spacing between lines of a table,
via the optional [length] just after the \\ ending any line,
eg you could end a table line with \\[6pt] or \\[-3pt].

You can adjust the spaces before and after longtable's with:


(which you can change again anywhere in the document).

Hope that may help.    S.L.
------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/

More information about the MacOSX-TeX mailing list