Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

numberpar.sty: avoid numbering header and footer with fancyhdr

8 views
Skip to first unread message

lpr

unread,
Nov 20, 2009, 7:10:00 AM11/20/09
to
Dear all

When using numberpar.sty together with fancyhdr.sty, I ran into the
problem that paragraphs in headers and footers are enumerated too --
which I would like to avoid. See the results of the miniexample from
below as posted on <http://www.lpr.ch/20091118_miniex.ps>.

Thanks,
Lukas%%% BEGIN Example
\documentclass{article}
\usepackage{numberpar}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{ headC }
\fancyhead[L]{ headL }
\fancyhead[RO,RE]{ headR }
\fancyfoot[L]{ footL }
\fancyfoot[R]{ footR }
\fancypagestyle{plain}{%leading page
\fancyhf{}
\fancyhead[C]{ headC }
\fancyhead[L]{ headL }
\fancyhead[RO,RE]{ headR }
\fancyfoot[L]{ footL }
\fancyfoot[R]{ footR }
}
\begin{document}
\title{numberpar.sty:\\ How Can I Avoid All Enumeration of Header and
Footer}
\author{Lukas}
\date{\today}
\maketitle
\numberpars

\section{Question}

How can numbering the headers and footers be avoided when
using fancyhdr.sty and numberpar.sty?

While I appreciate very much the enumeration of paragraphs, I'd
not want to use it with any content in headers or footers, see the
headers on page one and compare with them on page two.

\newpage

\section{On Page 2}

On the last page, header and footers are not enumerated if there
paragraph enumeration is turned of by \verb+\nonumberpars+.

\nonumberpars
\vspace{1cm}
Thanks,
Lukas

\end{document}
%%% END Mini Example


Robin Fairbairns

unread,
Nov 20, 2009, 8:31:15 AM11/20/09
to
lpr <luka...@lpr.ch> writes:
>When using numberpar.sty together with fancyhdr.sty, I ran into the
>problem that paragraphs in headers and footers are enumerated too --
>which I would like to avoid. See the results of the miniexample from
>below as posted on <http://www.lpr.ch/20091118_miniex.ps>.

assuming you have (a derivative of) my numberpar, which describes
itself as

% An attempt at numbering paragraphs, as is supposed to be ``good
% practice'' in preparation of legal opinions.

i never put numberpar on ctan since it was designed as a one-off, for
a particularly simple class of documents. there are all sorts of
things it doesn't deal with right; i have an iteration that i seem to
have written after the appearance of current latex, but that too has
structural weeknesses that make its output pretty feeble.

i'm not surprised that you have problems with fancyhdr. have you
tried adding \nonumberpars _inside_ each fancyhdr field?

your example looks extra-cruddy because you have a non-zero \parindent
(as is usual with latex, but wasn't the case for the documents my
colleague was writing when he asked for the package some time around
1992). off-hand, i'm not sure what i would do about that; there are
(or were) similar problems with lists, iirc.
--
Robin Fairbairns, Cambridge

lpr

unread,
Nov 23, 2009, 1:59:28 PM11/23/09
to
On Nov 20, 2:31 pm, r...@cl.cam.ac.uk (Robin Fairbairns) wrote:

>  lpr <lukas....@lpr.ch> writes:
> >When using numberpar.sty together with fancyhdr.sty, I ran into the
> >problem that paragraphs in headers and footers are enumerated too --
> >which I would like to avoid.  See the results of the miniexample from
> >below as posted on <http://www.lpr.ch/20091118_miniex.ps>.
>
> assuming you have (a derivative of) my numberpar, which describes
> itself as
>
>   % An attempt at numbering paragraphs, as is supposed to be ``good
>   % practice'' in preparation of legal opinions.
>

Yes, it does. But, honestly, I do not know where I found it. It was
"laying" around from my time writing my PhD thesis.

>
> i'm not surprised that you have problems with fancyhdr.  have you
> tried adding \nonumberpars _inside_ each fancyhdr field?
>

I tried your recommendation -- and it solved my problem:
<http://www.lpr.ch/20091123_miniex.ps>

Thanks a lot!

> your example looks extra-cruddy because you have a non-zero \parindent
> (as is usual with latex, but wasn't the case for the documents my
> colleague was writing when he asked for the package some time around
> 1992).  off-hand, i'm not sure what i would do about that; there are
> (or were) similar problems with lists, iirc.

I can live with that issue: avoiding that problem, I set the parindent
to 0.

Thanks a lot!

Best regards
Lukas

0 new messages