Graphics, Figures & TablesSingle-column Table in a multi-column Environment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
patiobarbecue
Posts: 13
Joined: Tue Oct 27, 2009 3:28 pm

Single-column Table in a multi-column Environment

Post by patiobarbecue »

I am using multicol package to generate two columns. I would like my small table within a column. However, the multicol package always spans it across columns. My search is in vein: all posts are seeking solution on how to span table across columns -:)

Since I need to mix one column and two column within one page, it seems I have to use multicol package. But this table thing really hurts! Any solution?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Single-column Table in a multi-column Environment

Post by Stefan Kottwitz »

You could use the caption package and minipages. Here's an example for you to start:

Code: Select all

\documentclass{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{multicol}
\usepackage[font=small,labelfont=bf]{caption}
\newenvironment{Table}
  {\par\bigskip\noindent\minipage{\columnwidth}\centering}
  {\endminipage\par\bigskip}
\begin{document}
\begin{multicols}{2}
\blindtext[2]
\begin{Table}
  \begin{tabular}{cc}
    This & is \\
    a & test
  \end{tabular}
 \captionof{table}{A test table}
\end{Table}
\blindtext
\end{multicols}
\end{document}
Stefan
LaTeX.org admin
patiobarbecue
Posts: 13
Joined: Tue Oct 27, 2009 3:28 pm

Re: Single-column Table in a multi-column Environment

Post by patiobarbecue »

thks, it works! would you please write it without defining the newenvironment Table? it will help me to see what role the minipage is playing, thanks!
Post Reply