TeX - LaTeX Asked on January 20, 2021
Consider the following MWE (you will need a test.pdf image to compile this).
This should compile using standard LaTeX. The problem is
there is an extra page inserted before the image .PDF.
documentclass[]{memoir}
usepackage{graphicx}
usepackage{caption}
usepackage{epstopdf}
epstopdfDeclareGraphicsRule{.pdf}{png}{.png}{convert #1 OutputFile}
AppendGraphicsExtensions{.pdf}
begin{document}
eject pdfpagewidth=8.27in pdfpageheight=21.5in
section{Vision}
begin{center}
includegraphics[width=0.9textwidth]{test.pdf}
captionof{figure}{Caption.}
end{center}
eject pdfpagewidth=8.27in pdfpageheight=11.69in
end{document}
Please note that none of this weird behavior happens when using the following code (.PDF is here replaced by a dummy non-.PDF image):
documentclass[]{memoir}
usepackage{graphicx}
usepackage{duckuments}
usepackage{caption}
begin{document}
eject pdfpagewidth=8.27in pdfpageheight=21.5in
section{Vision}
begin{center}
includegraphics[width=3cm]{example-image-duck}
captionof{figure}{Caption.}
end{center}
eject pdfpagewidth=8.27in pdfpageheight=11.69in
end{document}
Thanks to Ulrike Fischer:
Wrapping it inside
begin{minipage}[t]{1textwidth}
will fix it.
Update after David's comment:
noindentbegin{minipage}{textwidth}
Answered by O0123 on January 20, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP