## LaTeX forum ⇒ Text Formatting ⇒ Tabbing, alignment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
danmaker
Posts: 6
Joined: Sun Mar 07, 2010 7:24 pm

### Tabbing, alignment

Hello,

is there any way to set a right aligment of text in the tabbing environment?
The first tab has left alignment, but I need the next tab to have the text aligned to the right.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Location: Colombia
Hi,

can't you use a tabular environment?

\documentclass{article} \begin{document} \begin{tabular}{lr}   column1 & column2\\   text & text\end{tabular} \end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

danmaker
Posts: 6
Joined: Sun Mar 07, 2010 7:24 pm
hi,

tried that out, but can´t make the left column to align with the left side of the page, it sets the table in the vertical center

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
danmaker wrote:[...] tried that out, but can´t make the left column to align with the left side of the page, it sets the table in the vertical center

Please explain what the (horizontal) alignment to the left has to do with the alleged vertical centering.

Best regards
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

danmaker
Posts: 6
Joined: Sun Mar 07, 2010 7:24 pm
right, sorry about the confusion.. when I set the tabular environment, the left column doesn´t align to the left as the rest of the text in the document does

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
\documentclass{article} \begin{document}   \begin{tabular}{@{}lr@{}}     column1 & column2\\     text & text   \end{tabular}\end{document}
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

danmaker
Posts: 6
Joined: Sun Mar 07, 2010 7:24 pm
great, thanks a lot!

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am
Location: Amherst, MA
For the record, you can right align in a tabbing environment using the \ command, which will push the text right aligned up to the next tab stop, or the end of the line if there are no more assigned.

\documentclass{article}\begin{document}\begin{tabbing}left \ right\\gauche \ droit\\links \ rechts\\\end{tabbing}\end{document}