Information and discussion about graphics, figures & tables in LaTeX documents.
sai2020
Posts: 4 Joined: Thu Jul 09, 2009 3:22 pm
Post
by sai2020 » Thu Jul 09, 2009 3:37 pm
I have a long table that is not wide. The page is more than three times the width of the table so I'd like to make the table into three columns. But how?
I tried the multicol package. But when I use it, the table simply disappears. Here's the code:
Code: Select all
\begin{multicols}{3}
\begin{table}[h!]
\begin{center}
\begin{tabular}{|c||c| p{2cm} |} \hline
\textbf{Figure} & \textbf{Page} & \textbf{From} \\ \hline \hline
Figure~\ref{Fig:Articles} & Page \pageref{Fig:Articles} & Ref \hspace{1pt} \cite{Fiebig}\\ \hline
Figure~\ref{Fig:FMag} & Page \pageref{Fig:FMag} & Wikipedia \\ \hline
Figure~\ref{Fig:AFMag} & Page \pageref{Fig:AFMag} & Wikipedia \\ \hline
Figure~\ref{Fig:FerriMag} & Page \pageref{Fig:FerriMag} & Wikipedia \\ \hline
Figure~\ref{Fig:SpinStructures} & Page \pageref{Fig:SpinStructures} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:InvSymmBreak} & Page \pageref{Fig:InvSymmBreak} & Modified from Fig~\ref{Fig:SpinStructures} \\ \hline
Figure~\ref{Fig:SymmBreak} & Page \pageref{Fig:SymmBreak} & Ref \hspace{1pt} \cite{Mathur} \\ \hline
Figure~\ref{Fig:BiFeO3} & Page \pageref{Fig:BiFeO3} & Ref Unkwn \\ \hline
Figure~\ref{Fig:TbMnO3Struct} & Page \pageref{Fig:TbMnO3Struct} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:TbMnO3SpecHeat} & Page \pageref{Fig:TbMnO3SpecHeat} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:TbMnO3Inter} & Page \pageref{Fig:TbMnO3Inter} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:TbMnO3FinalStruct} & Page \pageref{Fig:TbMnO3FinalStruct} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:Cycloidal} & Page \pageref{Fig:Cycloidal} & Me \\ \hline
Figure~\ref{Fig:DMI} & Page \pageref{Fig:DMI} & Ref \hspace{1pt} \cite{CheongReview} \\ \hline
Figure~\ref{Fig:DMISpiral} & Page \pageref{Fig:DMISpiral} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:Flop} & Page \pageref{Fig:Flop} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:AllAxes} & Page \pageref{Fig:AllAxes} & Ref \hspace{1pt} \cite{KimuraReview} \\ \hline
Figure~\ref{Fig:TbMnO3PhaseD} & Page \pageref{Fig:TbMnO3PhaseD} & Ref \hspace{1pt} \cite{KimuraPhase} \\ \hline
Figure~\ref{Fig:DyMnO3PhaseD} & Page \pageref{Fig:DyMnO3PhaseD} & Ref \hspace{1pt} \cite{KimuraPhase} \\ \hline
Figure~\ref{Fig:GdMnO3PhaseD} & Page \pageref{Fig:GdMnO3PhaseD} & Ref \hspace{1pt} \cite{KimuraPhase} \\ \hline
Figure~\ref{Fig:GdMnO3FElec} & Page \pageref{Fig:GdMnO3FElec} & Ref \hspace{1pt} \cite{KimuraPhase} \\ \hline
Figure~\ref{Fig:TbMn2O5Struct} & Page \pageref{Fig:TbMn2O5Struct} & Ref \hspace{1pt} \cite{Wang} \\ \hline
Figure~\ref{Fig:TbMn2O5Data} & Page \pageref{Fig:TbMn2O5Data} & Ref \hspace{1pt} \cite{Hur} \\ \hline
Figure~\ref{Fig:TbMn2O5Flip} & Page \pageref{Fig:TbMn2O5Flip} & Ref \hspace{1pt} \cite{Hur} \\ \hline
Figure~\ref{Fig:TbMn2O5Pressure} & Page \pageref{Fig:TbMn2O5Pressure} & Ref \hspace{1pt} \cite{delaCruzPressure} \\ \hline
Figure~\ref{Fig:TbMn2O5PressurePhaseD} & Page \pageref{Fig:TbMn2O5PressurePhaseD} & Ref \hspace{1pt} \cite{delaCruzPressure} \\ \hline
\end{tabular} \end{center} \caption{Image credits}
\end{table}
\end{multicols}
What am I doing wrong?
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
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Thu Jul 09, 2009 5:45 pm
I wonder why you don't simply use the
\listoffigures command. With
tocloft you can customize the LoF to make it appear similar to the output of your table.
If you want to stay with that table, use the
table * environment for a multicolumn document.
Best regards and welcome to the board
Thorsten
sai2020
Posts: 4 Joined: Thu Jul 09, 2009 3:22 pm
Post
by sai2020 » Fri Jul 10, 2009 3:08 am
Oh I don't mind using tocloft. But can you show me an example of how it's done?
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Fri Jul 10, 2009 11:24 am
sai2020 wrote: Oh I don't mind using tocloft. But can you show me an example of how it's done?
I couldn't explain better than the package manual does.
sai2020
Posts: 4 Joined: Thu Jul 09, 2009 3:22 pm
Post
by sai2020 » Fri Jul 10, 2009 4:55 pm
Oh Never mind. I just decided to use 9 columns and fill in accordingly..
localghost
Site Moderator
Posts: 9202 Joined: Fri Feb 02, 2007 12:06 pm
Post
by localghost » Fri Jul 10, 2009 6:34 pm
This example with
tocloft shows how it could be done.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{booktabs}
\usepackage{tocloft}
\usepackage{hyperref}
\hypersetup{%
colorlinks=true,
linktocpage
}
\renewcommand{\cftfigpresnum}{Figure }
\newlength{\figwidth}
\settowidth{\figwidth}{\cftfigpresnum\cftfigaftersnum}
\addtolength{\cftfignumwidth}{\figwidth}
\renewcommand{\cfttabpresnum}{Table }
\newlength{\tabwidth}
\settowidth{\tabwidth}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\tabwidth}
\begin{document}
\listoffigures
\listoftables
\begin{figure}[!ht]
\centering
\rule{0.75\textwidth}{0.5\textwidth}
\caption[Dummy figure]{Dummy figure~\cite{dummy}}\label{fig:dummy}
\end{figure}
\begin{table}[!ht]
\caption[Dummy table]{Dummy table~\cite{dummy}}\label{tab:dummy}
\centering
\begin{tabular}{ccc}\toprule
Table Head & Table Head & Table Head \\ \midrule
Some Values & Some Values & Some Values \\
Some Values & Some Values & Some Values \\
Some Values & Some Values & Some Values \\ \bottomrule
\end{tabular}
\end{table}
\begin{thebibliography}{99}
\bibitem{dummy} A.\ Dummy: \LaTeX\ for Dummies, 2009.
\end{thebibliography}
\end{document}
This is only a suggestion how to associate floats with references.