Graphics, Figures & TablesIssue with image and textwidth

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tpokala
Posts: 21
Joined: Wed Nov 10, 2010 6:13 pm

Issue with image and textwidth

Post by tpokala »

Hi, I have to use textwidth option for my images, because they are too big for page, but when I use it only 1 image is on the page. How can I fix it to have text and image on this page?

Code: Select all

\begin{figure}
\begin{center}
  \includegraphics[width=\textwidth]{imagename}
  \caption{caption}
  \label{fig:lab}
\end{center}
\end{figure}
Last edited by tpokala on Sun Jan 16, 2011 7:02 pm, edited 1 time in total.

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Issue with image and textwidth

Post by localghost »

The pictures seem just to be too big in overall size to allow additional text on the concerned pages. A minimal example with an attached image file may clarify this [1]. Otherwise I'm pessimistic for specific help.

And by the way, you should use the \centering command instead of the center environment in order to avoid additional vertical space. (In this case both won't be effective.)

[1] View topic: Avoidable mistakes


Thorsten
tpokala
Posts: 21
Joined: Wed Nov 10, 2010 6:13 pm

Re: Issue with image and textwidth

Post by tpokala »

ok, so how can I obtain the textwidth? If I will know it I will resize my images to smaller size
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Issue with image and textwidth

Post by frabjous »

tpokala wrote:ok, so how can I obtain the textwidth? If I will know it I will resize my images to smaller size
The question cannot be answered well without knowing what context your figure appears in. This is why localghost advised you to create a minimal working example with an attached image.
tpokala
Posts: 21
Joined: Wed Nov 10, 2010 6:13 pm

Re: Issue with image and textwidth

Post by tpokala »

It is so complitaed so I have resized my images trying some formats and no it works.
Post Reply