Math & ScienceRedefine '\sum' Command

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
deangelo
Posts: 5
Joined: Fri Jul 29, 2011 7:31 pm

Redefine '\sum' Command

Post by deangelo »

Hello guys!

I'm trying to change the command \sum, using the following code:

Code: Select all

\renewcommand{\sum}{\displaystyle\sum}
But at the time of compilation shows the following error:

Code: Select all

TeX capacity exceeded, sorry [main memory size=3000000] ...)
What should I do?
Last edited by deangelo on Sun Jul 31, 2011 9:08 pm, edited 1 time in total.
Student Math Brazilian

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Redefine '\sum' Command

Post by Stefan Kottwitz »

Hi,

there's a recursion. You could save the original command into a macro and use that for redefinition:

Code: Select all

\let\oldsum\sum
\renewcommand{\sum}{\displaystyle\oldsum}
Stefan
LaTeX.org admin
deangelo
Posts: 5
Joined: Fri Jul 29, 2011 7:31 pm

Re: Redefine '\sum' Command

Post by deangelo »

Thank you Stefan!
Really needed this!
Student Math Brazilian
Post Reply