Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am doing a book of poetry for a friend, using Memoir and the poetry package. She would like the poems to print only on the right-hand pages. I can get poems to begin only on right-hand pages, but any poem that goes onto a second page obviously spills onto a left-hand page. How do I change this?

share|improve this question
1  
Use oneside option. By the way which document class you are using? –  Harish Kumar Aug 18 '12 at 23:38
    
And the left-hand pages (the ones that will not contain text) must be numbered or not? –  Gonzalo Medina Aug 18 '12 at 23:42
    
Gonzalo - The left-hand pages should be unnumbered. –  Jeremy Aug 18 '12 at 23:58
    
Harish - I am using memoir. –  Jeremy Aug 18 '12 at 23:58
1  
I suggest you to produce various pdf files and then you can join them easily (using pdftk in linux, for example). –  Sigur Aug 19 '12 at 0:27
show 6 more comments

1 Answer

up vote 6 down vote accepted

This solution is also based on package atbegshi. If an "even" poem page would be printed, then an empty page is output before. The tricky part is fixing the page counters on the page and in the .log file.

\documentclass{memoir}
\usepackage{atbegshi}
\usepackage{zref-abspage}
\usepackage{lipsum}

\newif\ifoddpoem
\newif\ifoddpoemPageInc
\AtBeginShipout{%
  \ifoddpoem
    \ifodd\value{abspage}%
      \stepcounter{page}%
      \global\oddpoemPageInctrue
      \advance\value{page} by -1\relax
    \else
      \stepcounter{abspage}%
      \global\oddpoemPageIncfalse
      \addtocounter{page}{-1}%
      \AtBeginShipoutOriginalShipout\null
      \stepcounter{page}%
    \fi
  \fi
}
\newenvironment{oddpoem}{%
  \cleardoublepage
  \oddpoemtrue
}{%
  \clearpage
  \ifoddpoemPageInc
    \addtocounter{page}{-1}%
    \global\oddpoemPageIncfalse
  \fi
}

\begin{document}

\section{Text before poem}
\lipsum[1-4]

\begin{oddpoem}
  \section{Short poem}
  \lipsum[5-8]
\end{oddpoem} 

\section{Text after short poem}
\lipsum[9-12]

\begin{oddpoem}
  \section{Long poem}
  \lipsum[13-18]
  \lipsum[22-24]
\end{oddpoem}   

\section{Text after long poem}
\lipsum[25-29]

\end{document}

enter image description here

share|improve this answer
    
Heiko - This works really well. There is some conflict with the poetry package that I'm using, but nothing that I can't fix. Thanks. –  Jeremy Aug 19 '12 at 19:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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