3

I would like to have a template for reformatting some arbitrary \LaTeX document in a way, that I can print and cut it, to glue it into my lab-book. To this end, the output should

  • introduce a binding-offset,

  • show crop margins for the binding-offset, as here the paper will be cut,

  • and ideally the text width is not altered, but only moved (so the format is conserved).

While the first point is easily achievable with the bindingoffset=2cm option in the geometry package, the other two points are harder to realize:

While \geometry{showframe} prints all frames, I did not find a way to restrict it to the binding-offset margin only.

Furthermore I would like to counter the change of \textwidth when a binding-offset is introduced, regardless of the documentclass used.

\documentclass[10pt]{article}

\usepackage{geometry}
  \geometry{twoside}
  % use 20mm narrower paper than A4
  \geometry{paperheight=297mm,paperwidth=190mm}
  % still use the A4 layout
  \geometry{layout=a4paper}

\usepackage[cam,a4]{crop}
  % print crop marks on odd pages (as printout is duplex)
  \crop[cross,odd]

\usepackage[utf8]{inputenc}

\begin{document}
blablub
\end{document}

However, this leaves me with the layout on the left and white space on the right - the opposite of a binding-offset. The only option crop gives is center. So how can I align the layout on the right?

Of course I could go for the following example, but that rather feels like cheating...

\documentclass[10pt]{article}

\usepackage{geometry}
  \geometry{twoside}
  % use 40mm narrower paper than A4, cheating
  \geometry{paperheight=297mm,paperwidth=**170mm**}
  % still use the A4 layout
  \geometry{layout=a4paper}

\usepackage[cam,a4,**center**]{crop}
  % print crop marks on odd pages (as printout is duplex)
  \crop[odd]

\usepackage[utf8]{inputenc}

\begin{document}
blablub
\end{document}

bumped to the homepage by Community 2 days ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your question. It will be much easier for us to reproduce your situation and make suggestions when we see compilable code, starting with \documentclass{...} and ending with \end{document}. There are packages to print crop marks. Which width do you wish to reduce to compensate for the offset? If the paper size is X, something has to be smaller to compensate! – cfr Nov 7 '14 at 1:03
  • 1
    Crop margins are to be printed when, e.g. an a4 paper is printed on the larger a3. Those mark the spots where to cut out the page. As the bindingoffset will not be cut off (that would be horrible) there is no option. You can use basic picture or something more advanced like tikZ to draw such a line. – Johannes_B Nov 22 '14 at 12:47
1
\documentclass[a4paper]{article}
\usepackage[noaxes,pdflatex,mount2]{crop}

\makeatletter

REMOVE the following line for a real document! Here \pagecolor is just used to mark the page dimensions. crop normally paints the page background a little bit over the edges of the page, which makes sense when cropping, but I just wanted to mark the (exact) page dimensions.

\gdef\CROP@overlap{0truemm}%
\makeatother

\newlength\mybindingoffset
\setlength{\mybindingoffset}{20mm}

\RequirePackage{everyshi}
\AtBeginDocument{\EveryShipout{%

This moves the page content \mybindingoffset (here: 20mm) to the right on the first (right) page, then \mybindingoffset to the left on the next (left) page and so on.

  \hoffset\mybindingoffset\relax%
  \global\multiply\mybindingoffset by -1}%
  }

\newlength\mybindingrule
\setlength{\mybindingrule}{1mm}% probably too thick

\usepackage{pdfpages}

\AddToShipoutPictureBG{%

For positive \mybindingoffset (i.e. right side), a \rule with thickness \mybindingrule and height \paperheight is placed left (\hspace*{-\mybindingrule}) of the page (and by \rlap we pretend that it is not there anyway):

\ifdim\mybindingoffset>0pt\relax%
  \rlap{\hspace*{-\mybindingrule}{\color{black}{\rule{\mybindingrule}{\paperheight}}}}%
\else%

For left sides the \rule is placed right of the page:

  \rlap{\hspace*{\paperwidth\relax}{\color{black}{\rule{\mybindingrule}{\paperheight}}}}%
\fi%
}%

\usepackage{lipsum}
\begin{document}
\pagecolor{green}% just to better show the original page
\lipsum[1-57]
\end{document}

Note that the page layout is not changed at all, but you are losing \mybindingoffset (here: 20mm) at the right of right and at the left of left pages, because it is move outside of the page, so to speak. If that is "whitespace" anyway, it might be acceptable.

Example output

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.