General\tag in equations

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

\tag in equations

Post by warrence »

Hi community!

I want to change the tags of equations in such a way, that they display for example "(*)" instead of "(1.1)".
Currently I'm using the "\tag"-command provided by amsmath (or empheq or ntheorem, it's always the same) but there are several problems with that.

First, I get a warning (displayed as "error" by LaTeXEditor, though), seems to be an interference with "hyperref" (changing loading order does not help):
warning (ext4): destination with the same identifier (name{equation.0.1}) has been already used, duplicate ignored
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox
\fi \fi
l.17 \end{document}
document:
test2.tex
mwe for warning
(331 Bytes) Downloaded 540 times
Second: \tag does not work inside an eqnarray environment.

Third: I can't get rid of the () because sometimes i want to use [].

Is there a better way to use customized equation tags? Help would be appreciated!

Thanks in advance

Recommended reading 2024:

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

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

User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

\tag in equations

Post by Juanjo »

warrence wrote: First, I get a warning (displayed as "error" by LaTeXEditor, though), seems to be an interference with "hyperref" (changing loading order does not help):
Since you use \tag to number equations, don't use numbered mathematical environments. Replace equation by equation*.
Second: \tag does not work inside an eqnarray environment.
Never use eqnarray. Replace it by align or other amsmath environment.
Third: I can't get rid of the () because sometimes i want to use [].
Use \tag*{[foo]} instead of \tag{foo}.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

\tag in equations

Post by Stefan Kottwitz »

Hi warrence,

Juanjo already gave good advice. I just will mention some additional thoughts.

First: a quick fix would be the option hypertexnames=false for hyperref. Alternatively you could use amsmath environments, even gather instead of equation (could be done automatically by \let if you want), or increase the equation counter manually.

Second: like Juanjo said. Here you will find explanation and examples: eqnarray vs. align.

Best regards,

Stefan
LaTeX.org admin
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

\tag in equations

Post by balf »

You can define different styles of tags and change the way of referencing them with the mathtools package (part of the mh bundle).

B.A.
warrence
Posts: 16
Joined: Mon May 05, 2008 10:43 pm

Re: \tag in equations

Post by warrence »

I already realized that eqnarray shows a strange behavior, but i did not try to use "align". It's kind of dumb, I think, because I use "align*" all the time... damn
Thanks alot for the help and the hints!
Greetings,
Stefan
Post Reply