4

In an answer to this question, Tobi posted an image of a few lines of text, and then, blurred and with a slight skip, the lines of the text that appear on the backside of the page, in reverse order:

enter image description here

The bottom picture, then, is how it should look in a printed book: The lines on the backpage exactly the same height, so they don΄t shine through.

enter image description here

In the discussion of the question, alas, it turned out that an automatic solution is rather difficult, and that a lot of manual editing is still required. The question I have is therefore slightly dumber:

Is it possible to produce the depicted effect of a blurred backpage with LaTeX?

In other words: Is it possible to reduce the difficulties of automating the line-positioning, but to give the typesetter a certain amount of overview by the means of creating the PDF a little more as if it were a real book?

  • How exactly would a typesetter achieve this effect with a real book? Runny ink? – John Kormylo Aug 5 '18 at 14:41
  • 1
    A typesetter will use a printout and hold it against the light, or use his typesetting program to activate the grid-system to check if the lines are on the same height. If he had this draft-option, he could spare the printout and the manual editing would become easier. When an editor receives the final proof from the printer, and if he hasn΄t dealt with the problem before, it could be too late. For some publishers it is too much work and they skip the whole checking. Adding thin paper, this is exceptionally annoying for a reader. – Kubo Aug 5 '18 at 14:56
  • I thought about it and it came to my mind that it might be impossible with pure TeX (LaTeX, …), since TeX doesn’t know the next page, when shipping out the current page, so there is – I think – no way to access the required information, when setting the current page. As said in the comments of the linked question, I can imagine a script solution incorporating things like pdftk, imagemacgic, gostscript or something like this. When the PDF is created it could maybe be done with another TeX file including the already created PDF (using tikz and transparencies) … – Tobi Aug 5 '18 at 15:01
  • One might be able to do it with post-processing. This would be similar to pdfpages, but using \includegraphics[page=1] etc. directly. – John Kormylo Aug 5 '18 at 15:05
  • @Tobi: pdftk provides a watermark function. The next page can therefore be simply added as a watermark. I just gave it a shot, and it worked. Do you know how to invert the pdf so the text goes from right to left? Blurring the textcolor will be the next thing. I΄ll give a script a shot, but I fear I haven΄t got enough experience. – Kubo Aug 5 '18 at 15:25
2

It is possible to do this by creating a second .tex-file and invoking an external program, as Tobi has pointed out. The following approach yields a result, but I will try and make a script out of it in the future because the little steps add up to quite something so it is tedious to repeat the process if one has to do it many times. Here is the code:

original.tex (Original)

\documentclass{scrbook}
\usepackage{lipsum}

\begin{document}

\chapter{Chapter}

\lipsum

\end{document}

Step 1 involves creating a mirrored and blurred PDF. This can be done by loading crop with the option [mirror] and transparency in a copy of original.tex and then compiling it. Compiling with lualatex requires luatex85, somehow. Compiling with pdflatex doesn΄t need that.

mirrorblur.tex (Mirrored and blurred):

\documentclass{scrbook}

\usepackage{lipsum}
\RequirePackage{luatex85}
\usepackage[mirror]{crop}
\usepackage{transparent}

\begin{document}

\chapter{Chapter}

\transparent{0.5}\lipsum

\end{document}

There are now two PDFs: original.pdf and mirrorblur.pdf

Step 2 involves reversing the ordering of the page of mirrorblur.pdf; easiest way that I found: pdftk. I just typed that into the commandline.

pdftk mirrorblur.pdf cat 2-1 output mirrorblur2.pdf

Step 3 involves stamping the mirrorblur2.pdf onto the original, or vice versa, also with pdftk and its function multistamp:

pdftk original.pdf multistamp mirrorblur2.pdf output finaldraft.pdf 

Then I got this finaldraft.pdf

enter image description here

2

Here is a post-processing solution using TikZ. Note that the filename and number of pages are defined in the preamble.

\documentclass{article}
\usepackage{tikz}
\pagestyle{empty}

\newcommand{\filename}{test5.pdf}
\newcommand{\lastpage}{2}
\newcounter{otherpage}

\begin{document}
\loop
  \begin{tikzpicture}[remember picture,overlay]
    \node[inner sep=0pt] at (current page.center)
      {\includegraphics[page=\thepage]{\filename}};
    \setcounter{otherpage}{\value{page}}%
    \stepcounter{otherpage}%
    \node[inner sep=0pt,opacity=0.5,xscale=-1,yshift=4pt] at (current page.center)
      {\includegraphics[page=\theotherpage]{\filename}};
  \end{tikzpicture}
  \setcounter{otherpage}{\value{page}}%
  \newpage
  \begin{tikzpicture}[remember picture,overlay]
    \node[inner sep=0pt,yshift=4pt] at (current page.center)
      {\includegraphics[page=\thepage]{\filename}};
    \node[inner sep=0pt,opacity=0.5,xscale=-1] at (current page.center)
      {\includegraphics[page=\theotherpage]{\filename}};
  \end{tikzpicture}
\ifnum\value{page}<\lastpage\relax \newpage\repeat
\end{document}

The file test5.pdf was generated using:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\lipsum[1-10]
\end{document}

full page

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.