[Tex/LaTex] Torn page effect


[See Torn paper: matching up the torn edges for more on this topic, as well as better illustrations of the final product.]

I have a document with a lot of short excerpts from another book scattered through it. Putting frames around them looks a little too 'clean'. How can I get a 'torn page' type effect, to make it look as if the excerpt has been physically torn out of a book? (I've occasionally seen this done in printed books, although I can't find an example right now.)

I'm not wedded to a very specific look here — Googling 'torn page' gives plenty of examples. But just to give this some frame of reference, here are some of the nicer ones:

enter image description here


enter image description here


(The strong colouration in this second example is a probably a little too distracting for actual use, although it might be interesting as an option. It's more the edge effect I'm interested in.)

enter image description here

Edit (again): I tried typesetting my text according to the updated versions of the answers below. Here are the results:

enter image description here

Or with interpolated shading:

Best Answer

Not exactly the result you wanted, but it can be a starting point. It combines framed and tikz packages. The idea can lead to further improvements.


See http://www.texample.net/tikz/examples/framed-tikz/ (btw, I'm the author)

UPDATE: Playing with the idea of a fractal decoration, and also with shaded paper and blurred drop shadows, I got the following results. Currently the implementation still does not use framed, so it is restricted to the case in which the framed paragraph does not break among pages.


\usepackage{lipsum}   % To generate test text 
\usepackage[margin=1cm]{geometry}% for screen preview
\pgfmathsetseed{1} % To have predictable results
% Define a background layer, in which the parchment shape is drawn

% This is the base for the fractal decoration. It takes a random point between the start and end, and
% raises it a random amount, thus transforming a segment into two, connected at that raised point
% This decoration can be applied again to each one of the resulting segments and so on, in a similar
% way of a Koch snowflake.
\pgfdeclaredecoration{irregular fractal line}{init}

% define some styles
   paper/.style={draw=black!10, blur shadow, shade=bilinear interpolation,
                 lower left=black!20, upper left=black!15, upper right=white, lower right=black!10},
   irregular border/.style={decoration={irregular fractal line, amplitude=0.2},
   ragged border/.style={ decoration={random steps, segment length=7mm, amplitude=2mm},

% Macro to draw the shape behind the text, when it fits completly in the
% page
  \node[inner sep=1em] (A) {#1};  % Draw the text of the node
  \begin{pgfonlayer}{background}  % Draw the shape behind
  \fill[paper] % recursively decorate the bottom border
        decorate[irregular border]{decorate{decorate{decorate{decorate[ragged border]{
        ($(A.south east) - (0, random*5mm)$) -- ($(A.south west) - (0, random*5mm)$)
        -- (A.north west) -- (A.north east) -- cycle;



NOTE Some pdf viewers (eg. Sumatra) have issues to display the interpolated shading used in the last examples.

UPDATE See also the related question Torn paper: matching up the torn edges