Graphics, Figures & Tablestext wdith and figure widths

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
napiro
Posts: 5
Joined: Mon Dec 22, 2008 6:30 pm

text wdith and figure widths

Post by napiro »

I am writing a document and the text width is set at 6in, so I decided to make many of my figures 6in wide as well.
However, this seems to cause a little bit of extension into the margin on the right side of the page because the figure float seems to insert a bit of space to the left of the figure. Is there a way to correct this without scaling the graphic? What I would want to do is remove the left margin the float commands seem to generate.

Thanks.

The general format for inserting figures I use is:

Code: Select all

\begin{figure}
  \centering
  \scalebox{1}{
   \includegraphics{figrue1.pdf}}
  \caption[Shrot caption]{Long caption}
  \label{figureABC}
\end{figure}

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

corderin
Posts: 77
Joined: Sun Dec 14, 2008 2:27 pm

Re: text wdith and figure widths

Post by corderin »

\begin{figure}[h]
\centering
\includegraphics[width=\textwidth]{image}
\caption[Caption in TOC]{\label{fig:image}Caption.}
\end{figure}


or change width=0.9\textwidht or 0.8...
napiro
Posts: 5
Joined: Mon Dec 22, 2008 6:30 pm

Re: text wdith and figure widths

Post by napiro »

That solution ends up scaling the figure by a small amount. It is certainly an easy solution, but what i would really like to do is just align the edge of the figure flush with the left side, and the right edge should fall into place.


Oops. I guess it does do what I want. The culprit was the scalebox. Leaving that out and starting with original 6in wide graphics behaves properly. Thanks!!
Post Reply