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.

Basically following the instructions here, I'm trying to enfore a column break in my text. My text is, however, embedded within a tabbing environment, and following the said instructions results in the following error:

! Missing } inserted.
<inserted text> 
                }
l.20 {\vfill
            }
? 

Here's a minimally (not) working example:

\documentclass[12pt]{article}
\usepackage{multicol}

\begin{document}
\begin{center}
\large{\textbf{My title.}}
\end{center}
\begin{multicols}{2}
\begin{tabbing}
Here \= is \= a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
\vfill
\columnbreak
Here \> is \> a sentence\\
Here \> is \> a word\\
\end{tabbing}
\end{multicols}
\end{document}
share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

enter image description here

\documentclass[12pt]{article}
\usepackage{multicol}

\begin{document}
\begin{center}
\large{\textbf{My title.}}
\end{center}
\begin{multicols}{2}
\begin{tabbing}
Here \= is \= a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\[\fill\columnbreak]
Here \> is \> a sentence\\
Here \> is \> a word\\
\end{tabbing}
\end{multicols}
\end{document}
share|improve this answer
    
Interesting trick. But why does it work? –  A.Ellett Jan 27 '13 at 18:36
1  
@A.Ellett you can't add \vfill or \columnbreak after \\ as in the MWE as the horizontal mode cell has already been started, \\[\fill] would be standard latex way of adding fill glue at that point and since it just translates internally to end row\vskip\fill start next row It's only mild abuse to place other vertical mode commands after the fill and get end row\vskip\fill \columnbreak start next row –  David Carlisle Jan 27 '13 at 21:07
    
I appreciate you explaining that. –  A.Ellett Jan 28 '13 at 0:45
add comment

You could terminate the tabbing environment and re-establish the tab alignments in the subsequent column, together with \kill to remove the tab definitions:

enter image description here

\documentclass[12pt]{article}
\usepackage{multicol}% http://ctan.org/pkg/multicol
\begin{document}
\begin{center}
\large{\textbf{My title.}}
\end{center}
\begin{multicols}{2}
\begin{tabbing}
Here \= is \= a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word\\
Here \> is \> a sentence\\
Here \> is \> a word
\end{tabbing}
\vfill
\columnbreak
\begin{tabbing}
Here \= is \= a sentence \kill% Re-establish tab positions
Here \> is \> a word\\
\end{tabbing}
\end{multicols}
\end{document}
share|improve this answer
    
Is \kill supposed to re-establish the tab positions from the first column? In my case it doesn't. –  Sverre Jan 27 '13 at 17:52
    
@Sverre: Note that I've used \= to re-establish the tab positions. \kill just removes the line so that it isn't set/visible. –  Werner Jan 27 '13 at 18:59
add comment

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.