DeclareMathOperator not working on some math names with a number at the end












3















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










share|improve this question


















  • 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 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
















3















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










share|improve this question


















  • 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 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














3












3








3








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










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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 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














  • 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 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








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










1 Answer
1






active

oldest

votes


















5














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).






share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    5














    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).






    share|improve this answer




























      5














      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).






      share|improve this answer


























        5












        5








        5







        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).






        share|improve this answer













        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).







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 18 '18 at 23:10









        egregegreg

        715k8619003186




        715k8619003186






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            鏡平學校

            ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

            Why https connections are so slow when debugging (stepping over) in Java?