Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Following is the MWE for putting a black rectangle on the left side of a page to hide black marks that printer leaves on every paper (? old cartridge).

How can I make the open side of the rectangle wavy or ribbon-like to make it look decorative?

\documentclass[a5paper]{article}

\usepackage{tikzpagenodes}
\usetikzlibrary{calc}

\usepackage{eso-pic}
\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
    \fill[black] (current page.north west) --
                 ($(current page.north west) +(5mm,0)$) --
                 ($(current page.south west) +(5mm,0)$) --
                 (current page.south west);
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text\newpage

\section{Another section}
Some text

\end{document} 
share|improve this question
1  
note that this is a followup to this question: black verticle rectangle on left margin. –  barbara beeton Mar 19 at 12:37
    
I've updated my answer with new information regarding the solutions using the background package. –  Gonzalo Medina Mar 20 at 12:39

2 Answers 2

up vote 9 down vote accepted

Another option using a tape shape from shapes.symbols:

\documentclass[a5paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols}

\usepackage{eso-pic}
\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
\node[
  tape,
  fill=black,
  minimum height=2cm,%\paperheight,
  minimum width=\paperheight,
  rotate=90]
 at (current page.west) 
{};
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text\newpage

\section{Another section}
Some text

\end{document} 

enter image description here

Changing tape bend height, you can produce something more "wavy":

\documentclass[a5paper]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols}

\usepackage{eso-pic}
\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
\node[
  tape,
  fill=black,
  minimum height=2cm,
  minimum width=\paperheight,
  tape bend height=20pt,
  rotate=90]
 at (current page.west) 
{};
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text\newpage

\section{Another section}
Some text

\end{document} 

enter image description here

And with a coil decoration:

\documentclass[a5paper]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
  \fill[black, decorate, decoration={coil,segment length=30pt}] 
    (current page.north west) -- 
    ([xshift=8mm,yshift=5mm]current page.north west) --
    ([xshift=8mm,yshift=-5mm]current page.south west) --
    (current page.south west);
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text.
\newpage

\section{Another section}
Some text.

\end{document}

enter image description here

Again, playing with the decoration attributes you can get a different effect:

\documentclass[a5paper]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
  \fill[black, decorate, decoration={coil,segment length=90pt,aspect=0}] 
    (current page.north west) -- 
    ([xshift=8mm,yshift=5cm]current page.north west) --
    ([xshift=8mm,yshift=-5cm]current page.south west) --
    (current page.south west);
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text.
\newpage

\section{Another section}
Some text.

\end{document}

enter image description here

As Mark Wibrow has suggested in his comment, if the rectangle is always going to be on the left side, speed can be improved by decorating just the right side of the rectangle; for example:

\documentclass[a5paper]{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{eso-pic}

\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
  \fill[black, decoration={coil,segment length=90pt,aspect=0}] 
    (current page.north west) -- 
    ([xshift=8mm,yshift=5cm]current page.north west) 
    decorate { --
    ([xshift=8mm,yshift=-5cm]current page.south west) } --
    (current page.south west);
\end{tikzpicture}%
}

\begin{document}

\section{A section}
Some text.
\newpage

\section{Another section}
Some text.

\end{document}

Notice that for this you don't really need the tikznodepages package since the nodes used are already defined by standard TikZ. Also, one can dispense with the use of the calc library.

Update:

I see that in your original question you decided to switch to the background package; in this case, all you have to do to translate my example codes above is to place the tikzpicture environment as the value for the contents key, as the following example shows (there's no need for an extra box nor another extra tikzpicture as in the accepted answer to the other question; the calc library also isn't required):

\documentclass[a5paper]{article}
\usepackage{background}
\usetikzlibrary{shapes.symbols}

\backgroundsetup{
angle=0,
scale=1,
opacity=1,
color=black,
contents={
  \begin{tikzpicture}[remember picture, overlay]
  \node[
  tape,
  fill=black,
  minimum height=2cm,%\paperheight,
  minimum width=\paperheight,
  rotate=90]
 at (current page.west) 
  {};
  \end{tikzpicture}%
  }
}
\begin{document}

Some text

\end{document}

enter image description here

share|improve this answer
3  
You might get some marginal improvements in speed if you decorate only the right edge of the rectangle, for example \fill [decoration=coil] (A) -- (B) decorate { -- (C) } -- (D) -- cycle; –  Mark Wibrow Mar 19 at 13:28
    
@MarkWibrow You're right; I'll introduce the changes. Thanks. –  Gonzalo Medina Mar 19 at 13:29
    
Actually thinking about it, it's only a good idea if the rectangle is always on the left hand side of the page. Otherwise your original solution is probably better. –  Mark Wibrow Mar 19 at 13:31
    
@MarkWibrow Yes. In any case, I added a remark about your suggestion, in case the rectangle is always to the left. –  Gonzalo Medina Mar 19 at 13:38

I used TikZ and its decorations.pathmorphing library. I made rectangle higher than \paperheight to make sure decoration is covering whole area we need.

\documentclass[a5paper]{article}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{eso-pic}
\AddToShipoutPictureBG{%
\begin{tikzpicture}[remember picture, overlay]
  \fill[black, decorate, decoration=snake] 
    (current page.north west) -- 
    ($(current page.north west) +(5mm,5mm)$) --
    ($(current page.south west) +(5mm,-5mm)$) --
    (current page.south west);
\end{tikzpicture}}% End of \AddToShipoutPictureBG
\begin{document}
\section{A section}Some text.\newpage
\section{Another section}Some text.
\end{document} 

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.