DeclareMathOperator not working on some math names with a number at the end
up vote
3
down vote
favorite
I am trying to use DeclareMathOperator
to make names for some Maple generated latex which uses the special function LommelS1
For some reason I can't figure out, it is not working.
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
DeclareMathOperator{LommelS2}{LommelS2}
begin{document}
[
LommelS1 x
]
end{document}
Error is
>lualatex foo.tex
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd)
! Use of LommelS doesn't match its definition.
l.14 LommelS1
x
?
Notice it is looking for LommelS
but the operator is LommelS1
It seems the number at the end of the operator is confusing it. Also when I remove the second DeclareMathOperator
now it works:
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
%DeclareMathOperator{LommelS2}{LommelS2} %when commented, it works
begin{document}
[
LommelS1 x
]
end{document}
But I need to use LommelS1
and LommelS2
so the numbers at the end are important since Maple latex will contain both such names.
Is where a way around this?
TL 2018
math-operators
add a comment |
up vote
3
down vote
favorite
I am trying to use DeclareMathOperator
to make names for some Maple generated latex which uses the special function LommelS1
For some reason I can't figure out, it is not working.
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
DeclareMathOperator{LommelS2}{LommelS2}
begin{document}
[
LommelS1 x
]
end{document}
Error is
>lualatex foo.tex
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd)
! Use of LommelS doesn't match its definition.
l.14 LommelS1
x
?
Notice it is looking for LommelS
but the operator is LommelS1
It seems the number at the end of the operator is confusing it. Also when I remove the second DeclareMathOperator
now it works:
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
%DeclareMathOperator{LommelS2}{LommelS2} %when commented, it works
begin{document}
[
LommelS1 x
]
end{document}
But I need to use LommelS1
and LommelS2
so the numbers at the end are important since Maple latex will contain both such names.
Is where a way around this?
TL 2018
math-operators
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do ifLommelS
is always followed by1
or2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.
– egreg
Nov 18 at 23:05
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I am trying to use DeclareMathOperator
to make names for some Maple generated latex which uses the special function LommelS1
For some reason I can't figure out, it is not working.
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
DeclareMathOperator{LommelS2}{LommelS2}
begin{document}
[
LommelS1 x
]
end{document}
Error is
>lualatex foo.tex
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd)
! Use of LommelS doesn't match its definition.
l.14 LommelS1
x
?
Notice it is looking for LommelS
but the operator is LommelS1
It seems the number at the end of the operator is confusing it. Also when I remove the second DeclareMathOperator
now it works:
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
%DeclareMathOperator{LommelS2}{LommelS2} %when commented, it works
begin{document}
[
LommelS1 x
]
end{document}
But I need to use LommelS1
and LommelS2
so the numbers at the end are important since Maple latex will contain both such names.
Is where a way around this?
TL 2018
math-operators
I am trying to use DeclareMathOperator
to make names for some Maple generated latex which uses the special function LommelS1
For some reason I can't figure out, it is not working.
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
DeclareMathOperator{LommelS2}{LommelS2}
begin{document}
[
LommelS1 x
]
end{document}
Error is
>lualatex foo.tex
This is LuaTeX, Version 1.07.0 (TeX Live 2018)
restricted system commands enabled.
(/usr/local/texlive/2018/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsfonts/umsb.fd)
! Use of LommelS doesn't match its definition.
l.14 LommelS1
x
?
Notice it is looking for LommelS
but the operator is LommelS1
It seems the number at the end of the operator is confusing it. Also when I remove the second DeclareMathOperator
now it works:
documentclass[11pt]{article}
usepackage{amsmath,mathtools,amssymb}
DeclareMathOperator{LommelS1}{LommelS1}
%DeclareMathOperator{LommelS2}{LommelS2} %when commented, it works
begin{document}
[
LommelS1 x
]
end{document}
But I need to use LommelS1
and LommelS2
so the numbers at the end are important since Maple latex will contain both such names.
Is where a way around this?
TL 2018
math-operators
math-operators
asked Nov 18 at 22:58
Nasser
8,01163081
8,01163081
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do ifLommelS
is always followed by1
or2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.
– egreg
Nov 18 at 23:05
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07
add a comment |
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do ifLommelS
is always followed by1
or2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.
– egreg
Nov 18 at 23:05
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07
4
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do if LommelS
is always followed by 1
or 2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.– egreg
Nov 18 at 23:05
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do if LommelS
is always followed by 1
or 2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.– egreg
Nov 18 at 23:05
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
If there's no LommelS
without a following digit and Maple always generates either LommelS1
or LommelS2
, then it's easy:
newcommand{LommelS}[1]{operatorname{LommelS#1}}
You should know that only letters are accepted in command names that have a letter in their name (only a single nonletter can form a command name).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
If there's no LommelS
without a following digit and Maple always generates either LommelS1
or LommelS2
, then it's easy:
newcommand{LommelS}[1]{operatorname{LommelS#1}}
You should know that only letters are accepted in command names that have a letter in their name (only a single nonletter can form a command name).
add a comment |
up vote
5
down vote
accepted
If there's no LommelS
without a following digit and Maple always generates either LommelS1
or LommelS2
, then it's easy:
newcommand{LommelS}[1]{operatorname{LommelS#1}}
You should know that only letters are accepted in command names that have a letter in their name (only a single nonletter can form a command name).
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
If there's no LommelS
without a following digit and Maple always generates either LommelS1
or LommelS2
, then it's easy:
newcommand{LommelS}[1]{operatorname{LommelS#1}}
You should know that only letters are accepted in command names that have a letter in their name (only a single nonletter can form a command name).
If there's no LommelS
without a following digit and Maple always generates either LommelS1
or LommelS2
, then it's easy:
newcommand{LommelS}[1]{operatorname{LommelS#1}}
You should know that only letters are accepted in command names that have a letter in their name (only a single nonletter can form a command name).
answered Nov 18 at 23:10
egreg
700k8518633138
700k8518633138
add a comment |
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460667%2fdeclaremathoperator-not-working-on-some-math-names-with-a-number-at-the-end%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 at 23:01
newcommand{LommelS}[1]{operatorname{LommelS#1}}
will do ifLommelS
is always followed by1
or2
(or a single digit). A slower routine is needed otherwise. Without more information it's not possible to say more.– egreg
Nov 18 at 23:05
@egreg thanks. Yes, the commands from Maple only have 1 or 2 at the end. So I will try your suggestion above now.
– Nasser
Nov 18 at 23:07