5

I want to put a vertical wavy line with a long, shallow period down the side of a title page. The following adapts the solution provided by ferahfeza, which works well. My only additional question would be how to make the line be automatically text height.

\documentclass[ebook]{memoir}

\usepackage{tikz}
\usepackage{epigraph}
\usepackage{times,microtype}
\usetikzlibrary{decorations}

\newcommand\titlepagedecoration{
\pgfdeclaredecoration{complete sines}{initial}
{
    \state{initial}[
        width=+0pt,
        next state=sine,
        persistent precomputation={\pgfmathsetmacro\matchinglength{
            \pgfdecoratedinputsegmentlength / int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}
            \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
        }] {}
    \state{sine}[width=\pgfdecorationsegmentlength]{
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
}
    \state{final}{}
}

\begin{tikzpicture}[
    every path/.style={
        decoration={
            complete sines,
            segment length=2cm,
            amplitude=0.5cm
        },
        decorate
    }]
\draw [very thick](0,0) -- (0,15);

\end{tikzpicture}
}

\begin{document}

\thispagestyle{empty}
\pagestyle{empty}

{\begingroup
\hbox{
\hspace*{0.1\textwidth}
\titlepagedecoration
\hspace*{0.05\textwidth}
\parbox[b]{0.75\textwidth}{

{\noindent\Huge\bfseries A Collection of \\[0.5\baselineskip] \LaTeX ~Templates}\\[2\baselineskip]
{\large \textit{A predictable tagline}}\\[4\baselineskip]
{\Large \textsc{john smith}}

\vspace{0.5\textheight}
{\noindent The Publisher}\\
}}
\endgroup}

\end{document}
  • maybe this question contains some useful ideas: Setting a wavy sidebar. – barbara beeton Apr 4 '14 at 21:08
  • Note that \usepackage has to be used before \begin{documentclasas}. – Ruben Apr 4 '14 at 21:28
  • The solution from @ ferahfeza works well with a little tweaking for Memoir, but I'm wondering if there's a way to make the line automatically text height. – Jeremy Apr 4 '14 at 22:53
  • @Jeremy A solution with exact vertical size in a minipage environment to avoid placement problems. See below. – Tarass Apr 5 '14 at 12:27
1

For book class, following code is a starting point for you. You can control all parameters of wavy in code.

\documentclass{book}
\usepackage{tikz}
\usepackage{epigraph}
\usepackage{times,microtype}
\usetikzlibrary{decorations}

\definecolor{titlepagecolor}{cmyk}{1,.60,0,.40}

\DeclareFixedFont{\titlefont}{T1}{ppl}{b}{it}{0.5in}

\newcommand\titlepagedecoration{%
\pgfdeclaredecoration{complete sines}{initial}
{
    \state{initial}[
        width=+0pt,
        next state=sine,
        persistent precomputation={\pgfmathsetmacro\matchinglength{
            \pgfdecoratedinputsegmentlength / int(\pgfdecoratedinputsegmentlength/\pgfdecorationsegmentlength)}
            \setlength{\pgfdecorationsegmentlength}{\matchinglength pt}
        }] {}
    \state{sine}[width=\pgfdecorationsegmentlength]{
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathsine{\pgfpoint{0.25\pgfdecorationsegmentlength}{-0.5\pgfdecorationsegmentamplitude}}
        \pgfpathcosine{\pgfpoint{0.25\pgfdecorationsegmentlength}{0.5\pgfdecorationsegmentamplitude}}
}
    \state{final}{}
}

\begin{tikzpicture}[
    every path/.style={
        decoration={
            complete sines,
            segment length=1cm,
            amplitude=0.5cm
        },
        decorate
    }]
\draw [thick](0,0) -- (0,12);

\end{tikzpicture}
}

\begin{document}

\begin{titlepage}

\noindent
\Huge \textbf{Book Title}\par
\epigraph{From  Universe}%
{\textit{Somewhere 2013}\\ \textsc{John Doe}}
%

\titlepagedecoration
\end{titlepage}

\end{document}

enter image description here

3

Here's another option using a coil decoration:

\documentclass[ebook]{memoir}
\usepackage{graphicx}
\usepackage{tikzpagenodes}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}

{
\begingroup 
\setlength{\parindent}{0pt}
\hbox{%
\hspace*{0.25\textwidth}
\parbox[b]{0.75\textwidth}{%
{\noindent\Huge\bfseries I Want A Poem}\\[1\baselineskip]
{\large A Sequence of Poetry}\\[4\baselineskip]
{\Large Valerie Senyk}
\vspace{0.5\textheight}
\noindent Vocamus Press | Guelph, Ontario}
}
\begin{tikzpicture}[remember picture]
\draw[overlay,decorate,decoration={coil,aspect=0,segment length=20pt}]
  (current page text area.north west) --
  (current page text area.south west);
\end{tikzpicture}
\endgroup}

\end{document}

enter image description here

With you're current settings there are some problems with the placement of "Ontario" that you might want to take a look at.

2

With some caligraphics :

enter image description here

\documentclass[ebook]{memoir}
\usepackage{epigraph,graphicx,calc}
\usepackage{times,microtype}

\newsavebox{\MYbox}%
\newlength\MYh\newlength\MYd%

\newenvironment{Zigoui}[1][ondule.1]{%
    \def\Barre{#1}
    \begin{lrbox}{\MYbox}
        \begin{minipage}[b]{\textwidth -4bp -.7cm -.3cm }}{%
        \end{minipage}
    \end{lrbox}%
    \settoheight{\MYh}{\usebox{\MYbox}}%
    \settodepth{\MYd}{\usebox{\MYbox}}%
    \addtolength{\MYh}{\MYd+4bp}%

    \medskip
    \hfill
    \raisebox{\totalheight-3bp}{%
        \includegraphics*[clip=true,bb= 1 -3 \MYh*72.27 3,angle=-90]{\Barre}}
    \hspace{0.3cm}\usebox{\MYbox}%
    \par\addvspace{2ex}
    }%

\begin{document}

\thispagestyle{empty}
\pagestyle{empty}

\begin{Zigoui}
{%
\noindent\Huge\bfseries A Collection of \\[0.5\baselineskip] \LaTeX ~Templates}\\[2\baselineskip]
{\large \textit{A predictable tagline}}\\[4\baselineskip]
{\Large \textsc{john smith}}

\vspace{0.5\textheight}
{\noindent The Publisher}
\end{Zigoui}
\end{document}

And ondule.1 from metapost : By the way, how to do such a line with tikz ?

u := .75mm ;
h := -.9u ;
l := 1.85u ;
nb := 200 ;

path p ;

beginfig(1)

pickup pencircle scaled 1pt yscaled .3 rotated -60 ;

p = (0,h){dir0}..{dir0}(l,-h){dir0}..{dir0}(2l,h)  ;

for i=0 upto nb :
draw p shifted (2i*l,0) ;
endfor ;

clip currentpicture to (.4l,2h)--(nb*2*l,2h)--(nb*2*l,-2h)--(.4l,-2h)--cycle ;
endfig ;
end

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.