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

headrule/footrule problem

553 views
Skip to first unread message

Martin

unread,
Sep 5, 2000, 12:42:47 PM9/5/00
to
Hope someone can help me with this.

I'm using a class written by a colleague based on the book class on a tetex
installation on Redhat 6.2.

It uses the packages fancyhdr, setspace, indentfirst, geometry and titlesec
as follows:

\LoadClass[letterpaper,12pt,oneside,openany]{book}
\RequirePackage{fancyhdr}
\RequirePackage{setspace}
\RequirePackage{indentfirst}
\RequirePackage{titlesec}
\RequirePackage[letterpaper,margin=1in,nofoot]{geometry}

The author of the package has no problems with it and when I did a Miktex
installation on a Windows 98 system (same as the author uses) everything
seemed to work fine. But, on my Linux system I get the following errors:

----------------------------------------------------------------------------
-----

! LaTeX Error: Command \headrule already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.963 \newcommand\headrule{\setheadrule{.4\p@}}

?

! LaTeX Error: Command \footrule already defined.
Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...

l.964 \newcommand\footrule{\setfootrule{.4\p@}}

?

----------------------------------------------------------------------------
------

Any help would be most appreciated.


Cheers,

-- Martin


Javier Bezos

unread,
Sep 5, 2000, 2:15:23 PM9/5/00
to
Martin <m...@myplace.com> wrote:

> Hope someone can help me with this.
>
> I'm using a class written by a colleague based on the book class on a tetex
> installation on Redhat 6.2.
>
> It uses the packages fancyhdr, setspace, indentfirst, geometry and titlesec
> as follows:
>
> \LoadClass[letterpaper,12pt,oneside,openany]{book}
> \RequirePackage{fancyhdr}
> \RequirePackage{setspace}
> \RequirePackage{indentfirst}
> \RequirePackage{titlesec}
> \RequirePackage[letterpaper,margin=1in,nofoot]{geometry}
>
> The author of the package has no problems with it and when I did a Miktex
> installation on a Windows 98 system (same as the author uses) everything
> seemed to work fine. But, on my Linux system I get the following errors:
>
> ----------------------------------------------------------------------------
> -----
>
> ! LaTeX Error: Command \headrule already defined.
> Or name \end... illegal, see p.192 of the manual.

Upgrade to titlesec v2.3.5, available on CTAN. This is because
a little change of syntax in the latest releases. I presume the author
of the package was using a recent one, and your Linux system is using
an older one.

\bye
___________________________________________________________
Javier Bezos | TeX y tipografia
jbezos at wanadoo dot es | http://perso.wanadoo.es/jbezos/
...........................................................
CervanTeX http://apolo.us.es/CervanTeX/CervanTeX.html

Robin Fairbairns

unread,
Sep 5, 2000, 5:57:42 PM9/5/00
to
artin <m...@myplace.com> wrote:
>Hope someone can help me with this.
>
>I'm using a class written by a colleague based on the book class on a
>tetex installation on Redhat 6.2.
>
>It uses the packages fancyhdr, setspace, indentfirst, geometry and
>titlesec as follows:
>
>\LoadClass[letterpaper,12pt,oneside,openany]{book}
>\RequirePackage{fancyhdr}
>\RequirePackage{setspace}
>\RequirePackage{indentfirst}
>\RequirePackage{titlesec}
>\RequirePackage[letterpaper,margin=1in,nofoot]{geometry}
>
>The author of the package has no problems with it and when I did a
>Miktex installation on a Windows 98 system (same as the author uses)
>everything seemed to work fine. But, on my Linux system I get the
>following errors:
>
>! LaTeX Error: Command \headrule already defined.
> Or name \end... illegal, see p.192 of the manual.
>
>See the LaTeX manual or LaTeX Companion for explanation.
>Type H <return> for immediate help.
> ...
>
>l.963 \newcommand\headrule{\setheadrule{.4\p@}}
>
>?

wouldn't it be grand to be told which file this was in?

actually, we can guess, since \headrule and \footrule (snipped) are
only defined in the set of packages you list in fancyhdr; and there
they're defined using \def. (oh, and none of the packages is as long
as 960 lines, though book.cls probably is.)

but without some context of what the class author was on about, it's
hard to guess _why_ it was necessary to redefine these commands in
such a wildly incompatible way. and why it ever worked for anyone
(miktex installation or no) is beyond me.

tell you what, why not give us some more clues? it could become an
exciting guessing game!
--
Robin Fairbairns, Cambridge

Martin

unread,
Sep 5, 2000, 7:53:20 PM9/5/00
to
Actually, Javier hit it on the first try (Thanks, Javier!). Now I just have
to deal with why the bottom margin is 3 times the size of the top one. (I'm
starting to think I should have written my own class... :{ )

Cheers,

-- Martin


"Robin Fairbairns" <r...@betsy.cl.cam.ac.uk> wrote in message
news:8p3q8m$hbe$1...@pegasus.csx.cam.ac.uk...

0 new messages