1

This is my first question here, so I try to be as specific as I can. If I made any posting error, feel free to give advice.

OK, here's my problem: How to put an appendix section title on "top" of a rotated PDF?

Let me explain.

  • I have a pdf in my appendix. This PDF contains a large table - but please assume it's just a broad image. If I want the broad image from he PDF to be more readable I need to rotate the page.
  • Also I want the page to be rotated, not the content, since I want the reader to look at the screen without breaking his/her neck
  • I want the section title "Additional Information" to appear on top of the PDF's content. So bascically the section would have to be written on the left side of the page before I rotate it

Obviously my actual code places the section title after I rotate the page and thus is unreadable (because sideways). What is the easiest way to achieve this? Preferrably without having to install any <RotateSectionTitlesInAppendixPDFs> -like ultraspecial packages.

I think that sidewaysfigure with non-rotated section-title may address my problem already, but I don't understand how I can rotate the page and not the figures.

thank you so much

    \pagebreak[4]
            \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
                \setlength{\footskip}{100pt}
                \includepdf[pagecommand={\vspace{3cm}\section{\centering Additional Information}\label{TAB:tablename}}, addtolist={1,table,description of table,nameoftable}]{Material/the_table_I_want.pdf}
            \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
        \setlength{\footskip}{50pt}```

Fiercon
  • 11
  • put the section and the tabular in a minipage and rotate that, \global has no effect on \pdfpageattr use \includegraphics not \includepdf to include your pdf table, if it's not tex source – David Carlisle Nov 02 '23 at 12:05
  • Ah I see that may have explained it bad. That table is inside a pdf, so its basically just any PDF source. I will edit my post to reflect that. To reply to your advice: You are suggesting that: 1 - I put pdf (as image) and section-title in a minipage --> actuall page would be portrait format and contain either a pdf thats to borad for the page or too small to read
      • I rotate the minipage --> I assume counterclock wise so that I can then
      • rotate he whole page by 90° clockwise, right?
    – Fiercon Nov 02 '23 at 12:18
  • 1
    \includegraphics{aaaa.pdf} doesn't make it an "image" in the sense of being a bitmap, text will still be text (it's what \includepdf uses internally anyway) it just allows you to control where the inclusion goes, rather than \includepdf which hooks the inclusion as a complete page. – David Carlisle Nov 02 '23 at 12:21
  • Note that headers and footers are not rotated with the rest of the page, but will look right if printerd. – John Kormylo Nov 02 '23 at 13:42

1 Answers1

0

You could use landscape and include the pdf with \includegraphics. The size can be adjusted with scale or with the trim key (the second is better if you want to keep the font size stable).

\documentclass[]{report}
\usepackage{graphicx,pdflscape}

\begin{document} \section{Portrait} blub

\begin{landscape}\thispagestyle{empty} \section{Landscape} \enlargethispage{3cm} \includegraphics[scale=0.6]{example-image-a4-landscape} \end{landscape}

\end{document}

enter image description here

As an alternative you should use the shipout hook, to place your pdf into the background. The effect will be similar to what pdfpages does:

\documentclass[]{report}
\usepackage{graphicx,pdflscape}

\begin{document} \section{Portrait} blub

\begin{landscape} \thispagestyle{empty} \section{Landscape} \AddToHookNext{shipout/background}{\put(0,-\paperheight){\includegraphics[angle=90]{example-image-a4-landscape}}} \end{landscape}

\end{document}

Ulrike Fischer
  • 327,261