General ⇒ jpeg and tif figures in Latex2e
-
- Posts: 5
- Joined: Mon Jul 09, 2007 8:01 pm
jpeg and tif figures in Latex2e
I am preparing a presentation and I have some jpeg and tif images that I want to put into it. I have written it in Latex2e, and I have *.eps (encapsulated postscript) figures which I can put it no problem; it is the *.jpg and *.tif which I have no idea about.
For the record here is how I input my *.eps figures:
\input{epsf}
\begin{figure}[h]
\begin{center}
\epsfxsize=10cm
\epsffile{Fig-1.eps}
\mbox{\bf Figure 1}\\
\mbox{First line} \\
\mbox{Second line \\
\mbox{ }
\end{center}
\end{figure}
Please advise -- need solution quickly.
Thanks.
The_Watcher
London
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- countbela666
- Posts: 64
- Joined: Thu Apr 26, 2007 2:44 pm
jpeg and tif figures in Latex2e
as you can read for example in this thread you cannot simply use EPS and JPG graphics in parallel and you cannot use TIF graphics with LaTeX at all.
A solution would be:
- convert your TIF images to JPG
- convert your EPS graphics to PDF or use the epstopdf package
- compile your document via pdfLaTeX (not via plain LaTeX, as you seem to be used to)
Regards
Marcel
a thousand worlds for you to see here, take my hand and follow me...
-
- Posts: 5
- Joined: Mon Jul 09, 2007 8:01 pm
jpeg and tif figures in Latex2e
countbela666 wrote: Hi,
as you can read for example in this thread you cannot simply use EPS and JPG graphics in parallel and you cannot use TIF graphics with LaTeX at all.
A solution would be:And another one: please don't use packages like epsf, epsfig and so on which are obsolete for decades, but include all your graphics regardless of which type by using the \includegraphics command of the graphicx package. Moreover it's not a good idea to use the center environment inside a figure environment as the former inserts additional vertical space whereas the \centering switch does not.
- convert your TIF images to JPG
- convert your EPS graphics to PDF or use the epstopdf package
- compile your document via pdfLaTeX (not via plain LaTeX, as you seem to be used to)
Regards
Marcel

Thanks Marcel, that is great.
I just need to know how to specify the size of the figure? At the moment, my pdf figure is below the footer level; the jpg file is better but I don't know how to control the size. In the old Latex version, it was easy with:
\epsfxsize=10cm
Thank you.
Best regards
London
- pumpkinegan
- Posts: 91
- Joined: Thu May 03, 2007 10:29 pm
jpeg and tif figures in Latex2e
Code: Select all
%%--------------------
\begin{figure}[ht]
\centering
\includegraphics[width=10cm]{figurename}
\caption{Description of figure.}
\label{fig:figurelabel}
\end{figure}
%%--------------------
Patrick.
-
- Posts: 5
- Joined: Mon Jul 09, 2007 8:01 pm
jpeg and tif figures in Latex2e
pumpkinegan wrote: Specify the width by:Other useful size specification would include [height=10cm] or [width=\textwidth] or [width=0.75\textwidth].Code: Select all
%%-------------------- \begin{figure}[ht] \centering \includegraphics[width=10cm]{figurename} \caption{Description of figure.} \label{fig:figurelabel} \end{figure} %%--------------------
Patrick.
Thanks Patrick. I have got the hang of things now.
Just one more thing, how do I get multiple figures in. Say:
(1) 2 figures next to each other; (2) 4 figures in a 2X2 block, and (3) 6 figures on a page in a 2X3 block?
Thanks.
London
- countbela666
- Posts: 64
- Joined: Thu Apr 26, 2007 2:44 pm
jpeg and tif figures in Latex2e
Have a look at the subfig package:The_Watcher wrote: Just one more thing, how do I get multiple figures in. Say:
(1) 2 figures next to each other; (2) 4 figures in a 2X2 block, and (3) 6 figures on a page in a 2X3 block?
Code: Select all
\documentclass[demo]{article}
\usepackage{graphicx,subfig}
\begin{document}
\begin{figure}
\centering
\subfloat[Subtitle 1]{\includegraphics{foo}}\quad
\subfloat[Subtitle 2]{\includegraphics{foo}}\\
\subfloat[Subtitle 3]{\includegraphics{foo}}\quad
\subfloat[Subtitle 4]{\includegraphics{foo}}\\
\subfloat[Subtitle 5]{\includegraphics{foo}}\quad
\subfloat[Subtitle 6]{\includegraphics{foo}}
\caption{Title of whole figure}
\end{figure}
\end{document}
Marcel
a thousand worlds for you to see here, take my hand and follow me...