9

I am writing a document in which I wish to switch to landscape part way through. I thought I could use the line \usepackage[a4paper,landscape]{geometry} to accomplish this but I get an error. I suspect that this is due to apa6e. Is there a workaround for this that still allows me to use apace and have portrait and landscape in the same document?

\documentclass[leavefloats]{apa6e}
\usepackage[american]{babel}
\usepackage{csquotes}

\usepackage[a4paper,landscape]{geometry}

\abstract{This is an example of of an abstract in APA.  }
\begin{document}
\title{A Template for APA Papers}
\shorttitle{APA: A Template}
\author{John}
\authornote{\dots}
\date{\today} % or \date{24Jan11} for example
\maketitle
\end{document} 
qubyte
  • 17,299
Tyler Rinker
  • 1,093
  • 4
  • 13
  • 25
  • Are you planning to use \newgeometry to switch to landscape orientation somewhere in the middle of the document (if this is so, you won't be able to do it since \newgeometry ignores the landscape option) or do you want your entire document in landscape orientation? – Gonzalo Medina Dec 12 '11 at 02:52
  • @GonzaloMedina I plan on switching the orientation in the appendix so yes it will switch from portrait in the main document to landscape in the appendix. I didn't know the call to change layout was \newgeometry. I thought it was \begin{landscape} – Tyler Rinker Dec 12 '11 at 02:53

1 Answers1

7

\newgeometry ignores the landscape option so you won't be able to switch from portrait to landscape orientation in the middle of your document. You can use the landscape environment from the pdflscape package, but this won't take care of headers/footers or page numbers:

\documentclass[leavefloats]{apa6e}
\usepackage{,pdflscape}
\usepackage{lipsum}

\abstract{This is an example of of an abstract in APA.  }

\title{A Template for APA Papers}
\shorttitle{APA: A Template}
\author{John}
\authornote{\dots}
\date{\today} 

\begin{document}

\maketitle

\lipsum[1-10]

\begin{landscape}
\lipsum[1-10]
\end{landscape}

\end{document}

The landscape environment doen't rotate the header; to keep the header as defined in apa6e.cls when in landscape orientation, you could first remove the header/footer using \pagestyle{empty} and then use the background package to place the header; something along these lines:

\documentclass[leavefloats]{apa6e}
\usepackage[american]{babel}
\usepackage{pdflscape}
\usepackage{background}
\usepackage{lipsum}

\SetBgScale{1}
\SetBgColor{black}
\SetBgOpacity{1}
\SetBgAngle{90}
\SetBgPosition{current page.west}
\SetBgVshift{-1.3cm}
\SetBgContents{}


\abstract{This is an example of of an abstract in APA.  }

\title{A Template for APA Papers}
\shorttitle{APA: A Template}
\author{John}
\authornote{\dots}
\date{\today} 

\makeatletter
\let\StShortTitle\@shorttitle
\makeatother

\begin{document}

\maketitle

\section{lkadfjsjkdfg}
\subsection{test}

\lipsum[1-10]

\begin{landscape}
\pagestyle{empty}
\SetBgContents{%
\begin{minipage}[c][1.2\textwidth][c]{22.8cm}
\noindent\MakeUppercase{\StShortTitle}\hfill\thepage
\end{minipage}%
}

\lipsum[1-10]
\end{landscape}

\end{document}
Gonzalo Medina
  • 505,128
  • @ Gonzalo Medina That works Thank you. You said, "You can use the landscape environment from the pdflscape package, but this won't take care of headers/footers or page numbers:" How could I take care of this? – Tyler Rinker Dec 12 '11 at 03:14
  • @TylerRinker: I can't think of a quick fix for that right now; I have an idea, but perhaps it's too complicated. Perhaps someone else can suggest something. If not, then in some hours I can produce the code for my idea. Do you want to keep the standard header/footers? – Gonzalo Medina Dec 12 '11 at 03:43
  • @ Gonzalo Medina Yes I would like to keep the standard header and footer (in this case there is no footer). Thank you for your time. – Tyler Rinker Dec 12 '11 at 04:09
  • @TylerRinker: I've updated my answer with an example showing how to obtain the header in the right position when shifting to landscape orientation. – Gonzalo Medina Dec 12 '11 at 16:57
  • @ Gonzalo Medina Thank you for your time again. I ran what you had and it squawked when I tried to run exactly what you had asking for american babel so I added: \usepackage[american]{babel}. It runs to 1.40 at the \begin{minipage}and throws up an error message: ! paragraph ended before \SetBgContents was complete – Tyler Rinker Dec 12 '11 at 18:39
  • @TylerRinker: my bad. I uploaded an old testing version of the code; now I have uploaded the right version ;-) – Gonzalo Medina Dec 12 '11 at 19:17
  • @ Gonzalo Medina Very nice that's perfect. Thank you so much for taking the time to help me figure this out. I appreciate it a great deal. – Tyler Rinker Dec 12 '11 at 20:04
  • @TylerRinker: you're welcome. – Gonzalo Medina Dec 12 '11 at 20:05