The a_lipid_CG.jpg
seems to cause the issue. As explained below this specific JPG seems to be incompatible with XeTeX.
I get the same error with the following MWE:
\documentclass{beamer}
\begin{document}
\begin{frame}
\includegraphics{a_lipid_CG.jpg}
\end{frame}
\end{document}.
Note that the [1] <use "./figs/surface.png" > [2]
is not part of the error message, but only a info message printed before it.
After running the JPG image through the conversion tool of Image Magick convert
, i.e. convert a_lipid_CG.jpg a_lipid_CG2.jpg
and testing the document with this new JPG file, the error disappears. This leads me to the conclusion that your particular JPG file is not fully compatible with XeTeX. Apparently XeTeX has issues reading the size from the meta-data from the JPG, which somehow leads to the "too-large" error.
To fix this please open the JPG file in an image manipulation program and save it again.
If you can be sure that the section header will always be at the top of the page, you could try executing the commands
\renewcommand\bottomfraction{0.9} % default value: 0.3
\renewcommand\textfraction{0.1} % default value: 0.2
in the preamble and issuing a command such as
\includegraphics[height=0.8\textheight]{myfig.png}
% If the graphics file is not embedded in a LaTeX "float" environment such
% as "table" or "figure", you may be able to set "height=0.9\textheight"
after the respective \section
header. Depending on how much space the section header takes up, you may have to fiddle a bit with the height you assign to the graphics file, i.e., you may have to try 0.7\textheight
or 0.75\textheight
.
Addendum: The form of the \includegraphics
command above assumes, implicitly, that the limiting element for the image size is its height, i.e., that even if the height is maximized the width will not exceed the \textwidth
parameter. If this assumption is incorrect, i.e., if there's a chance that the image's width will exceed \textwidth
when the image's height is maximized, you should use the following version of the command instead:
\includegraphics[height=0.8\textheight,width=\textwidth,keepaspectratio]{myfig.png}
Best Answer
Instead of
you should try
Since the
figure
environment contains a caption but (apparently) no legend, it should suffice to set aside about0.1\textheight
to place the caption material.Incidentally, since the float is almost certainly going to occupy an entire page, you might as well replace
\begin{figure}[htbp]
with\begin{figure}[p]
. If nothing else, there'll be less code clutter.