tags:

views:

366

answers:

1

Hello, I'm having some frustration with the LaTeX tabbing environment.

For example, in this code the who-GEN friend-PL end up overlapping:

  \begin{tabbing}
    Aarude \= suhrthukalanu \= ayirunnathu? \\
    who-{\sc gen} \> friend-{\sc pl} \> happy-{\sc past}? \\
    `Whose friends were happy?'
  \end{tabbing}

So what I've been doing so far is manually adding space, like Aarude \hspace{8pt}\= ... but this doesn't seem like a good solution.

Is there anyway for the tabbing environment to automatically avoid these overlaps?

Thanks very much in advance for any help!

+1  A: 

The tabbing environment works by setting tab stops per the first line (\= markers) and then blindly following those tabs for the rest of the environment. If parts of later lines are too long to fit, there will be overlap.

Use the tabular environment instead of tabbing if you want to do avoid this, e.g., your code displays as you intend with:

\begin{tabular}{lll}
Aarude & suhrthukalanu & ayirunnathu? \\
who-{\sc gen} & friend-{\sc pl} & happy-{\sc past}? \\
\multicolumn{3}{l}{`Whose friends were happy?'}
\end{tabular}

Where \multicolumn is provided by the multicol package. You can include this by simply putting a line with \usepackage{multicol} in the preamble of our document. The first argument {lll} of \begin{tabular}{lll} defines the number of columns and their alignment (left left left, in this example). Other options are (r)ight, and (c)enter. You can also add delimiters to make it look like a table, e.g.

\begin{tabular}{|l|l|l|}
\hline Aarude & suhrthukalanu & ayirunnathu? \\
\hline who-{\sc gen} & friend-{\sc pl} & happy-{\sc past}? \\
\hline \multicolumn{3}{|l|}{`Whose friends were happy?'}\\
\hline
\end{tabular}
Timo