Graphics, Figures & TablesTable in Minipage

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ac10
Posts: 13
Joined: Wed Dec 29, 2010 3:01 pm

Table in Minipage

Post by ac10 »

Hello,

I've been using minipage for text and images in Beamer successfully. But I just came to writing notes to go with the presentation as an article and found that the same code didn't work.

I'm trying to put a table on the left hand side of the page and itemized text on the right.

The text keeps ending up below the table though. Can anyone tell me where I am going wrong?
Thanks...

Code: Select all

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage[margin=1in]{geometry}                
\usepackage{wrapfig}


\begin{document}

Lots of Text

\clearpage

\maketitle
\section{Functional Groups}


\begin{table}[h!]
\begin{minipage}[b]{0.48\linewidth}
\begin{tabular}{| c | c |}
\hline
\textbf{Functional Group} & \textbf{Compound Class \& Example}  \\ \hline
Hydroxyl & Alcohols \\ 
\includegraphics[scale=0.4]{Hydroxyl_Group.png} & \includegraphics[scale=0.18]{Ethanol.png} \\ 
 & Ethanol  \\ \hline
Aldehyde & Adehydes \\ 
\includegraphics[scale=0.3]{Aldehyde_Group.png}
& \includegraphics[scale=0.4]{Acetaldehyde.png}
 \\ 
 & Acetaldehyde  \\ \hline
\end{tabular}


\end{minipage}
\end{table}
\begin{minipage}[b]{0.48\linewidth}
\begin{itemize}
\item{Polar}
\item{Forms H-bonds with water to help dissolve molecules}
\item{Enable molecules to bond by dehydration synthesis}
\end{itemize}


\begin{itemize}
\item{C=O very reactive.}
\item{Important in building molecules.}
\item{Important in energy releasing reactions.}
\end{itemize}
\end{minipage}

\end{document}
Last edited by ac10 on Sat Nov 26, 2011 12:59 am, edited 1 time in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Re: Table in Minipage

Post by Stefan Kottwitz »

You don't need a table environment, just use tabular. And remove the empty lines before the second minipage environment, because an empty lines means a paragraph break.

Stefan
LaTeX.org admin
Post Reply