Featured Book

LaTeX Beginners Guide

Who is online

In total there are 6 users online :: 1 registered, 0 hidden and 5 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: Yahoo [Bot] and 5 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

renewenvironment inside a custom class not working

Add tags Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)

renewenvironment inside a custom class not working

Postby mjandrews on Sun May 2nd, 2010

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

Re: renewenvironment inside a custom class not working

Postby localghost on Sun May 2nd, 2010

This should work.
Code: Select all  •  Open in writeLaTeX
\renewenvironment{equation}{\[}{\]}



Best regards and welcome to the board
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: renewenvironment inside a custom class not working

Postby mjandrews on Mon May 3rd, 2010

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

Re: renewenvironment inside a custom class not working

Postby localghost on Mon May 3rd, 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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 13.1 (Linux 3.11.10), TeX Live 2013 (vanilla), TeXworks 0.5 (r1351)
² Posting stopped indefinitely due to offenses
User avatar
localghost
Site Moderator
 
Posts: 9219
Joined: Fri Feb 2nd, 2007
Location: Braunschweig, Germany

Re: renewenvironment inside a custom class not working

Postby mjandrews on Tue May 4th, 2010

interesting ... thanks for your help though.
I'll keep looking.
-m
mjandrews
 
Posts: 3
Joined: Sun May 2nd, 2010


Return to Text Formatting

Who is online

Users browsing this forum: Yahoo [Bot] and 5 guests