GeneralAm I going mad?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
jediwhelan
Posts: 16
Joined: Fri Jul 25, 2008 5:54 pm

Am I going mad?

Post by jediwhelan »

Hello everyone,

I've been using Tex for a number of years now. And this is the first time i've been truly baffled.

All i'm trying to do is create a table, for which I have pasted the code below. I generated the body of the code from
the excel2latex applet. The table is rendering but there's a problem in the code somewhere because its kicking out
of the margin.

Is this something really obvious or something more devious? There's a note from the download site where I found excel2latex
which says that there is a character in the \end{tabular} command that the Mac OS doesn't like.

But I only used the body of the code.

Any ideas?

\begin{table}[htdp]
\caption{Oyu Tolgoi Measured and Indicated resource estimates including copper and gold grade values and contained metal quantities.
Resources classifications conform to CIM standards on Mineral Resources and Reserves referred to in National Instrument 43-101.}
\begin{center}
\begin{tabular}{|r|ccccc|}
\hline
{\bf Ore Resources} & {\bf Resources} & {\bf Copper } & {\bf Gold} & \multicolumn{ 2}{c}{{\bf Metal Contained}} \\

{\bf } & {\bf (tonnes x103)} & {\bf Grade} & {\bf Grade} & {\bf Copper} & {\bf Gold} \\

{\bf } & {\bf } & {\bf (\%)} & {\bf (g/t)} & {\bf (tonnes x103)} & {\bf (ounces x103)} \\
\hline
{\bf Total Measured} & 101,590.00 & 0.64\% & 1.10 & 650.18 & 3941.83 \\

{\bf Total Indicated} & 1,047,570.00 & 1.33\% & 0.42 & 13932.68 & 15519.82 \\

{\bf Total Measured + Indicated} & 1,149,160.00 & 1.2690\% & 0.48 & 14582.86 & 19461.65 \\
\hline
\end{tabular}
\end{center}
\label{reserve}
\end{table}

Recommended reading 2024:

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

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

jediwhelan
Posts: 16
Joined: Fri Jul 25, 2008 5:54 pm

Re: Am I going mad?

Post by jediwhelan »

Ps Here's the table.
Attachments
table.jpg
table.jpg (120.48 KiB) Viewed 2607 times
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Am I going mad?

Post by localghost »

You have to change the font size by using a switch. Modify your code as follows.

Code: Select all

\begin{table}[!ht]
  \centering
  \footnotesize
  \caption{Oyu Tolgoi Measured and Indicated resource estimates including copper and gold grade values and contained metal quantities. Resources classifications conform to CIM standards on Mineral Resources and Reserves referred to in National Instrument 43-101.}\label{reserve}
  \begin{tabular}{|r|ccccc|} \hline
    {\bf Ore Resources} & {\bf Resources} & {\bf Copper } & {\bf Gold} & \multicolumn{ 2}{c|}{{\bf Metal Contained}} \\
    {\bf } & {\bf (tonnes x103)} & {\bf Grade} & {\bf Grade} & {\bf Copper} & {\bf Gold} \\
    {\bf } & {\bf } & {\bf (\%)} & {\bf (g/t)} & {\bf (tonnes x103)} & {\bf (ounces x103)} \\ \hline
    {\bf Total Measured} & 101,590.00 & 0.64\% & 1.10 & 650.18 & 3941.83 \\
    {\bf Total Indicated} & 1,047,570.00 & 1.33\% & 0.42 & 13932.68 & 15519.82 \\
    {\bf Total Measured + Indicated} & 1,149,160.00 & 1.2690\% & 0.48 & 14582.86 & 19461.65 \\ \hline
  \end{tabular}
\end{table}
I may venture some hints not related to the problem. Do not use commands like \bf or similar. They come from LaTeX2.09 and therefore are obsolete. But you are working with LaTeX2e. Read more about that in l2tabu. Take a look at the booktabs package to typeset tables that are more clear. And finally, you can use the \centering switch instead of the center environment, which doesn't produce the unnecessary vertical space. Perhaps you choose a short version of the caption not to overload the List of Tables (LoF).

Code: Select all

\caption[Short caption]{Full caption}

Best regards and welcome to the board
Thorsten¹
jediwhelan
Posts: 16
Joined: Fri Jul 25, 2008 5:54 pm

Re: Am I going mad?

Post by jediwhelan »

Ok,

thanks for the uber fast reply.

To summarise, it was my caption which was the real problem. I've always just inserted tables
as pictures but they look so much prettier as latex tables. I'll check out your advice.

Thanks a bundle

Paul
Post Reply