Problem redefining hat accent in eulerpx












1















I want to use eulerpx with the alternative hat accent provided by eulervm (via the euler-hat-accent option). To this end, I copied the relevant commands from eulervm.sty (see also this answer). The problem is that the redefinition messes with parentheses:



documentclass{article}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{mathtools,newpxtext,eulerpx}
DeclareSymbolFont{symbols}{U}{zeus}{m}{n}
DeclareMathAccent{hat}{mathalpha}{symbols}{222}

begin{document}

$hat{a}qquad(b)$

end{document}


enter image description here



Without the redefinition of the hat accent (DeclareSymbolFont,DeclareMathAccent) the output is as expected: no omitted parentheses and no extra colon, but of course the modified hat is not obtained.



enter image description here



Am I redefining the hat accent in a wrong way? Is there a way to avoid this strange behavior?










share|improve this question



























    1















    I want to use eulerpx with the alternative hat accent provided by eulervm (via the euler-hat-accent option). To this end, I copied the relevant commands from eulervm.sty (see also this answer). The problem is that the redefinition messes with parentheses:



    documentclass{article}
    usepackage[utf8]{inputenc}
    usepackage[T1]{fontenc}
    usepackage{mathtools,newpxtext,eulerpx}
    DeclareSymbolFont{symbols}{U}{zeus}{m}{n}
    DeclareMathAccent{hat}{mathalpha}{symbols}{222}

    begin{document}

    $hat{a}qquad(b)$

    end{document}


    enter image description here



    Without the redefinition of the hat accent (DeclareSymbolFont,DeclareMathAccent) the output is as expected: no omitted parentheses and no extra colon, but of course the modified hat is not obtained.



    enter image description here



    Am I redefining the hat accent in a wrong way? Is there a way to avoid this strange behavior?










    share|improve this question

























      1












      1








      1








      I want to use eulerpx with the alternative hat accent provided by eulervm (via the euler-hat-accent option). To this end, I copied the relevant commands from eulervm.sty (see also this answer). The problem is that the redefinition messes with parentheses:



      documentclass{article}
      usepackage[utf8]{inputenc}
      usepackage[T1]{fontenc}
      usepackage{mathtools,newpxtext,eulerpx}
      DeclareSymbolFont{symbols}{U}{zeus}{m}{n}
      DeclareMathAccent{hat}{mathalpha}{symbols}{222}

      begin{document}

      $hat{a}qquad(b)$

      end{document}


      enter image description here



      Without the redefinition of the hat accent (DeclareSymbolFont,DeclareMathAccent) the output is as expected: no omitted parentheses and no extra colon, but of course the modified hat is not obtained.



      enter image description here



      Am I redefining the hat accent in a wrong way? Is there a way to avoid this strange behavior?










      share|improve this question














      I want to use eulerpx with the alternative hat accent provided by eulervm (via the euler-hat-accent option). To this end, I copied the relevant commands from eulervm.sty (see also this answer). The problem is that the redefinition messes with parentheses:



      documentclass{article}
      usepackage[utf8]{inputenc}
      usepackage[T1]{fontenc}
      usepackage{mathtools,newpxtext,eulerpx}
      DeclareSymbolFont{symbols}{U}{zeus}{m}{n}
      DeclareMathAccent{hat}{mathalpha}{symbols}{222}

      begin{document}

      $hat{a}qquad(b)$

      end{document}


      enter image description here



      Without the redefinition of the hat accent (DeclareSymbolFont,DeclareMathAccent) the output is as expected: no omitted parentheses and no extra colon, but of course the modified hat is not obtained.



      enter image description here



      Am I redefining the hat accent in a wrong way? Is there a way to avoid this strange behavior?







      accents parentheses eulervm






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 19:44









      Matemáticos ChibchasMatemáticos Chibchas

      23919




      23919






















          2 Answers
          2






          active

          oldest

          votes


















          4














          Your first command DeclareSymbolFont{symbols}{U}{zeus}{m}{n} defines the math symbol family symbols, but eulerpx already defines a symbol family with this name, so you overwrite it. But this is the family where the parentheses come from, so they are replaced with the symbols the new symbols font provides in the respective positions, for example the colon. You can fix this by choosing another name for the family:



          documentclass{article}
          usepackage[utf8]{inputenc}
          usepackage[T1]{fontenc}
          usepackage{mathtools,newpxtext,eulerpx}
          DeclareSymbolFont{zeussymbols}{U}{zeus}{m}{n}
          DeclareMathAccent{hat}{mathalpha}{zeussymbols}{222}

          begin{document}

          $hat{a}qquad(b)$

          end{document}


          enter image description here






          share|improve this answer































            0














            Relatedly, the closest equivalent of eulerpx in the modern toolchain is to usepackage[math-style=upright]{unicode-math} with Palatino or a clone such as Pagella as the Roman font, optionally Optima or a clone such as Classico as the sans-serif font, a newpx clone such as Asana as the main math font, and then portions of Neo Euler.



            The following loads all the combining accents from Neo Euler in math mode:



            setmathfont[Scale = MatchLowercase,
            range={up,bfup,cal,bfcal,frak,bffrak,
            "0301-"030F,"0311,"0323-"0325,"032E-"0332,"033B}
            ]{euler.otf}





            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%2f480976%2fproblem-redefining-hat-accent-in-eulerpx%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              Your first command DeclareSymbolFont{symbols}{U}{zeus}{m}{n} defines the math symbol family symbols, but eulerpx already defines a symbol family with this name, so you overwrite it. But this is the family where the parentheses come from, so they are replaced with the symbols the new symbols font provides in the respective positions, for example the colon. You can fix this by choosing another name for the family:



              documentclass{article}
              usepackage[utf8]{inputenc}
              usepackage[T1]{fontenc}
              usepackage{mathtools,newpxtext,eulerpx}
              DeclareSymbolFont{zeussymbols}{U}{zeus}{m}{n}
              DeclareMathAccent{hat}{mathalpha}{zeussymbols}{222}

              begin{document}

              $hat{a}qquad(b)$

              end{document}


              enter image description here






              share|improve this answer




























                4














                Your first command DeclareSymbolFont{symbols}{U}{zeus}{m}{n} defines the math symbol family symbols, but eulerpx already defines a symbol family with this name, so you overwrite it. But this is the family where the parentheses come from, so they are replaced with the symbols the new symbols font provides in the respective positions, for example the colon. You can fix this by choosing another name for the family:



                documentclass{article}
                usepackage[utf8]{inputenc}
                usepackage[T1]{fontenc}
                usepackage{mathtools,newpxtext,eulerpx}
                DeclareSymbolFont{zeussymbols}{U}{zeus}{m}{n}
                DeclareMathAccent{hat}{mathalpha}{zeussymbols}{222}

                begin{document}

                $hat{a}qquad(b)$

                end{document}


                enter image description here






                share|improve this answer


























                  4












                  4








                  4







                  Your first command DeclareSymbolFont{symbols}{U}{zeus}{m}{n} defines the math symbol family symbols, but eulerpx already defines a symbol family with this name, so you overwrite it. But this is the family where the parentheses come from, so they are replaced with the symbols the new symbols font provides in the respective positions, for example the colon. You can fix this by choosing another name for the family:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage[T1]{fontenc}
                  usepackage{mathtools,newpxtext,eulerpx}
                  DeclareSymbolFont{zeussymbols}{U}{zeus}{m}{n}
                  DeclareMathAccent{hat}{mathalpha}{zeussymbols}{222}

                  begin{document}

                  $hat{a}qquad(b)$

                  end{document}


                  enter image description here






                  share|improve this answer













                  Your first command DeclareSymbolFont{symbols}{U}{zeus}{m}{n} defines the math symbol family symbols, but eulerpx already defines a symbol family with this name, so you overwrite it. But this is the family where the parentheses come from, so they are replaced with the symbols the new symbols font provides in the respective positions, for example the colon. You can fix this by choosing another name for the family:



                  documentclass{article}
                  usepackage[utf8]{inputenc}
                  usepackage[T1]{fontenc}
                  usepackage{mathtools,newpxtext,eulerpx}
                  DeclareSymbolFont{zeussymbols}{U}{zeus}{m}{n}
                  DeclareMathAccent{hat}{mathalpha}{zeussymbols}{222}

                  begin{document}

                  $hat{a}qquad(b)$

                  end{document}


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 22 at 19:52









                  Marcel KrügerMarcel Krüger

                  13k11636




                  13k11636























                      0














                      Relatedly, the closest equivalent of eulerpx in the modern toolchain is to usepackage[math-style=upright]{unicode-math} with Palatino or a clone such as Pagella as the Roman font, optionally Optima or a clone such as Classico as the sans-serif font, a newpx clone such as Asana as the main math font, and then portions of Neo Euler.



                      The following loads all the combining accents from Neo Euler in math mode:



                      setmathfont[Scale = MatchLowercase,
                      range={up,bfup,cal,bfcal,frak,bffrak,
                      "0301-"030F,"0311,"0323-"0325,"032E-"0332,"033B}
                      ]{euler.otf}





                      share|improve this answer




























                        0














                        Relatedly, the closest equivalent of eulerpx in the modern toolchain is to usepackage[math-style=upright]{unicode-math} with Palatino or a clone such as Pagella as the Roman font, optionally Optima or a clone such as Classico as the sans-serif font, a newpx clone such as Asana as the main math font, and then portions of Neo Euler.



                        The following loads all the combining accents from Neo Euler in math mode:



                        setmathfont[Scale = MatchLowercase,
                        range={up,bfup,cal,bfcal,frak,bffrak,
                        "0301-"030F,"0311,"0323-"0325,"032E-"0332,"033B}
                        ]{euler.otf}





                        share|improve this answer


























                          0












                          0








                          0







                          Relatedly, the closest equivalent of eulerpx in the modern toolchain is to usepackage[math-style=upright]{unicode-math} with Palatino or a clone such as Pagella as the Roman font, optionally Optima or a clone such as Classico as the sans-serif font, a newpx clone such as Asana as the main math font, and then portions of Neo Euler.



                          The following loads all the combining accents from Neo Euler in math mode:



                          setmathfont[Scale = MatchLowercase,
                          range={up,bfup,cal,bfcal,frak,bffrak,
                          "0301-"030F,"0311,"0323-"0325,"032E-"0332,"033B}
                          ]{euler.otf}





                          share|improve this answer













                          Relatedly, the closest equivalent of eulerpx in the modern toolchain is to usepackage[math-style=upright]{unicode-math} with Palatino or a clone such as Pagella as the Roman font, optionally Optima or a clone such as Classico as the sans-serif font, a newpx clone such as Asana as the main math font, and then portions of Neo Euler.



                          The following loads all the combining accents from Neo Euler in math mode:



                          setmathfont[Scale = MatchLowercase,
                          range={up,bfup,cal,bfcal,frak,bffrak,
                          "0301-"030F,"0311,"0323-"0325,"032E-"0332,"033B}
                          ]{euler.otf}






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Mar 23 at 18:15









                          DavislorDavislor

                          7,1091431




                          7,1091431






























                              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%2f480976%2fproblem-redefining-hat-accent-in-eulerpx%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

                              Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                              ComboBox Display Member on multiple fields

                              Is it possible to collect Nectar points via Trainline?