TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm relatively new to LaTeX and trying to come to grips with it. I understand I can resize a figure to fit the column width or text height quite easily:




I was wondering if there is an easy way to get a figure and its caption to fit in a page.

share|improve this question
Welcome to TeX.sx! – egreg Dec 21 '12 at 16:06
Do you only want to scale the figure or do you want to scale the font size of the caption too? – jonalv Dec 21 '12 at 16:09
if the figure itself is fit to the \textheight, there won't be enough space for the caption. nonetheless, if you put it into a float -- \begin{figure][p] -- it will stay together, but you will get a complaint that it's too large. you might try to apply a scaling factor, e.g. [scale=.8], instead of the height or width to get it to an acceptable size. – barbara beeton Dec 21 '12 at 16:09

Generally it's better really to design the figure to fit (or scale by a fixed amount) scaling arbitrary sized figures to fit the page means that each scales by a different amount so you get inconsistent font sizes in each figure.

However for when you need it you can go

\includegraphics[height=\dimexpr \textheight - 4\baselineskip\relax]{myfig}

assuming 4 lines worth of space is enough for your caption and its surrounding space. Using [p] as clearly it can not fit on a text page if it is that big.

share|improve this answer
\caption{The SAP data model based on an UML class diagram: classes and relationships.}
share|improve this answer
Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Peter Jansson Jun 13 '13 at 13:13
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – zeroth Jun 13 '13 at 13:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.