[texhax] Warning: empty pages and cannot insert PDF or JPEG picture...

Philip G. Ratcliffe philip.ratcliffe at uninsubria.it
Mon Feb 26 11:59:02 CET 2007


> I am a newbie in Latex, finishing my second or third thing in 
> it. I use

In these cases a common piece of advice is to do some bedtime reading ;-)

> Tetex under Ubuntu 6.06 (Dapper). I run into two problems, 
> while trying
> to compile:
> First, when I use bibtex, I receive warning: empty pages in two
> references. I am using '\usepackage[longnamesfirst]{natbib}' and
> '\bibliographystyle{elsart-harv}'. All other references are okay, and
> the warning message disappears when I change 'elsart-harv' to, for
> example 'apa'.

Well, it means what it says: two of the entries in your bib file do not have
page numbers.  If that's ok with you, just ignore it, otherwise add the
relevant page numbers to the two entires in your bib file.

> Second, I simply cannot insert picture in PDF or JPEG format. Only to

Ok, this really is a VFAQ and the "graphics" documentation does answer it.
Anyway, the simple answer is: that's the way it is, you can't - but read on!

The full answer is that (La)TeX can only handle eps figures, while
pdf(La)TeX can handle jpg, pdf, png (but not eps). So if you want to use
LaTeX then your only choice is conversion to eps.  Otherwise, use pdfLaTeX.

> convert them into EPS beforehand. I use: '\usepackage{graphicx}' (or
> '\usepackage{graphics}') and standard picture insertion, from a
> guidebook:
> \begin{figure}
> \caption{\label{fig:distribution01} Title for the picture}
> \begin{center}
> \includegraphics[width=.8\textwidth]{jeff.pdf}
> \end{center}
> \end{figure}
> [snip]

By the way, it is recommended practice NOT to include the graphic file
extension, thus:

 \includegraphics[width=.8\textwidth]{jeff}

In this way you can have both formats present (eps and say jpg) and LaTeX or
pdfLaTeX will auomatically use the appropriate version.  In other words,
ALWAYS use \includegraphics (or its brother \includegraphicx) to include
graphics.

Cheers,  Phil



More information about the texhax mailing list