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}
John
  • 155
  • 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 08:13
  • You probably want to minimapges. Or two columns and the section title in one column? – Johannes_B Aug 23 '16 at 08: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 08: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 08:20
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Seamus Aug 23 '16 at 08:30
  • 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 08:33
  • @Seamus was there anything else besides the inline code formatting you felt I missed? – John Aug 23 '16 at 08:35
  • @DavidCarlisle Putting it as an option in documentclass did it. Make it an answer if you want the karma. – John Aug 23 '16 at 08:37
  • @DavidCarlisle, the before the section saved my day. Thanks a lot. – Sigur Nov 28 '18 at 19:04

1 Answers1

1

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

David Carlisle
  • 757,742