Hyperbolic functions both produce error and result already existant when inserted in preamble

1,042

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.

Share:
1,042

Related videos on Youtube

maja
Author by

maja

Updated on March 19, 2020

Comments

  • maja
    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
      Admin over 8 years
      Welcome 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
      maja over 8 years
      after this comment I worked it out: tanh and coth were already defined, sech and csch neededd to be defined in the preamble
    • Admin
      Admin over 8 years
      Barbara 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
    maja over 8 years
    after having read this answer first in the comments I worked it out: tanh and coth were already defined, sech and csch needed to be defined in the preamble. thanks