DeclareMathOperator not working on some math names with a number at the end
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 |
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 '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 '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 '18 at 23:07
add a comment |
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 '18 at 22:58
NasserNasser
8,19363183
8,19363183
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 '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 '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 '18 at 23:07
add a comment |
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 '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 '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 '18 at 23:07
4
4
Command names cannot have digits in them, only letters.
– egreg
Nov 18 '18 at 23:01
Command names cannot have digits in them, only letters.
– egreg
Nov 18 '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 '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 '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 '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 '18 at 23:07
add a comment |
1 Answer
1
active
oldest
votes
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 |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 |
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 |
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 '18 at 23:10
egregegreg
715k8619003186
715k8619003186
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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 '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 '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 '18 at 23:07