Graphics, Figures & TablesImporting pictures into LaTeX

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Czarnek
Posts: 4
Joined: Sun Jul 05, 2009 10:55 pm

Importing pictures into LaTeX

Post by Czarnek »

I'm pretty new to LaTeX, and I'm having a lot of trouble importing a picture into my document. I used the following code:

\usepackage{float}
\begin{figure}{h}
\centering
\noindent\includegraphics[width=5in]{Figures/BLDCExplained.pdf}
\end{figure}

When I compile it, I get an error that says that I have no bounding box. Does anybody know how to get a bounding box or know of a program that I could use that has a built in bounding box?

Thanks,
Nick

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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Importing pictures into LaTeX

Post by localghost »

It seems that you compiled with latex instead of pdflatex. Think about if you really need the float package.

The placement parameter for the figure environment is not a mandatory but an optional argument.

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[width=5in]{Figures/BLDCExplained.pdf}
  \caption{Caption}\label{fig:BLDCExplained}
\end{figure}

Best regards
Thorsten
Post Reply