### LaTeX users online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 4 guests

### LaTeX Friends

Sponsored by DANTE e.V.: The German speaking TeX Users Group

## renewenvironment inside a custom class not working

### LaTeX Forum: Text Formatting

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Hi (I'm new to the forum, but not new to latex),
I am trying to make a custom class. One issue I just ran into was how the renewenvironment command, which works fine inside the .tex document itself, does not work at all when it is inside the .cls document.

Here is the command (it makes all equations unnumbered by default)

\renewenvironment{equation}{\begin{equation*}}{\end{equation*}}

Like I said, inside the preamble of the source tex file, it does its job. But I want it in a class file called foobar.cls. However, whenever I put it in foobar.cls, and do use \documentclass{foobar}, that command just gets ignored. Everything else in foobar.cls is behaving well.

Any suggestions?
Thanks for any help and insight.
-m
mjandrews

Posts: 3
Joined: Sun May 2nd, 2010

This should work.
Code: Select all  •  Open in online LaTeX editor
\renewenvironment{equation}{$}{$}

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Thorsten, Thanks for your very swift reply. Unfortunately, that solution runs into the same problem: Its works fine inside in tex source file, but not the cls file. That's what's perplexing me. Why would a command work inside in the tex file, but make no difference, being essentially ignored it seems, when inside a cls file?
thanks again,
mark
mjandrews

Posts: 3
Joined: Sun May 2nd, 2010

Hm. I thought my idea would work because these commands are defined in the LaTeX kernel (file »latex.ltx«). At the moment I'm out of advice. Perhaps somebody else can help.
LaTeX Community Moderator

¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses

localghost
Site Moderator

Posts: 9218
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

interesting ... thanks for your help though.
I'll keep looking.
-m
mjandrews

Posts: 3
Joined: Sun May 2nd, 2010