# fancyhdr page decorations and page numbering

Hello there are several examples of decorative pages. Most examples work with a single page,when numbering is not necessary.

When i try to make for every page. It does not work, or i have problems with page numbers..see example below

\documentclass[a4paper]{article}
\usepackage{fancyhdr}
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage[english]{babel}
\usepackage{blindtext}
\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
\wb{#2}{#2}#3\end{center}\vspace*{#1}}

\fancyhf{}
\begin{picture}(0,0)
\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp}A}}
\end{picture}}
\begin{picture}(0,0)
\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp}B}}
\end{picture}}
\lfoot{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
\end{picture}}
\rfoot{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
\end{picture}}
\pagestyle{fancy}

\begin{document}
\blindtext[10]
\wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}

\blindtext[3]

\wbc{1ex}{8}{pq}

\end{document}


this woks fine but no page numbering becouse headers/footers are redefined

here is another example

% $Id: sample1.tex,v 1.3 2002/09/13 06:34:25 loreti Exp$

\documentclass[10pt,twoside]{book}
\usepackage{fancyhdr,geometry,keyval,ifthen,makeidx,multicol,mparhack,poemscol}
\usepackage{times}
\geometry{textwidth=4in,textheight=6.75in}
\makeverselinenumbers
\global\includeaccidentalstrue
\global\includetypescriptstrue
\global\redundantemendationsfalse
\stanzaatbottom{*}
\nostanzaatbottom{\relax}
%\reversemarginpar
\usepackage{fancyhdr}

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
%\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
\wb{#2}{#2}#3\end{center}\vspace*{#1}}

%\fancyhf{}
%  \begin{picture}(0,0)
%    %\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp} %A}}
%   \end{picture}}
% \begin{picture}(0,0)
%   %\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp %}B}}
%  \end{picture}}
%\lfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
% \end{picture}}
%\rfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
% \end{picture}}
\pagestyle{fancy}
\begin{picture}(0,0)(59,0)
%{T}{\_}
%{R}{\_}{O}{\_}{F}{\_}{U}
\put(0,0){M}
\multiput(13,0)(13,0){30}{N}
\put(403,0){O}
\put(0,-533){P}
\multiput(0,-13)(0,-13){40}{S}
\multiput(13,-533)(13,0){30}{Q}
\put(403,-533){R}
\multiput(403,-13)(0,-13){40}{T}
\end{picture}
%\begin{picture}
%\multiput(-18,0)(18,0){24}{N}
%\put(450,0){M}
%\multiput(0,-18)(0,18){34}{T}
%\put(0,630){R}
%\multiput(18,0)(18,630){24}{Q}
%\multiput(0,18)(450,18){34}{S}
%\put(450,630){P}
%\end{picture}
%\vspace{length}
{   \normalfont \thepage}
}

\cfoot{\vspace{2em}\thepage} % get rid of the page number
\renewcommand{\footrulewidth}{0pt}
\begin{document}
The King and Queen of Hearts were seated on their throne
when they arrived, with a great crowd assembled about them
--- all sorts of little birds and beasts, as well as the
whole pack of cards: the Knave was standing before them,
in chains, with a soldier on each side to guard him; and
near the King was the White Rabbit, with a trumpet in one
hand, and a scroll of parchment in the other.  In the very
middle of the court was a table, with a large dish of
tarts upon it: they looked so good, that it made Alice
quite hungry to look at them --- I wish they'd get the
trial done,'' she thought, and hand round the
refreshments!''.  But there seemed to be no chance of this,
so she began looking at everything about her to pass away
the time.

\wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}

Alice had never been in a court of justice before, but she
find that she knew the name of nearly everything there.
That's the judge,'' she said to herself, because of his
great wig.''.

The judge, by the way, was the King, and as he wore his
crown over the wig, (look at the frontispiece if you want
to see how he did it,) he did not look at all comfortable,
and it was certainly not becoming.

\wbc{1ex}{8}{pq}

And that's the jury-box,'' thought Alice, and those
twelve creatures,'' (she was obliged to say creatures,''
you see, because some of them were animals, and some were
birds) I suppose they are the jurors.''.  She said this
last word two or three times over to herself being rather
proud of it: for she thought, and rightly too, that very
few little girls of her age knew the meaning of it at all.
However, jurymen'' would have done just as well.

\wbc{1ex}{10}{ced}

The twelve jurors were all writing very busily on slates.
What are they doing?'' Alice whispered to the Gryphon.
They can't have anything to put down yet, before the
trial's begun.''.

They're putting down their names,'' the Gryphon
whispered in reply, for fear they should forget them
before the end of the trial.''.

Stupid things!'' Alice began in a loud indignant voice,
but she stopped herself hastily, for the White Rabbit
cried out, Silence in the court!''; and the King put on
his spectacles and looked anxiously round, to make out who
was talking.
\end{document}

% $Id: sample1.tex,v 1.3 2002/09/13 06:34:25 loreti Exp$

1. Is there a way to make page numbering to left/right and not in center?

2. I mostly use memoir class and How do same thing with memoir class without fancyhdr?

-
(1) It's not really clear what you're after, since you (obviously) include \thepage as part of your header definition. So, just put \thepage where you want it to display and it will go there. (2) This seems contradicting to (1), which uses fancyhdr. Seems like these should be two separate questions... –  Werner Feb 7 '14 at 21:56
\thepage in footer center works fine...but not left/right sides. It is always on left or on right side of the page, not like in usual way...that's why i put it in center... –  Shakro Trubeckoi Feb 7 '14 at 22:28
You can see '1' and '2' inside of ornament they are on same side –  Shakro Trubeckoi Feb 7 '14 at 22:35
You still have \thepage as part of your definition of \lhead, so of course it will be inside the "ornament" on the same (left) side... –  Werner Feb 7 '14 at 22:39
You can say, e.g. \fancyhf[ROH,LEH]{\thepage} to get the page number to alternate between left and right in a two-sided document. Is that what you mean? Like others, I'm confused by your question (or questions). –  cfr Feb 7 '14 at 22:44

With memoir, you first declare your page style using

\makepagestyle{<name>}


\makeevenhead{<name>}{<left>}{<center>}{<right>}
\makeevenfoot{<name>}{<left>}{<center>}{<right>}
\makeoddfoot{<name>}{<left>}{<center>}{<right>}


An example with your first style:

\documentclass[a4paper]{memoir}
\usepackage[utf8]{inputenc}%
\usepackage[T1]{fontenc}%
\usepackage[english]{babel}

\usepackage{blindtext}

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
\wb{#2}{#2}#3\end{center}\vspace*{#1}}

\makepagestyle{myps}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp}A}}
\end{picture}
}
{}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp}B}}
\end{picture}
}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp}A}}
\end{picture}%
}
{}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp}B}}
\end{picture}%
}
\makeevenfoot{myps}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
\end{picture}%
}
{}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
\end{picture}%
}
\makeoddfoot{myps}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
\end{picture}%
}
{}
{\setlength{\unitlength}{1bp}%
\begin{picture}(0,0)
\put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
\end{picture}%
}

\pagestyle{myps}

\begin{document}
\blindtext[10]
\wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}

\blindtext[3]

\wbc{1ex}{8}{pq}

\end{document}


And, with the second style (notice that \makeevenfoot, \makeoddfoot were used to place the page numbers below the frame):

\documentclass[10pt,twoside]{memoir}
\usepackage{geometry,keyval,ifthen,makeidx,multicol,mparhack}
\usepackage{times}
\geometry{textwidth=4in,textheight=6.75in}

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
%\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
\wb{#2}{#2}#3\end{center}\vspace*{#1}}

%\fancyhf{}
%  \begin{picture}(0,0)
%    %\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp} %A}}
%   \end{picture}}
% \begin{picture}(0,0)
%   %\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp %}B}}
%  \end{picture}}
%\lfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
% \end{picture}}
%\rfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
% \end{picture}}

\makepagestyle{mypsii}
{\wb{12bp}{12bp}%
\begin{picture}(0,0)(59,0)
%{T}{\_}
%{R}{\_}{O}{\_}{F}{\_}{U}
\put(0,0){M}
\multiput(13,0)(13,0){30}{N}
\put(403,0){O}
\put(0,-533){P}
\multiput(0,-13)(0,-13){40}{S}
\multiput(13,-533)(13,0){30}{Q}
\put(403,-533){R}
\multiput(403,-13)(0,-13){40}{T}
\end{picture}%
}
{}
{}
{\wb{12bp}{12bp}%
\begin{picture}(0,0)(59,0)
%{T}{\_}
%{R}{\_}{O}{\_}{F}{\_}{U}
\put(0,0){M}
\multiput(13,0)(13,0){30}{N}
\put(403,0){O}
\put(0,-533){P}
\multiput(0,-13)(0,-13){40}{S}
\multiput(13,-533)(13,0){30}{Q}
\put(403,-533){R}
\multiput(403,-13)(0,-13){40}{T}
\end{picture}%
}
{}
{}
\makeevenfoot{mypsii}
{\put(360,-3){\makebox(0,0)[tr]{\normalfont \thepage}}}
{}
{}
\makeoddfoot{mypsii}
{\put(-55,-3){\makebox(0,0)[tr]{\normalfont \thepage}}}
{}
{}

\pagestyle{mypsii}

\begin{document}
The King and Queen of Hearts were seated on their throne
when they arrived, with a great crowd assembled about them
--- all sorts of little birds and beasts, as well as the
whole pack of cards: the Knave was standing before them,
in chains, with a soldier on each side to guard him; and
near the King was the White Rabbit, with a trumpet in one
hand, and a scroll of parchment in the other.  In the very
middle of the court was a table, with a large dish of
tarts upon it: they looked so good, that it made Alice
quite hungry to look at them --- I wish they'd get the
trial done,'' she thought, and hand round the
refreshments!''.  But there seemed to be no chance of this,
so she began looking at everything about her to pass away
the time.

\wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}

Alice had never been in a court of justice before, but she
find that she knew the name of nearly everything there.
That's the judge,'' she said to herself, because of his
great wig.''.

The judge, by the way, was the King, and as he wore his
crown over the wig, (look at the frontispiece if you want
to see how he did it,) he did not look at all comfortable,
and it was certainly not becoming.

\wbc{1ex}{8}{pq}

And that's the jury-box,'' thought Alice, and those
twelve creatures,'' (she was obliged to say creatures,''
you see, because some of them were animals, and some were
birds) I suppose they are the jurors.''.  She said this
last word two or three times over to herself being rather
proud of it: for she thought, and rightly too, that very
few little girls of her age knew the meaning of it at all.
However, jurymen'' would have done just as well.

\wbc{1ex}{10}{ced}

The twelve jurors were all writing very busily on slates.
What are they doing?'' Alice whispered to the Gryphon.
They can't have anything to put down yet, before the
trial's begun.''.

They're putting down their names,'' the Gryphon
whispered in reply, for fear they should forget them
before the end of the trial.''.

Stupid things!'' Alice began in a loud indignant voice,
but she stopped herself hastily, for the White Rabbit
cried out, Silence in the court!''; and the King put on
his spectacles and looked anxiously round, to make out who
was talking.
\end{document}


A zoomed image of the bottom of the first page, showing the page number:

Using fancyhdr the idea is the same, but using the package interface:

\fancyfoot[LO]{<code for page number>}
\fancyfoot[RE]{<code for page number>}


or

\fancyfoot[LO,RE]{<code for page number>}


if the code is similar.

An example using fancyhdr and the second style:

\documentclass[10pt,twoside]{book}
\usepackage{fancyhdr,geometry,keyval,ifthen,makeidx,multicol,mparhack,poemscol}
\usepackage{times}
\geometry{textwidth=4in,textheight=6.75in}
\makeverselinenumbers
\global\includeaccidentalstrue
\global\includetypescriptstrue
\global\redundantemendationsfalse
\stanzaatbottom{*}
\nostanzaatbottom{\relax}
%\reversemarginpar

\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
%\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
\newcommand{\wbc}[3]{\vspace*{#1}\begin{center}
\wb{#2}{#2}#3\end{center}\vspace*{#1}}

%\fancyhf{}
%  \begin{picture}(0,0)
%    %\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp} %A}}
%   \end{picture}}
% \begin{picture}(0,0)
%   %\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp %}B}}
%  \end{picture}}
%\lfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}
% \end{picture}}
%\rfoot{\setlength{\unitlength}{1bp}%
% \begin{picture}(0,0)
%  \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}
% \end{picture}}
\pagestyle{fancy}
\fancyhf{}
\begin{picture}(0,0)(59,0)
%{T}{\_}
%{R}{\_}{O}{\_}{F}{\_}{U}
\put(0,0){M}
\multiput(13,0)(13,0){30}{N}
\put(403,0){O}
\put(0,-533){P}
\multiput(0,-13)(0,-13){40}{S}
\multiput(13,-533)(13,0){30}{Q}
\put(403,-533){R}
\multiput(403,-13)(0,-13){40}{T}
\end{picture}
%\begin{picture}
%\multiput(-18,0)(18,0){24}{N}
%\put(450,0){M}
%\multiput(0,-18)(0,18){34}{T}
%\put(0,630){R}
%\multiput(18,0)(18,630){24}{Q}
%\multiput(0,18)(450,18){34}{S}
%\put(450,630){P}
%\end{picture}
%\vspace{length}
}
\fancyfoot[LO]{%
\leavevmode
\put(359,-3){\makebox(0,0)[tr]{\normalfont\thepage}}
}
\fancyfoot[RE]{%
\leavevmode
\put(-344,-3){\makebox(0,0)[tr]{\normalfont\thepage}}
}

\renewcommand{\footrulewidth}{0pt}

\begin{document}
The King and Queen of Hearts were seated on their throne
when they arrived, with a great crowd assembled about them
--- all sorts of little birds and beasts, as well as the
whole pack of cards: the Knave was standing before them,
in chains, with a soldier on each side to guard him; and
near the King was the White Rabbit, with a trumpet in one
hand, and a scroll of parchment in the other.  In the very
middle of the court was a table, with a large dish of
tarts upon it: they looked so good, that it made Alice
quite hungry to look at them --- I wish they'd get the
trial done,'' she thought, and hand round the
refreshments!''.  But there seemed to be no chance of this,
so she began looking at everything about her to pass away
the time.

\wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}

Alice had never been in a court of justice before, but she
find that she knew the name of nearly everything there.
That's the judge,'' she said to herself, because of his
great wig.''.

The judge, by the way, was the King, and as he wore his
crown over the wig, (look at the frontispiece if you want
to see how he did it,) he did not look at all comfortable,
and it was certainly not becoming.

\wbc{1ex}{8}{pq}

And that's the jury-box,'' thought Alice, and those
twelve creatures,'' (she was obliged to say creatures,''
you see, because some of them were animals, and some were
birds) I suppose they are the jurors.''.  She said this
last word two or three times over to herself being rather
proud of it: for she thought, and rightly too, that very
few little girls of her age knew the meaning of it at all.
However, jurymen'' would have done just as well.

\wbc{1ex}{10}{ced}

The twelve jurors were all writing very busily on slates.
What are they doing?'' Alice whispered to the Gryphon.
They can't have anything to put down yet, before the
trial's begun.''.

They're putting down their names,'' the Gryphon
whispered in reply, for fear they should forget them
before the end of the trial.''.

Stupid things!'' Alice began in a loud indignant voice,
but she stopped herself hastily, for the White Rabbit
cried out, Silence in the court!''; and the King put on
his spectacles and looked anxiously round, to make out who
was talking.
\end{document}

Stupid things!'' Alice began in a loud indignant voice,
but she stopped herself hastily, for the White Rabbit
cried out, Silence in the court!''; and the King put on
his spectacles and looked anxiously round, to make out who
was talking.
\end{document}


An image of the bottom of the first page:

Feel free to change the settings according to your needs.

-
nice, but there are not a page numbers...thats what i mean. numbers dissapear or one can put only in center. –  Shakro Trubeckoi Feb 7 '14 at 22:43
@ShakroTrubeckoi I asked you in a comment where exactly do you want the page numbers. –  Gonzalo Medina Feb 7 '14 at 22:46
I added page numbering in your code . make evenfoot: \put(360,-3){\makebox(0,0)[tr]{\normalfont \thepage}} and make addfoot: \put(-36,-3){\makebox(0,0)[tr]{\normalfont \thepage}}...works fine...can be better solution? –  Shakro Trubeckoi Feb 7 '14 at 22:49
@ShakroTrubeckoi yes, that's what you need. –  Gonzalo Medina Feb 7 '14 at 22:53
and created \makeevenfoot{mypsii} { \put(340,25){\makebox(0,0)[tr]{\normalfont \thepage}} } {} {} ..it seems with memoir solution is simpler ? thanks a lot :) –  Shakro Trubeckoi Feb 7 '14 at 22:58