Featured Book

LaTeX Beginners Guide

Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 9 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Tabbing, alignment

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

Tabbing, alignment

Postby danmaker on Sun Mar 7th, 2010

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.

Thanks in advance
danmaker
 
Posts: 6
Joined: Sun Mar 7th, 2010

Re: Tabbing, alignment

Postby gmedina on Sun Mar 7th, 2010

Hi,

can't you use a tabular environment?

Code: Select all  •  Open in writeLaTeX
\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,...
User avatar
gmedina
 
Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Re: Tabbing, alignment

Postby danmaker on Sun Mar 7th, 2010

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
danmaker
 
Posts: 6
Joined: Sun Mar 7th, 2010

Re: Tabbing, alignment

Postby localghost on Sun Mar 7th, 2010

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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: Tabbing, alignment

Postby danmaker on Sun Mar 7th, 2010

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
danmaker
 
Posts: 6
Joined: Sun Mar 7th, 2010

Re: Tabbing, alignment

Postby localghost on Sun Mar 7th, 2010

Code: Select all  •  Open in writeLaTeX
\documentclass{article}

\begin{document}
  \begin{tabular}{@{}lr@{}}
    column1 & column2\\
    text & text
  \end{tabular}
\end{document
}
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: Tabbing, alignment

Postby danmaker on Sun Mar 7th, 2010

great, thanks a lot!
danmaker
 
Posts: 6
Joined: Sun Mar 7th, 2010

Re: Tabbing, alignment

Postby frabjous on Mon Mar 8th, 2010

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.

Code: Select all  •  Open in writeLaTeX
\documentclass{article}
\begin{document}
\begin{tabbing}
left \` right\\
gauche \` droit\\
links \` rechts\\
\end{tabbing}
\end{document
}
User avatar
frabjous
 
Posts: 2065
Joined: Fri Mar 6th, 2009
Location: Amherst, MA


Return to Text Formatting

Who is online

Users browsing this forum: No registered users and 9 guests