Child pages
  • Easy figure sizing in Latex
Skip to end of metadata
Go to start of metadata

The Latex \textwidth variable


It can be tricky sometimes to get figures to be the correct size in a Latex document.  Especially if you invisage changing the page width after you have written the document (see Easy page width and height changes in Latex).  An easy way to solve this problem is to use the Latex internal variable \textwidth to size your figure as a percentage of the page width.  For example to include the figure image.pdf (with pdflatex) use the following code.

\begin{figure}

    \centerline{%

        \resizebox{0.6\textwidth}{!}{\includegraphics{image.pdf}}%

    }

\end{figure}


  • No labels