GeneralGlobal no-numbering

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Global no-numbering

Post by Bozack »

I'm looking for a command to put in the preamble to make all the numbering of equations globally not showing up - so that I do not have to type an asterisk everytime I make a \begin{equation} etc.

Any ideas? I haven't had any luck google'ing it... :cry:
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: Global no-numbering

Post by balf »

\renewcommand{\theequation}{\relax}} should work.
B.A.
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Global no-numbering

Post by Bozack »

balf wrote:\renewcommand{\theequation}{\relax}} should work.
B.A.

That just makes the parathesis empty, as ().. any other ideas?
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Global no-numbering

Post by gmedina »

Take a look at the following example:

Code: Select all

\documentclass{article} 
\usepackage{amsmath}

\newenvironment{equa}{\equation\nonumber}{\endequation}

\begin{document}
\nonumber

\begin{equa}
 a=b
\end{equa}

\begin{align}
 a&=b\\
 c&=d
\end{align}

\begin{multline}
 a=b\\
 c=d
\end{multline}

\end{document}
Remarks: 1) The \nonumber command removes the numbering in all (I think) the equation-like environments except for equation.
2) For the remaining case (equation) I defined a synonym called equa that will remove the numbering.
3) I didn't test this approach with all the environments, so I'm not sure that it will be effective for all of them.
4) I think that using the starred versions of the environments it's a better idea and that it does not requiere too much effort.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Global no-numbering

Post by Bozack »

I still think there is a command to place in the preamble to remove all the numberings though... I really believe that I've seen it done once...

gmedina's approach is fine - but that will make it necessary for me to use the equa environment instead of the normal equation environment - and the reason for my request for a preamble-command is that such one is easily commented out if I actually want to have numbering anyway. If I comment out gmedina's preamble-code all my equa environments will turn out as errors?
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: Global no-numbering

Post by balf »

I had forgotten those parentheses... but I have another suggestion: the mathtools package (in the mh bundle) lets customise equation tags with a \newtagform and a \renewtagfor commands (you could suppress those damned parentheses) and, simpler, has an option 'showonlyrefs'.

B.A.
User avatar
Bozack
Posts: 117
Joined: Wed Feb 06, 2008 4:21 pm

Global no-numbering

Post by Bozack »

balf wrote:but I have another suggestion: the mathtools package (in the mh bundle) lets customise equation tags with a \newtagform and a \renewtagform commands (you could suppress those damned parentheses) and, simpler, has an option 'showonlyrefs'.
Thanks! Just what I needed :) "showonlyrefs" was perfect :P
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 10 Professional 64bit, MikTeX 4.9, TeXnicCenter 2.02 64bit
Post Reply