5

I'd searched a while for changing the orientation of my LaTeX document from landscape to portrait in a way, that I can include other pdfs with \includepdf[..]{..} without messing around with my document layout.

The minimal example of my document looks like this. Because of many includes of other tex files it is hard to give a more complex example, at the content of my document class and other options and package-imports are provided (If necessary, you can view the whole code here).

Class file

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{chordbook}
\LoadClass[12pt,a4paper,titlepage]{scrartcl}


\RequirePackage[chorded]{songs}
\RequirePackage{caption}

\RequirePackage[ngerman]{babel}

\RequirePackage[utf8]{inputenc}

\RequirePackage{longtable}

% Header
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[OL,ER]{\textbf{\myauthor's Chordbook 2015}\\}
\fancyhead[EL,OR]{\textbf{Seite \thepage} \\ \textit{\leftmark}}

\setlength{\oddsidemargin}{0mm}
\setlength{\hoffset}{-17.4mm}
\setlength{\voffset}{-22.4mm}
\setlength{\topmargin}{0mm}
\setlength{\headheight}{15mm}
\setlength{\headsep}{5mm}
\setlength{\textheight}{173mm}
\setlength{\textwidth}{280mm}
\setlength{\headwidth}{\textwidth}
\setlength{\marginparsep}{0mm}
\setlength{\marginparwidth}{0mm}
\setlength{\footskip}{10mm}

\setlength{\songnumwidth}{15mm}
\setlength{\versenumwidth}{10mm}

\renewcommand\printchord[1]{\sffamily\slshape\small#1}

\newcommand\chordbrk{\hspace*{6.2mm}}

\RequirePackage[final]{pdfpages}
\cfoot{}
\RequirePackage[ngerman]{varioref}
\RequirePackage{lipsum}

Document

\documentclass[landscape]{../TeX/chordbook}

\usepackage{pdflscape}

\usepackage[%
    colorlinks=true,
    pdfstartview=FitV,
    linkcolor=blue,
    citecolor=green,
    urlcolor=red,
    %debug=true,
    hyperfigures=true%
    ]{hyperref}

\begin{document}

\songcolumns{2}
\columnsep=3mm

\renewcommand{\snumbgcolor}{songnr}
\renewcommand{\notebgcolor}{notes}
\renewcommand\printchord[1]{\footnotesize\sffamily
    \textit{\textcolor{linkcolor}{{#1}}}}

    \clearpage
    \songsection{A Capella}
        \begin{songs}{}
            ...
        \end{songs}

    \clearpage
    \songsection{Classic}
        \begin{songs}{}
            ...
        \end{songs}

    \clearpage
    \songsection{Folk and Medieval}
        \begin{songs}{}
            ...
        \end{songs}

    \clearpage
    \songsection{Fun}
        \begin{songs}{}
            ...
        \end{songs}{}

    \clearpage
    \songsection{Modern / Rock}{}
        \begin{songs}{}
            ...
        \end{songs}

    \clearpage
    \songsection{Oldies}
        \begin{songs}{}
            ...
        \end{songs}

    \clearpage
    \songsection{Other}
        \begin{songs}{}
            ...
        \end{songs}


    \begin{appendix}
        \setlength{\oddsidemargin}{0mm}
        %\setlength{\hoffset}{-17.4mm}
        %\setlength{\voffset}{-22.4mm}
        %\setlength{\topmargin}{0mm}
        %\setlength{\headheight}{15mm}
        %\setlength{\headsep}{5mm}
        %\setlength{\textheight}{173mm}
        %\setlength{\textwidth}{280mm}
        %\setlength{\headwidth}{\textwidth}
        \setlength{\marginparsep}{-30mm}
        \setlength{\marginparwidth}{-30mm}
        %\setlength{\footskip}{10mm}
        \begin{landscape}
            \includepdf[pages=-,scale=0.9,landscape]{../src/appendix/i_see_fire.pdf}
        \end{landscape}
    \end{appendix}
\end{document}

So my problem now is, that the included pdf will start about 40mm off the left margin but I am not able to reduce this length; also negativ values for

  • \hoffset
  • \oddsidemargin
  • \marginparsep
  • \parginparwidth

did not work, actually altering their values did not change anything.

I provide a link to a screenshot here, because I have not enough reputation to upload screenshots directly.

Does somebody have an idea of what I am doing wrong?

I cannot find a switch-like command or something like portrait ...

Regards
hringriin

2

The full solution is this:

<<<<<

\begin{landscape}
    \includepdf[pages=-,scale=0.9,landscape]{../src/appendix/i_see_fire.pdf}
\end{landscape}

=====

\setlength{\textheight}{195mm}
\begin{landscape}
    \includegraphics[scale=0.93]{../src/appendix/i_see_fire.pdf}
\end{landscape}

>>>>>

With \includepdf there is no change when altering the values vor \textheight by the way.

Regards
hringriin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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