2

I am trying to use a supertabular in twocolumn mode. The \twocolumn command creates a page break just after the section. How do I prevent that?

\documentclass[10pt]{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage[swedish]{babel}%
\usepackage{fancyhdr}%
\usepackage{graphicx}%
\usepackage{siunitx}%
\usepackage{gensymb}%
\usepackage[scaled]{helvet}%
\usepackage[margin=30mm,headsep=20mm]{geometry}%
\usepackage{siunitx}%
\usepackage{tabu}%
\usepackage{supertabular}
\pagestyle{fancy}%
\lhead{\includegraphics[width=50mm,keepaspectratio=true]{logo}}%
\rhead{Körinstruktion: 1001}%
\cfoot{\today}%
\DeclareSIUnit\rpm{rpm}%
\sisetup{per-mode=symbol}%
\renewcommand\familydefault{\sfdefault}%
%
\begin{document}%
\section*{TEST}%
\twocolumn
\begin{supertabular}{l l}%
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
  \textbf{Label} & Value \\
\end{supertabular}%
\end{document}

Edit

Tried this, but it does not split the table rows in two columns

\begin{document}%
\section*{TEST}%
\begin{minipage}[t]{\textwidth}
  \twocolumn
  \begin{supertabular}{l l}%
    \textbf{Label} & Value \\
    ...
  \end{supertabular}%
\end{minipage}
\end{document}
  • 1
    Welcome, you can't. This is pretty much all \twocolumn does. Start a new page, start two columns. – Johannes_B Aug 23 '16 at 8:13
  • You probably want to minimapges. Or two columns and the section title in one column? – Johannes_B Aug 23 '16 at 8:14
  • I am creating these pages using pylatex. I want to split the table rows into two columns to save vertical space. I will give minipages a try – John Aug 23 '16 at 8:15
  • Nope... The table wont split when wrapping in a minipage. Tried setting its width to both \textwidth and \linewidth – John Aug 23 '16 at 8:20
  • 2
    in this case put \twocolumn before the section or use the [twocolumn] documentclass option, if you can't do that in your full document give more context. – David Carlisle Aug 23 '16 at 8:33
1

If you want the whole document to be twocolumn it is better yo use the [twocolumn] documentclass option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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