Graphics, Figures & TablesA curious case - \includegraphics fails in complex file

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sp1ker
Posts: 1
Joined: Thu Aug 20, 2009 7:53 am

A curious case - \includegraphics fails in complex file

Post by sp1ker »

Hello,

I have benefited much from the help given others in this forum - I'm hoping someone knows the answer to this problem as well. I am quite the newbie when it comes to LaTex, and am currently working on my first large project in it.

I am using MikTex 2.7 and TexMaker 1.9.2

When I try a minimal file, I use the following code

Code: Select all

\documentclass{uwothesis}
\usepackage{graphicx}
\begin{document}

\begin{figure}[p]
\centering
\includegraphics*[viewport=5cm 6cm 16cm 24cm]{pics/smallscale.pdf}
\caption[Small scale induction of pEBT7]
{Rosetta strain E. coli containing a pEBT7 expression vector were induced with 1mM IPTG and stained with Coomasie Brilliant Blue.}
\label{fig:smallscale}
\end{figure}

\end{document}
and everything works extremely well. You can see that my .sty is the one I will use for my full thesis, and I am trying to include all the caption options I will eventually include so as to make sure that these are not the culprit.

In my full thesis, I have a main file and a bunch of \include commands for the different chapters. In my preamble I have

Code: Select all

\usepackage{graphicx}
In the main body I have

Code: Select all

\include{Results}
In my "results" file, I have

Code: Select all

\begin{figure}[p]
\centering
\includegraphics*[viewport=5cm 6cm 16cm 24cm]{pics/smallscale.pdf}
\caption[Small scale induction of pEBT7]
{Rosetta strain E. coli containing a pEBT7 expression vector were induced with 1mM IPTG and stained with Coomasie Brilliant Blue.}
\label{fig:smallscale}
\end{figure}
which is copied and pasted directly from the test minimal file which worked so well.

Unfortunately, when I run this (I'm running an identical pdflatex command on both the minimal file and the full thesis) I receive a bunch of errors that are targeted on the image, including at least 3 "Undefined control sequence" errors, a "Missing number, treated as zero" error, a "LaTeX error: Too many unprocessed floats" error, and some others.

Does anyone have any ideas? Am I missing something very silly? Do I need another \usepackage command in the files that I am including? Any help would be greatly appreciated.

Thanks!!

-Isaac

Recommended reading 2024:

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

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

comet64
Posts: 3
Joined: Mon Aug 17, 2009 12:25 pm

A curious case - \includegraphics fails in complex file

Post by comet64 »

Hi,

I am not an expert but as I checked the list of errors that you mentioned
Undefined control sequence" errors, a "Missing number, treated as zero" error, a "LaTeX error: Too many unprocessed floats" error, and some others
I noticed the "unprocessed floats" error which I have also faced. It's supposed to be some problem in the way Latex handles float objects(tables and figs). I used a package to get rid of that particular error.
http://www.ctan.org/tex-archive/macros/ ... /placeins/

To use this package, just copy the style file to the folder containing the latex file you are trying to compile and insert this code:

Code: Select all

\usepackage[section] {placeins}
This forces Latex to insert all float objects at end of each section, so this might help.
Post Reply