Graphics, Figures & Tables\caption Errors

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ngio
Posts: 1
Joined: Mon May 09, 2011 5:13 pm

\caption Errors

Post by ngio »

Hi,

I'm a relatively "inexperienced" LaTeX user, I have mainly only worked with \documentclass{article} but now I'm trying to write my thesis using \documentclass[12pt,letterpaper]{report}. The issue that arrises is the use of captions within my figures, from a "chapter" file. Here is the main .tex file ....

Code: Select all

\documentclass[12pt,letterpaper]{report}


\usepackage[masters,2committee]{cuthesis}
\usepackage{array}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{float}
\usepackage{subfigure}
\usepackage{amsmath,amssymb} 
\usepackage{rotating}
\usepackage{setspace}
\usepackage{longtable}
\usepackage{psfrag}
\usepackage{rotating}
\usepackage{epsfig}
\usepackage{multirow}
\usepackage{hyperref}   
\usepackage[version=3]{mhchem} 
\usepackage{lmodern}
\usepackage{verbatim}
\usepackage{color}      
\usepackage{url}
\usepackage[hang,footnotesize,bf]{caption}

%new commands
\renewcommand{\labelitemi}{$\bullet$}
\newcommand{\degree}{\ensuremath{^\circ}}
\newcommand{\hlines}{\rule{\linewidth}{0.5mm}}


% Defines relative path to folder containing your figures
\graphicspath{{figures/}}
\providecommand{\norm}[1]{\lvert#1\rvert} 

\begin{document}
\newchapter{chapter2}
\end{document}

And here is the chapter2.tex file with the figure...

Code: Select all

\chapter{Introduction}\label{ch:intro}

\section{figure testing}\label{ch:intro:firstsection}
\begin{figure}[h]
\centering
	\includegraphics[width=0.8\textwidth]{glowtext.eps}
	\caption{Glow discharge at 0.1mm, 0.5mm,1mm and 3mm~\cite{fridman}.}
\label{fig:glowtext}
\end{figure}
The error that is produced is...

Code: Select all

Non-PDF special ignored!{/usr/local/texlive/2010/texmf-var/fonts/map/pdftex/upd
map/pdftex.map}] [2] (./chapter2.tex
Chapter 1.
<figures/glowtext-eps-converted-to.pdf, id=17, 2601.72pt x 785.93625pt>
<use figures/glowtext-eps-converted-to.pdf>
./chapter2.tex:8: Undefined control sequence.
./chapter2.tex:8: Undefined control sequence.
\@calc@post@scan ...fi \fi \fi \fi \fi \calc@next 
                                                  
l.8 	\caption{
              Glow discharge at 0.1mm, 0.5mm,1mm and 3mm~\cite{fridman}.}
?


I'm guessing since I don't Identify a "Chapter1.tex" it renames the Chapter2.tex to chapter 1. Although the issue lies in the fact that I can't put a caption under the figure, if I remove the caption line the figure will be produced and no errors are made. If you need more details let me know I will gladly post them.

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: 10348
Joined: Mon Mar 10, 2008 9:44 pm

\caption Errors

Post by Stefan Kottwitz »

Hi ngio,

welcome to the board!

To make code more readable, the forum provides code tags which you can insert into your question. I just did that for you. You can finde the Code button above the text edit field when posting or editing.

Regarding the problem, perhaps the \cite{fridman} in the caption text causes it. You could try it without or write

Code: Select all

\caption{Glow discharge at 0.1mm, 0.5mm,1mm and 3mm~\protect{\cite{fridman}}.}
instead. I just don't have LaTeX at hand to test it now.

Stefan
LaTeX.org admin
Post Reply