Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is it possible to set tab stops in some sort of initial formatting declaration, abstractly?

The code examples I see around town all show tabs being set by example, with \= in the first line of actual text within the tabbing environment. But I would like to avoid that; my first line will never have enough text in it to fill out up to the place where the tab is to be set.

share|improve this question

2 Answers 2

up vote 12 down vote accepted

You can set the tabs using a line with, for example, \hspace{<length>} and ending the line with the \kill command:

\documentclass{article}
\begin{document}

\begin{tabbing}
\hspace*{2cm}\=\hspace*{3cm}\= \kill
column1a \> column2a \> column3a \\
column1b \> column2b \> column3b 
\end{tabbing}

\end{document}
share|improve this answer

You can also make a custom command if you are reusing the same tabstops

\newcommand\mytabs{\hspace*{2\parindent}\=\hspace{2cm}\=\hspace{2cm}}
\newenvironment{mytabbing}[1][\mytabs]
  {\begin{tabbing}#1\kill}
  {\end{tabbing}}

which you can use as

\begin{mytabbing}
  \>aa \>bb\\
\end{mytabbing}

or

\begin{mytabbing}[\hspace*{2\parindent}\=aa~\=]
  \>aa \>bb\\
\end{mytabbing}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.