Discussion:
modifying a .cls file
2020-05-05 07:00:04 UTC
I made some changes to article.cls, all of which work fine. I also have
some commands in the preamble which I would like to be in the modified
.cls file. I just stuck them at the bottom, but that doesn't seem to
work. Here they are:

\usepackage{footnpag}

\usepackage{indentfirst}

\usepackage[compress]{natbib}
\setcitestyle{super,open={},close={},comma}
\makeatletter \renewcommand \@biblabel[1]{(#1)} \makeatother

\renewcommand*{\thefootnote}{\fnsymbol{footnote}}

\setcounter{secnumdepth}{0}

If I try to put them in the .cls, I get a really bizarre message
referring to one of my own macros which I load later with \input.

I must be missing something obvious.
Peter Flynn
2020-05-05 09:44:00 UTC
Post by Phillip Helbig (undress to reply)
I made some changes to article.cls, all of which work fine. I also have
some commands in the preamble which I would like to be in the modified
.cls file. I just stuck them at the bottom, but that doesn't seem to
work.
A class file has to follow a very specific structure, explained in
clsguide.pdf which should be in the latex/base subdirectory of your
installation. There's a good summary at
http://joshua.smcvt.edu/latex2e/Class-and-package-structure.html
Post by Phillip Helbig (undress to reply)
\usepackage{footnpag}
\usepackage{indentfirst}
\usepackage[compress]{natbib}
\setcitestyle{super,open={},close={},comma}
\renewcommand*{\thefootnote}{\fnsymbol{footnote}}
\setcounter{secnumdepth}{0}
If I try to put them in the .cls, I get a really bizarre message
referring to one of my own macros which I load later with \input.
I must be missing something obvious.
RTFM, I'm afraid.

Peter
Ulrike Fischer
2020-05-05 12:49:30 UTC
Am Tue, 5 May 2020 07:00:04 +0000 (UTC) schrieb
using \makeatletter in a cls is unnecessary.
using \makeatother in a cls a very bad idea.
--
Ulrike Fischer
http://www.troubleshooting-tex.de/