DeclareMathOperator adds spaces after the periods contained in its second argument (name text)
Clash Royale CLAN TAG#URR8PPP
up vote
6
down vote
favorite
The following MCE points out that DeclareMathOperator
, if its second argument (name text) contains periods, adds spaces after those periods:
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
Do you know why and how to get rid of these spaces?
spacing amsmath math-operators operator-space
add a comment |Â
up vote
6
down vote
favorite
The following MCE points out that DeclareMathOperator
, if its second argument (name text) contains periods, adds spaces after those periods:
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
Do you know why and how to get rid of these spaces?
spacing amsmath math-operators operator-space
DeclareMathOperatorlimonel.i.m.
Note that while thel.i.m.
will still line up with yourtext
case, there will be a gap following the last.
, becausel.i.m.
is now an operator, whereastextl.i.m.
is a math atom.
â Steven B. Segletes
Sep 19 at 19:48
Using.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it before
â daleif
Sep 19 at 19:50
@daleif.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)
â Denis Bitouzé
Sep 19 at 19:56
add a comment |Â
up vote
6
down vote
favorite
up vote
6
down vote
favorite
The following MCE points out that DeclareMathOperator
, if its second argument (name text) contains periods, adds spaces after those periods:
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
Do you know why and how to get rid of these spaces?
spacing amsmath math-operators operator-space
The following MCE points out that DeclareMathOperator
, if its second argument (name text) contains periods, adds spaces after those periods:
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
Do you know why and how to get rid of these spaces?
spacing amsmath math-operators operator-space
spacing amsmath math-operators operator-space
asked Sep 19 at 19:42
Denis Bitouzé
3,49111345
3,49111345
DeclareMathOperatorlimonel.i.m.
Note that while thel.i.m.
will still line up with yourtext
case, there will be a gap following the last.
, becausel.i.m.
is now an operator, whereastextl.i.m.
is a math atom.
â Steven B. Segletes
Sep 19 at 19:48
Using.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it before
â daleif
Sep 19 at 19:50
@daleif.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)
â Denis Bitouzé
Sep 19 at 19:56
add a comment |Â
DeclareMathOperatorlimonel.i.m.
Note that while thel.i.m.
will still line up with yourtext
case, there will be a gap following the last.
, becausel.i.m.
is now an operator, whereastextl.i.m.
is a math atom.
â Steven B. Segletes
Sep 19 at 19:48
Using.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it before
â daleif
Sep 19 at 19:50
@daleif.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)
â Denis Bitouzé
Sep 19 at 19:56
DeclareMathOperatorlimonel.i.m.
Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
is now an operator, whereas textl.i.m.
is a math atom.â Steven B. Segletes
Sep 19 at 19:48
DeclareMathOperatorlimonel.i.m.
Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
is now an operator, whereas textl.i.m.
is a math atom.â Steven B. Segletes
Sep 19 at 19:48
Using
.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it beforeâ daleif
Sep 19 at 19:50
Using
.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it beforeâ daleif
Sep 19 at 19:50
@daleif
.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)â Denis Bitouzé
Sep 19 at 19:56
@daleif
.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)â Denis Bitouzé
Sep 19 at 19:56
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Compare with
$lmathpunct.imathpunct.m$
Indeed, your limone
gives qopname newmcodes@ ol.i.m.
and newmcodes
assigns mathpunct
category to the dot (which will be taken in letters font, not operators...). Another strangeness of newmcodes@
.
newmcodes@ ->mathcode `'39mathcode `*42mathcode `."613Aifnum mathcode
`-=45 else mathchardef std@minus mathcode `-relax fi mathcode `-45ma
thcode `/47mathcode `:"603Arelax
You will have same mathpunct
spacing with :
.
What to do? You can always define your own newmcodes@
to replace above definition.
1
Define my ownnewmcodes@
?! Are you kidding me? :)
â Denis Bitouzé
Sep 19 at 20:20
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv;-)
. Tryletnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the6
in"613A"
â jfbu
Sep 19 at 21:03
1
I guess that when the code forqopname
was being developed by Spivak and the AMS (it went essentially unchanged intoamsmath.sty
fromamstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.
â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
add a comment |Â
up vote
4
down vote
DeclareMathOperatorlimonel.i.m.
will fix the excess space in row 1, making it like row 2. Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
(in the form of limone
or limtwo
) is now an operator, whereas textl.i.m.
is a math atom.
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added thetext
example in order to show the spaces withDeclareMathOperator
didn't come from a possible underlying "text" mode).
â Denis Bitouzé
Sep 19 at 19:59
1
@DenisBitouzé Not sure, but it may be related to this:gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared inamstex.sty
.
â Steven B. Segletes
Sep 19 at 20:09
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Compare with
$lmathpunct.imathpunct.m$
Indeed, your limone
gives qopname newmcodes@ ol.i.m.
and newmcodes
assigns mathpunct
category to the dot (which will be taken in letters font, not operators...). Another strangeness of newmcodes@
.
newmcodes@ ->mathcode `'39mathcode `*42mathcode `."613Aifnum mathcode
`-=45 else mathchardef std@minus mathcode `-relax fi mathcode `-45ma
thcode `/47mathcode `:"603Arelax
You will have same mathpunct
spacing with :
.
What to do? You can always define your own newmcodes@
to replace above definition.
1
Define my ownnewmcodes@
?! Are you kidding me? :)
â Denis Bitouzé
Sep 19 at 20:20
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv;-)
. Tryletnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the6
in"613A"
â jfbu
Sep 19 at 21:03
1
I guess that when the code forqopname
was being developed by Spivak and the AMS (it went essentially unchanged intoamsmath.sty
fromamstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.
â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
add a comment |Â
up vote
3
down vote
accepted
Compare with
$lmathpunct.imathpunct.m$
Indeed, your limone
gives qopname newmcodes@ ol.i.m.
and newmcodes
assigns mathpunct
category to the dot (which will be taken in letters font, not operators...). Another strangeness of newmcodes@
.
newmcodes@ ->mathcode `'39mathcode `*42mathcode `."613Aifnum mathcode
`-=45 else mathchardef std@minus mathcode `-relax fi mathcode `-45ma
thcode `/47mathcode `:"603Arelax
You will have same mathpunct
spacing with :
.
What to do? You can always define your own newmcodes@
to replace above definition.
1
Define my ownnewmcodes@
?! Are you kidding me? :)
â Denis Bitouzé
Sep 19 at 20:20
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv;-)
. Tryletnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the6
in"613A"
â jfbu
Sep 19 at 21:03
1
I guess that when the code forqopname
was being developed by Spivak and the AMS (it went essentially unchanged intoamsmath.sty
fromamstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.
â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Compare with
$lmathpunct.imathpunct.m$
Indeed, your limone
gives qopname newmcodes@ ol.i.m.
and newmcodes
assigns mathpunct
category to the dot (which will be taken in letters font, not operators...). Another strangeness of newmcodes@
.
newmcodes@ ->mathcode `'39mathcode `*42mathcode `."613Aifnum mathcode
`-=45 else mathchardef std@minus mathcode `-relax fi mathcode `-45ma
thcode `/47mathcode `:"603Arelax
You will have same mathpunct
spacing with :
.
What to do? You can always define your own newmcodes@
to replace above definition.
Compare with
$lmathpunct.imathpunct.m$
Indeed, your limone
gives qopname newmcodes@ ol.i.m.
and newmcodes
assigns mathpunct
category to the dot (which will be taken in letters font, not operators...). Another strangeness of newmcodes@
.
newmcodes@ ->mathcode `'39mathcode `*42mathcode `."613Aifnum mathcode
`-=45 else mathchardef std@minus mathcode `-relax fi mathcode `-45ma
thcode `/47mathcode `:"603Arelax
You will have same mathpunct
spacing with :
.
What to do? You can always define your own newmcodes@
to replace above definition.
answered Sep 19 at 20:10
jfbu
42.6k64138
42.6k64138
1
Define my ownnewmcodes@
?! Are you kidding me? :)
â Denis Bitouzé
Sep 19 at 20:20
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv;-)
. Tryletnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the6
in"613A"
â jfbu
Sep 19 at 21:03
1
I guess that when the code forqopname
was being developed by Spivak and the AMS (it went essentially unchanged intoamsmath.sty
fromamstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.
â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
add a comment |Â
1
Define my ownnewmcodes@
?! Are you kidding me? :)
â Denis Bitouzé
Sep 19 at 20:20
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv;-)
. Tryletnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the6
in"613A"
â jfbu
Sep 19 at 21:03
1
I guess that when the code forqopname
was being developed by Spivak and the AMS (it went essentially unchanged intoamsmath.sty
fromamstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.
â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
1
1
Define my own
newmcodes@
?! Are you kidding me? :)â Denis Bitouzé
Sep 19 at 20:20
Define my own
newmcodes@
?! Are you kidding me? :)â Denis Bitouzé
Sep 19 at 20:20
1
1
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv
;-)
. Try letnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the 6
in "613A"
â jfbu
Sep 19 at 21:03
@DenisBitouzé I knew that would keep you busy while I went to watch cartoons on replay-tv
;-)
. Try letnewmcodes@relax
or ok if you want it more politically correct, copy above (beware linebreaks) removing the 6
in "613A"
â jfbu
Sep 19 at 21:03
1
1
I guess that when the code for
qopname
was being developed by Spivak and the AMS (it went essentially unchanged into amsmath.sty
from amstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.â egreg
Sep 19 at 21:37
I guess that when the code for
qopname
was being developed by Spivak and the AMS (it went essentially unchanged into amsmath.sty
from amstex.tex
) the use cases dictated that the period had to be considered as punctuation in an operator name.â egreg
Sep 19 at 21:37
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
@egreg you are right, surely. I wonder what kind of use cases, and why one would treat an operator name like a piece of text.
â jfbu
Sep 20 at 8:38
add a comment |Â
up vote
4
down vote
DeclareMathOperatorlimonel.i.m.
will fix the excess space in row 1, making it like row 2. Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
(in the form of limone
or limtwo
) is now an operator, whereas textl.i.m.
is a math atom.
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added thetext
example in order to show the spaces withDeclareMathOperator
didn't come from a possible underlying "text" mode).
â Denis Bitouzé
Sep 19 at 19:59
1
@DenisBitouzé Not sure, but it may be related to this:gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared inamstex.sty
.
â Steven B. Segletes
Sep 19 at 20:09
add a comment |Â
up vote
4
down vote
DeclareMathOperatorlimonel.i.m.
will fix the excess space in row 1, making it like row 2. Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
(in the form of limone
or limtwo
) is now an operator, whereas textl.i.m.
is a math atom.
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added thetext
example in order to show the spaces withDeclareMathOperator
didn't come from a possible underlying "text" mode).
â Denis Bitouzé
Sep 19 at 19:59
1
@DenisBitouzé Not sure, but it may be related to this:gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared inamstex.sty
.
â Steven B. Segletes
Sep 19 at 20:09
add a comment |Â
up vote
4
down vote
up vote
4
down vote
DeclareMathOperatorlimonel.i.m.
will fix the excess space in row 1, making it like row 2. Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
(in the form of limone
or limtwo
) is now an operator, whereas textl.i.m.
is a math atom.
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
DeclareMathOperatorlimonel.i.m.
will fix the excess space in row 1, making it like row 2. Note that while the l.i.m.
will still line up with your text
case, there will be a gap following the last .
, because l.i.m.
(in the form of limone
or limtwo
) is now an operator, whereas textl.i.m.
is a math atom.
documentclassarticle
usepackageamsmath
%
DeclareMathOperatorlimonel.i.m.
newcommandlimtwomathopmathrml.i.m.
%
begindocument
beginalign*
A_t & =limone A_n,t \
A_t & =limtwo A_n,t \
A_t & =textl.i.m. A_n,t
endalign*
enddocument
edited Sep 19 at 19:58
answered Sep 19 at 19:51
Steven B. Segletes
148k9186390
148k9186390
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added thetext
example in order to show the spaces withDeclareMathOperator
didn't come from a possible underlying "text" mode).
â Denis Bitouzé
Sep 19 at 19:59
1
@DenisBitouzé Not sure, but it may be related to this:gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared inamstex.sty
.
â Steven B. Segletes
Sep 19 at 20:09
add a comment |Â
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added thetext
example in order to show the spaces withDeclareMathOperator
didn't come from a possible underlying "text" mode).
â Denis Bitouzé
Sep 19 at 19:59
1
@DenisBitouzé Not sure, but it may be related to this:gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared inamstex.sty
.
â Steven B. Segletes
Sep 19 at 20:09
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added the
text
example in order to show the spaces with DeclareMathOperator
didn't come from a possible underlying "text" mode).â Denis Bitouzé
Sep 19 at 19:59
It does the trick, indeed. But why this behaviour without the braces? And agree with your note (I added the
text
example in order to show the spaces with DeclareMathOperator
didn't come from a possible underlying "text" mode).â Denis Bitouzé
Sep 19 at 19:59
1
1
@DenisBitouzé Not sure, but it may be related to this:
gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared in amstex.sty
.â Steven B. Segletes
Sep 19 at 20:09
@DenisBitouzé Not sure, but it may be related to this:
gdefnewmcodes@mathcode`'39mathcode``*42mathcode``."613A% mathcode``-45mathcode``/47mathcode``:"603Arelax
, declared in amstex.sty
.â Steven B. Segletes
Sep 19 at 20:09
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f451591%2fdeclaremathoperator-adds-spaces-after-the-periods-contained-in-its-second-argum%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
DeclareMathOperatorlimonel.i.m.
Note that while thel.i.m.
will still line up with yourtext
case, there will be a gap following the last.
, becausel.i.m.
is now an operator, whereastextl.i.m.
is a math atom.â Steven B. Segletes
Sep 19 at 19:48
Using
.
? Untested, it just makes the dot an ord. Which math operator is that? Never seen one with punctuation in it beforeâ daleif
Sep 19 at 19:50
@daleif
.
works nicely indeed. Concerning the operator, some authors use it for denoting the convergence in the mean square sense. I agree it is quite strange :)â Denis Bitouzé
Sep 19 at 19:56