TransWikia.com

Floats/graphics’ margins in pdflscape with afterpage

TeX - LaTeX Asked by Patty-B on January 26, 2021

I am currently working on a lengthy scrbook document that includes many graphics (images, music scores, etc.). At one particular side, I have a left (even) page full of text, then using afterpageas a way to make the text/figure wrap up as neatly looking as possible. On the right side of the same doublepage, there is a full page figure, followed by three more pages with pdflscapesand two figures on each side.
My problem are the following two:
(1) When I compile the document, there appears a large white space under the first figure enter image description here.

Is it possible to get some of the text that continues a few pages later already in this space?

(2) The following landscape pages appear fine at first sight, keeping two figures at a page and leaving the page number just where it’s supposed to be (the document is for printing, that’s why).

enter image description here

However, even if I manually crop the images, there are large margins on the new top and bottom of the pages that I seem to cannot make smaller (they should be 2.7cm on each side with a bindingoffset of .3cm. Furthermore, the alternating header lets the figures float around too much. Finally, the very last figure seems to not work at all, stretching across the page. Is there any way how I can normalize the margins and save the last image?

This is my code (hopefully not too much for a MWE):

documentclass[a4paper,12pt]{scrbook}

usepackage[utf8]{inputenc}
usepackage[T2A,T1]{fontenc}
usepackage[french,USenglish,bulgarian,russian,ngerman]{babel}
usepackage{graphicx}
usepackage{float}
usepackage[top=2.5cm,bottom=3.5cm,left=2.1cm,right=4.5cm,headheight=14.5pt,footnotesep=1cm,bindingoffset=.3cm,marginparsep=1cm]{geometry}
usepackage{setspace}
usepackage[markcase=ignoreupper]{scrlayer-scrpage}
clearpairofpagestyles
automark[paragraph]{section}
ohead{headmark}
ofoot*{pagemark}
usepackage{blindtext}
usepackage[final]{pdfpages}
usepackage{pdflscape}
usepackage{afterpage}

begin{document}
   some text
    afterpage{newgeometry{top=2.5cm,bottom=3.5cm,left=3cm,right=2.7cm,bindingoffset=.3cm}noindentincludegraphics[width=textwidth]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-1.jpeg}}afterpage{clearpage
                begin{landscape}
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-2.jpeg}
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-3.jpeg}
                clearpage
                
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-4.jpeg}
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-5.jpeg}
                clearpage
                
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-6.jpeg}
                includegraphics[height=textheight]{ex/Werke/Bojanskijatmajstor/969-1039/969-1039-7.jpeg}
                clearpage
            end{landscape}}

some more text end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP