Hyperbolic functions both produce error and result already existant when inserted in preamble
not all the hyperbolic functions are defined in amsmath
(actually, in amsopn.sty
).
only \sinh
, \cosh
, \tanh
and \coth
are defined there.
you can define the others exactly like you've shown for \sech
, and can check in
amsopn.sty
if you encounter any other conflicts.
amsopn.sty
was never meant to be exhaustive. it covers only the operator names
found most frequently in ams publications as of the time it was compiled.
there are surely many other possibilities.
Related videos on Youtube
maja
Updated on March 19, 2020Comments
-
maja over 3 years
I'm trying to write hyperbolic functions like sech, csch, etc,
Since amsmath doesn't recognize them in the form
\sech
,\csch
, ...I wrote a preamble like
\DeclareMathOperator{\sech}{sech}
but I get this error:! LaTex Error: Command \tanh already defined. Or name \end... illegal, see p. 192 of the manual.
how should I write the hyperbolic functions?
-
Admin over 8 yearsWelcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with
\documentclass{...}
and ending with\end{document}
. -
maja over 8 yearsafter this comment I worked it out:
tanh
andcoth
were already defined,sech
andcsch
neededd to be defined in the preamble -
Admin over 8 yearsBarbara Beeton already answered: The standard hyperbolic function macros are there,
\sech
etc are quite rare, in my point of view, so they weren't defined.
-
-
maja over 8 yearsafter having read this answer first in the comments I worked it out:
tanh
andcoth
were already defined,sech
andcsch
needed to be defined in the preamble. thanks