2

I am trying to get a journal assembled for binding. When I use includepdf with a binding offset to include a pdffile of multiple pages the binding offset is incorrectly applied the first page is offset correctly but the remaining pages are not, i.e. first page has a left side offset, then the second page also has a left side offset, the third a right side offset, the forth a leftside offset, and so on.

How can I fix this problem so that pages are offset correctly?

Here is MWE and a sample input file.

MWE:

\documentclass[10pt,twosided]{book}
\usepackage{pdfpages}
\usepackage[hmarginratio=1:1,paperwidth=6in,paperheight=9in]{geometry}
\usepackage[letter,frame,axes,cross,pdftex,center]{crop}

\includepdfset{offset=0.25in 0in,noautoscale,pages={-},pagecommand={}}
\pagestyle{empty}
\begin{document}
\includepdf{file}
\end{document}

Sample Input File : ( which must be first been compiled by pdflatex to create file.pdf)

\documentclass[10pt]{article}
\setcounter{page}{29} % <--- Adjust this to correct page number
\setlength{\textwidth}{4.5in}
\setlength{\textheight}{7.125in}
\setlength{\parskip}{.07in}
\usepackage{lipsum}
\begin{document}
\title{ A file}
\author{ an author}

\maketitle

\begin{abstract}
An abstract
\end{abstract}

\lipsum[1-20]

\end{document}

Remark: I am assembling the journal by including pdf files, because combine does not work correctly and cannot handle TIKZ and so forth.

  • There is no such option as twosided. Read the console output/log: LaTeX will be telling you that this option is not used. However, since book defaults to twoside, this probably doesn't matter in practice. – cfr Jan 28 '17 at 0:55
  • Add frame to the \includepdf{} options and you will see that the offset is reversed. However, the included document is too big for the one you are including it in. – cfr Jan 28 '17 at 1:04
3

If you add frame to the \includepdf options, you will see that the offset is flipped correctly.

However, the size of the included document is much too large for the document it is included in.

Perhaps you want something like this?

adjusted offsets

\documentclass[10pt]{article}
\setcounter{page}{29} % <--- Adjust this to correct page number
\usepackage[textwidth=4.5in,textheight=7.125in,paperwidth=5.75in,paperheight=9in]{geometry}

\usepackage{parskip}
\usepackage{lipsum}
\begin{document}
\title{ A file}
\author{ an author}

\maketitle

\begin{abstract}
An abstract
\end{abstract}

\lipsum[1-20]

\end{document}

\documentclass[10pt,twoside]{book}
\usepackage{pdfpages}
\usepackage[hmarginratio=1:1,paperwidth=6in,paperheight=9in]{geometry}
\usepackage[letter,frame,axes,cross,pdftex,center]{crop}

\includepdfset{offset=.25in 0in,noautoscale,pages={-},pagecommand={}}
\pagestyle{empty}
\begin{document}
\includepdf{file}
\end{document}
  • First I want to thank you for responding. But alas I don't get the correct output like you apparently do. Also adding frame to the \includepdf options, does not show that offset is flipped correctly. How do I reduce the size of the included document? I would show the ouput but I do not know how. Also how do I reduce the size of the included document. I tried \usepackage[textwidth=4.5in,textheight=7.125in,paperwidth=5.0in,paperheight=8in]{geometry} but it did not help – Don Kreher Jan 28 '17 at 3:56
  • Do you really get different output with exactly the code I posted? That is, if you copy-paste my code into 2 empty documents, compile the first and compile the second, does it look different? If so, edit your question to include the output list of files you get by adding \listfiles to each document, before the document class. I compiled with pdflatex. If you used a different binary, please try pdflatex for comparison. – cfr Jan 28 '17 at 4:21
  • I did copy and paste exactly the code you posted and I did use pdflatex. All from a max os terminal window. I just noticed that my version came from texlive and is 2015 so I am downloading mactex-20161009. Thus I am hoping that there was a bug in the version of pdfpages that I have, but is now fixed. Only explanation I can think of. Anyway I am getting quite desperate. – Don Kreher Jan 28 '17 at 4:27
  • I'm using TeX Live 2016 updated reasonably recently, so hopefully if you install 2016 and run TLU to update, that should do it. Otherwise, look for stale files in \listfiles output e.g. ones in you personal TEXMF tree. I'm on Linux, but that shouldn't matter. You can use TEXMFHOME=/d pdflatex <filename> to eliminate your personal tree for testing purposes. – cfr Jan 28 '17 at 4:31
  • Unbelievable the new install works perfectly. Things like this can drive you crazy. Thank you so much for you help. – Don Kreher Jan 28 '17 at 4:35

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.