GeneralAdding JPEG's together with labels

General information and discussion about TeXnicCenter
Post Reply
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Adding JPEG's together with labels

Post by bazman »

Hi there,

I want to include two jpeg filies in my file. I want each jpeg to habe an individual label and then an additional overall caption/labal. Also ideally I would like to habe the two pictures side by side in a landscape configuration.

How can I do this?

my best attempt is shown below but it is in portrait configuration and does not have the caption the describes both pictues?

\begin{figure}[htpb]
\begin{minipage}{0.5\linewidth}
\centering
\includegraphics[scale=0.5]{6v1_Pre_Lehman}
\caption{Pre Lehman}
\end{minipage}%
\begin{minipage}{0.5\linewidth}
\centering
\includegraphics[scale=0.5]{6v1_Post_Lehman}
\caption{Post Lehman}
\end{minipage}
\end{figure}

Kind Regards

Baz

Recommended reading 2024:

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

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

bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Adding JPEG's together with labels

Post by bazman »

getting closer I think....

\begin{landscape}

\begin{figure}[htpb]
\begin{minipage}{0.5\linewidth}
\centering
\includegraphics[scale=0.8]{6v1_Pre_Lehman}
\caption{Pre Lehman}
\end{minipage}%
\begin{minipage}{0.5\linewidth}
\centering
\includegraphics[scale=0.8]{6v1_Post_Lehman}
\caption{Post Lehman}
\end{minipage}
\end{figure}

This does everything but add the caption


\clearpage
\begin{figure}
\centering
\subfloat
{\includegraphics[width=0.3\textwidth]{6v1_Pre_Lehman}}            
  \subfloat[Post Lehman]{\includegraphics[width=0.3\textwidth]{6v1_Post_Lehman}}
  \caption{Impiled V Imperical Volatilities}
\end{figure}
\end{landscape}

When I try to run the code above I get these errors.
[code]! LaTeX error: File `subfig.sty´ not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>

l.9 \usepackage
               {amsfonts}
! ==> Fatal error occured, no output PDF produced![/code]
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Adding JPEG's together with labels

Post by Stefan Kottwitz »

Hi,

you have to install the subfig package, and also the amsfonts package as you tried to load it.

Stefan
LaTeX.org admin
bazman
Posts: 78
Joined: Mon Jan 26, 2009 3:24 am

Re: Adding JPEG's together with labels

Post by bazman »

Hi Stefan,

I already have included amsfonts? But maybe its not being used.

When I try to intstall subfig, I get asked if I want to do it from web, directory or CD?

However the web option doesn't seem to work? It doesn't seem to know what location ot look up, I don't have a DVD or directory with subfig in it.

How can I install it via the web?
Post Reply