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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10397
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