Discussion:
subscript under user-defined operator
Add Reply
jfh
2018-10-16 21:46:56 UTC
Reply
Permalink
The NIST Handbook of Mathematical Functions equation 2.3.18 uses res with t=a underneath it to indicate the residue of a function of t at the point t=a,
but the following example puts it after res. What am I doing wrong?

\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareMathOperator{\res}{res}
\begin{document}
\begin{gather}
\res\limits_{t=a}\left[\frac{1}{t-a}\right]=1.
\end{gather}
\end{document}
b***@free.fr
2018-10-16 22:19:36 UTC
Reply
Permalink
Post by jfh
The NIST Handbook of Mathematical Functions equation 2.3.18 uses res with t=a underneath it to indicate the residue of a function of t at the point t=a,
but the following example puts it after res. What am I doing wrong?
\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareMathOperator{\res}{res}
\begin{document}
\begin{gather}
\res\limits_{t=a}\left[\frac{1}{t-a}\right]=1.
\end{gather}
\end{document}
Use in your preamble

\DeclareMathOperator*{\res]{res}

(with a star), the simply type

\res_{t=a}\left[\frac{1}{t-a}\right]=1.

(\limits is not necessary).
jfh
2018-10-17 21:29:23 UTC
Reply
Permalink
Post by b***@free.fr
Post by jfh
The NIST Handbook of Mathematical Functions equation 2.3.18 uses res with t=a underneath it to indicate the residue of a function of t at the point t=a,
but the following example puts it after res. What am I doing wrong?
\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareMathOperator{\res}{res}
\begin{document}
\begin{gather}
\res\limits_{t=a}\left[\frac{1}{t-a}\right]=1.
\end{gather}
\end{document}
Use in your preamble
\DeclareMathOperator*{\res]{res}
(with a star), the simply type
\res_{t=a}\left[\frac{1}{t-a}\right]=1.
(\limits is not necessary).
That worked perfectly! But I am still surprised that \limits fails for user-defined operators. Maybe that's why AMS invented \DeclareMathOperator* as well as \DeclareMathOperator
Dan Luecking
2018-10-19 21:05:19 UTC
Reply
Permalink
Post by jfh
Post by b***@free.fr
Post by jfh
The NIST Handbook of Mathematical Functions equation 2.3.18 uses res with t=a underneath it to indicate the residue of a function of t at the point t=a,
but the following example puts it after res. What am I doing wrong?
\documentclass{article}
\usepackage{amsmath,amssymb}
\DeclareMathOperator{\res}{res}
\begin{document}
\begin{gather}
\res\limits_{t=a}\left[\frac{1}{t-a}\right]=1.
\end{gather}
\end{document}
Use in your preamble
\DeclareMathOperator*{\res]{res}
(with a star), the simply type
\res_{t=a}\left[\frac{1}{t-a}\right]=1.
(\limits is not necessary).
That worked perfectly! But I am still surprised that \limits fails for
user-defined operators. Maybe that's why AMS invented \DeclareMathOperator*
as well as \DeclareMathOperator
This is actually an intentional obstruction included by the authors
of \DeclareMathOperator: it defines \res to look ahead for \limits
and remove it if it finds one. It only does this once, so you
can write
\res\limits\limits
to get what you want.

The * version is more flexible in that you can follow your command
with either \limits or \nolimits or \displaylimits to select the
behavior you want.

In fact, you can globally change the behavior of commands defined
with \DeclareMathOperator*:
After \nonamelimits they behave as if followed by \nolimits and
after \namelimits they behave as if followed by \displaylimits.
You could also write
\makeatletter
\let\nmlimits@ \limits
\makeatother
to have them all behave as if followed by \limits.


Cheers,
Dan
To reply by email, change LookInSig to luecking

Loading...