2

Take a look at this image.

This shows a curled paper (dog-ear?) at the bottom right. How do you achieve such an effect (its mere eye-candy, but would be cool) in LaTeX?

Say I want this to show the page number on the "flat" part of the page, in the top right, and just have a curled page like this.

I can think of fancy page, but want to know if there is a package that could do this in LaTeX. Would be useful in producing glossy booklets.

user2751530
  • 1,102

1 Answers1

7

Although this does not look a great deal like the target image, it does reflect the general idea. Moreover, I couldn't find any other question asking for this kind of effect. So I dabbled a bit and fished out some code from the style tcolorbox uses for documentation. I then adapted the marker environment somewhat in an attempt to bring a little life into the curled page. I can't say I'm altogether satisfied, but what I wanted was something which isn't too distracting or too space-hungry, while signalling visually that the content is excerpted from a source. I think the output satisfies those fairly minimal requirements.

curled close-up

I'm posting the code in case this is of any use to anybody else.

\documentclass{article}
\RequirePackage{tcolorbox,kantlipsum}
\tcbuselibrary{xparse,skins}
\NewTColorBox{curled}{ O {\linewidth} m O {} }
{% ref.: tcolorbox.doc.s_main.sty
  enhanced,
  colbacktitle=blue!25!black,
  fonttitle=\sffamily\bfseries,
  colframe=blue!25!black,
  colback=blue!25!black!10,
  coltitle=cyan!25!white,
  boxrule=0.4pt,
  drop fuzzy shadow,
  sharp corners,
  rounded corners=southeast,
  arc is angular,
  arc=9mm,
  underlay={%
    \path [fill=tcbcol@back!80!black, draw=tcbcol@frame, shorten <=-0.05mm, shorten >=-0.05mm] ([yshift=9mm]interior.south east) .. controls +(-.25,-.25) and +(.5,-.35) ..  ++(-1.2,-.2) .. controls +(.5,-.4) and +(.1,.15) .. ([xshift=-9mm]interior.south east);
    },
  title={#2},
  width=#1,
  #3,
}

\begin{document}
\begin{curled}{Kant}
  \kant[1]
\end{curled}
\end{document}

curled

cfr
  • 198,882