What is the correct type for sign(x)(signum function)? I'm using:
\documentclass[journal,transmag]{IEEEtran}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand{\sign}{\text{sign}}
Is that correct or should I be using "sgn" instead?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityWhether you use “sign” or “sgn” is a style issue which your intended publisher can answer, not us. That said, you probably want to use AMSMath’s \DeclareMathOperator
not \newcommand
; see newcommand vs. DeclareMathOperator:
…
\usepackage{amsmath}
\DeclareMathOperator{\sign}{sign}
…
Depending on the value of $\sign x$, $y$ will take the following values:
…
(On the other hand, see \DeclareMathOperator won't take arguments for times to use \newcommand
, and how best to do so. As noted there, if you do define your own commands, use \operatorname
not \text
to format the name.)
The question of whether to use "sgn" or "sign" is not entirely subjective: the ISO 80000-2 standard says it should be "sgn".
tan
or tg
), arcus sine (choose arc\,sin
, arcsin
or sin^{-1}
), etc. :-)
– yo'
Oct 2 '15 at 16:59
sgn
function. But even more sad it is that no package has such a function yet (the people of amsmath
could add it!). So I think the question is pertinent and 9 more people think the same. :)
– loved.by.Jesus
Feb 19 '16 at 16:52
\DeclareMathOperator{\sgn}{sgn}
after you've loadedamsmath
. – Bernard Dec 2 '14 at 0:26\newcommand{\sign}{\text{sgn}}
? If so, I think your question is off-topic for this site as it is about notation rather than how to produce it. – cfr Dec 2 '14 at 0:26\DeclareMathOperator\sign{sign}
. And, as an extra, that lets you change the name; if you prefer to usesgn
you just change the definition to\DeclareMathOperator\sign{sgn}
. – Manuel Dec 2 '14 at 0:26\text{...}
! Use\DeclareMathOperator{\sgn}{sgn}
instead. Edit: too slow... – JBantje Dec 2 '14 at 0:29