bar and overbar not centered with unicode-math and Tex Gyre Font












2















I noticed that the bar and overbar as defined in unicode-math do not yield a centered bar over the letters.



For example for



documentclass{article}

usepackage{amsmath,unicode-math}
unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
setmathfont{texgyrepagella-math.otf}
%setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

begin{document}
begin{align}
bar{mscrw} overbar{mscrw}
end{align}
end{document}


I get:



enter image description here



Is there anything I can do about it?



P.S.: I am using texlive 2018 with lualatex.










share|improve this question





























    2















    I noticed that the bar and overbar as defined in unicode-math do not yield a centered bar over the letters.



    For example for



    documentclass{article}

    usepackage{amsmath,unicode-math}
    unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
    setmathfont{texgyrepagella-math.otf}
    %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

    begin{document}
    begin{align}
    bar{mscrw} overbar{mscrw}
    end{align}
    end{document}


    I get:



    enter image description here



    Is there anything I can do about it?



    P.S.: I am using texlive 2018 with lualatex.










    share|improve this question



























      2












      2








      2








      I noticed that the bar and overbar as defined in unicode-math do not yield a centered bar over the letters.



      For example for



      documentclass{article}

      usepackage{amsmath,unicode-math}
      unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
      setmathfont{texgyrepagella-math.otf}
      %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

      begin{document}
      begin{align}
      bar{mscrw} overbar{mscrw}
      end{align}
      end{document}


      I get:



      enter image description here



      Is there anything I can do about it?



      P.S.: I am using texlive 2018 with lualatex.










      share|improve this question
















      I noticed that the bar and overbar as defined in unicode-math do not yield a centered bar over the letters.



      For example for



      documentclass{article}

      usepackage{amsmath,unicode-math}
      unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
      setmathfont{texgyrepagella-math.otf}
      %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

      begin{document}
      begin{align}
      bar{mscrw} overbar{mscrw}
      end{align}
      end{document}


      I get:



      enter image description here



      Is there anything I can do about it?



      P.S.: I am using texlive 2018 with lualatex.







      math-mode unicode-math






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 30 at 10:30









      egreg

      726k8819193227




      726k8819193227










      asked Jan 30 at 9:38









      bonanzabonanza

      7321625




      7321625






















          3 Answers
          3






          active

          oldest

          votes


















          1














          It seems like a font bug.



          If you use bar{{}mscrw} the output is as expected.



          documentclass{article}

          usepackage{amsmath,unicode-math}

          unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

          setmathfont{texgyrepagella-math.otf}

          begin{document}

          begin{gather}
          bar{mathscr{a}} overbar{mathscr{a}} wideoverbar{mathscr{a}} \
          bar{mathscr{b}} overbar{mathscr{b}} wideoverbar{mathscr{b}} \
          bar{mathscr{d}} overbar{mathscr{d}} wideoverbar{mathscr{d}} \
          bar{mathscr{g}} overbar{mathscr{g}} wideoverbar{mathscr{g}} \
          bar{mathscr{u}} overbar{mathscr{u}} wideoverbar{mathscr{u}} \
          bar{mathscr{w}} overbar{mathscr{w}} wideoverbar{mathscr{w}} \
          bar{{}mscrw} overbar{{}mscrw} wideoverbar{{}mscrw}
          end{gather}

          end{document}


          enter image description here



          It's possible to fix bar (and other accents in the same way):



          documentclass{article}

          usepackage{amsmath,unicode-math}

          unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

          setmathfont{texgyrepagella-math.otf}

          ExplSyntaxOn
          cs_set_protected:Nn bonanza_bar_new:n
          {
          str_case:nnTF { #1 }
          {
          {mathscr{w}}{}
          {mscrw}{}
          }
          { bonanza_bar_original:n { {}#1 } }
          { bonanza_bar_original:n { #1 } }
          }
          AtBeginDocument
          {
          cs_set_eq:NN bonanza_bar_original:n bar
          cs_set_eq:NN bar bonanza_bar_new:n
          }
          ExplSyntaxOff

          begin{document}

          [
          bar{mathscr{a}}+
          bar{mathscr{b}}+
          bar{mathscr{d}}+
          bar{mathscr{g}}+
          bar{mathscr{u}}+
          bar{mathscr{w}}+
          bar{mscrw}
          ]

          end{document}


          enter image description here






          share|improve this answer

































            4














            with overline{mscrw} instead of bar



            enter image description here






            share|improve this answer
























            • Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

              – bonanza
              Jan 30 at 10:05






            • 4





              @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

              – Ulrike Fischer
              Jan 30 at 10:27











            • @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

              – bonanza
              Jan 30 at 10:31






            • 1





              @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

              – Ulrike Fischer
              Jan 30 at 10:36



















            1














            Using widebar from the macro (slightly amended) at this page Can I get a widebar without using the mathabx package?



            enter image description here



            documentclass{article}
            usepackage{amsmath,unicode-math}
            unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
            setmathfont{texgyrepagella-math.otf}
            %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

            makeatletter
            newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
            newcommand*widebar[1]{%
            begingroup
            defmathaccent##1##2{%
            rel@kern{0.8}%
            overline{rel@kern{-0.8}macc@nucleusrel@kern{-0.1}}%
            rel@kern{-0.3}%
            }%
            macc@depth@ne
            letmath@bgroup@empty letmath@egroupmacc@set@skewchar
            mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
            macc@set@skewcharrelax
            letmathaccentVmacc@nested@a
            macc@nested@arelax111{#1}%
            endgroup
            }
            makeatother
            begin{document}
            $widebar{mscrw}$
            end{document}





            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%2f472528%2fbar-and-overbar-not-centered-with-unicode-math-and-tex-gyre-font%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              It seems like a font bug.



              If you use bar{{}mscrw} the output is as expected.



              documentclass{article}

              usepackage{amsmath,unicode-math}

              unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

              setmathfont{texgyrepagella-math.otf}

              begin{document}

              begin{gather}
              bar{mathscr{a}} overbar{mathscr{a}} wideoverbar{mathscr{a}} \
              bar{mathscr{b}} overbar{mathscr{b}} wideoverbar{mathscr{b}} \
              bar{mathscr{d}} overbar{mathscr{d}} wideoverbar{mathscr{d}} \
              bar{mathscr{g}} overbar{mathscr{g}} wideoverbar{mathscr{g}} \
              bar{mathscr{u}} overbar{mathscr{u}} wideoverbar{mathscr{u}} \
              bar{mathscr{w}} overbar{mathscr{w}} wideoverbar{mathscr{w}} \
              bar{{}mscrw} overbar{{}mscrw} wideoverbar{{}mscrw}
              end{gather}

              end{document}


              enter image description here



              It's possible to fix bar (and other accents in the same way):



              documentclass{article}

              usepackage{amsmath,unicode-math}

              unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

              setmathfont{texgyrepagella-math.otf}

              ExplSyntaxOn
              cs_set_protected:Nn bonanza_bar_new:n
              {
              str_case:nnTF { #1 }
              {
              {mathscr{w}}{}
              {mscrw}{}
              }
              { bonanza_bar_original:n { {}#1 } }
              { bonanza_bar_original:n { #1 } }
              }
              AtBeginDocument
              {
              cs_set_eq:NN bonanza_bar_original:n bar
              cs_set_eq:NN bar bonanza_bar_new:n
              }
              ExplSyntaxOff

              begin{document}

              [
              bar{mathscr{a}}+
              bar{mathscr{b}}+
              bar{mathscr{d}}+
              bar{mathscr{g}}+
              bar{mathscr{u}}+
              bar{mathscr{w}}+
              bar{mscrw}
              ]

              end{document}


              enter image description here






              share|improve this answer






























                1














                It seems like a font bug.



                If you use bar{{}mscrw} the output is as expected.



                documentclass{article}

                usepackage{amsmath,unicode-math}

                unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                setmathfont{texgyrepagella-math.otf}

                begin{document}

                begin{gather}
                bar{mathscr{a}} overbar{mathscr{a}} wideoverbar{mathscr{a}} \
                bar{mathscr{b}} overbar{mathscr{b}} wideoverbar{mathscr{b}} \
                bar{mathscr{d}} overbar{mathscr{d}} wideoverbar{mathscr{d}} \
                bar{mathscr{g}} overbar{mathscr{g}} wideoverbar{mathscr{g}} \
                bar{mathscr{u}} overbar{mathscr{u}} wideoverbar{mathscr{u}} \
                bar{mathscr{w}} overbar{mathscr{w}} wideoverbar{mathscr{w}} \
                bar{{}mscrw} overbar{{}mscrw} wideoverbar{{}mscrw}
                end{gather}

                end{document}


                enter image description here



                It's possible to fix bar (and other accents in the same way):



                documentclass{article}

                usepackage{amsmath,unicode-math}

                unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                setmathfont{texgyrepagella-math.otf}

                ExplSyntaxOn
                cs_set_protected:Nn bonanza_bar_new:n
                {
                str_case:nnTF { #1 }
                {
                {mathscr{w}}{}
                {mscrw}{}
                }
                { bonanza_bar_original:n { {}#1 } }
                { bonanza_bar_original:n { #1 } }
                }
                AtBeginDocument
                {
                cs_set_eq:NN bonanza_bar_original:n bar
                cs_set_eq:NN bar bonanza_bar_new:n
                }
                ExplSyntaxOff

                begin{document}

                [
                bar{mathscr{a}}+
                bar{mathscr{b}}+
                bar{mathscr{d}}+
                bar{mathscr{g}}+
                bar{mathscr{u}}+
                bar{mathscr{w}}+
                bar{mscrw}
                ]

                end{document}


                enter image description here






                share|improve this answer




























                  1












                  1








                  1







                  It seems like a font bug.



                  If you use bar{{}mscrw} the output is as expected.



                  documentclass{article}

                  usepackage{amsmath,unicode-math}

                  unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                  setmathfont{texgyrepagella-math.otf}

                  begin{document}

                  begin{gather}
                  bar{mathscr{a}} overbar{mathscr{a}} wideoverbar{mathscr{a}} \
                  bar{mathscr{b}} overbar{mathscr{b}} wideoverbar{mathscr{b}} \
                  bar{mathscr{d}} overbar{mathscr{d}} wideoverbar{mathscr{d}} \
                  bar{mathscr{g}} overbar{mathscr{g}} wideoverbar{mathscr{g}} \
                  bar{mathscr{u}} overbar{mathscr{u}} wideoverbar{mathscr{u}} \
                  bar{mathscr{w}} overbar{mathscr{w}} wideoverbar{mathscr{w}} \
                  bar{{}mscrw} overbar{{}mscrw} wideoverbar{{}mscrw}
                  end{gather}

                  end{document}


                  enter image description here



                  It's possible to fix bar (and other accents in the same way):



                  documentclass{article}

                  usepackage{amsmath,unicode-math}

                  unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                  setmathfont{texgyrepagella-math.otf}

                  ExplSyntaxOn
                  cs_set_protected:Nn bonanza_bar_new:n
                  {
                  str_case:nnTF { #1 }
                  {
                  {mathscr{w}}{}
                  {mscrw}{}
                  }
                  { bonanza_bar_original:n { {}#1 } }
                  { bonanza_bar_original:n { #1 } }
                  }
                  AtBeginDocument
                  {
                  cs_set_eq:NN bonanza_bar_original:n bar
                  cs_set_eq:NN bar bonanza_bar_new:n
                  }
                  ExplSyntaxOff

                  begin{document}

                  [
                  bar{mathscr{a}}+
                  bar{mathscr{b}}+
                  bar{mathscr{d}}+
                  bar{mathscr{g}}+
                  bar{mathscr{u}}+
                  bar{mathscr{w}}+
                  bar{mscrw}
                  ]

                  end{document}


                  enter image description here






                  share|improve this answer















                  It seems like a font bug.



                  If you use bar{{}mscrw} the output is as expected.



                  documentclass{article}

                  usepackage{amsmath,unicode-math}

                  unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                  setmathfont{texgyrepagella-math.otf}

                  begin{document}

                  begin{gather}
                  bar{mathscr{a}} overbar{mathscr{a}} wideoverbar{mathscr{a}} \
                  bar{mathscr{b}} overbar{mathscr{b}} wideoverbar{mathscr{b}} \
                  bar{mathscr{d}} overbar{mathscr{d}} wideoverbar{mathscr{d}} \
                  bar{mathscr{g}} overbar{mathscr{g}} wideoverbar{mathscr{g}} \
                  bar{mathscr{u}} overbar{mathscr{u}} wideoverbar{mathscr{u}} \
                  bar{mathscr{w}} overbar{mathscr{w}} wideoverbar{mathscr{w}} \
                  bar{{}mscrw} overbar{{}mscrw} wideoverbar{{}mscrw}
                  end{gather}

                  end{document}


                  enter image description here



                  It's possible to fix bar (and other accents in the same way):



                  documentclass{article}

                  usepackage{amsmath,unicode-math}

                  unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}

                  setmathfont{texgyrepagella-math.otf}

                  ExplSyntaxOn
                  cs_set_protected:Nn bonanza_bar_new:n
                  {
                  str_case:nnTF { #1 }
                  {
                  {mathscr{w}}{}
                  {mscrw}{}
                  }
                  { bonanza_bar_original:n { {}#1 } }
                  { bonanza_bar_original:n { #1 } }
                  }
                  AtBeginDocument
                  {
                  cs_set_eq:NN bonanza_bar_original:n bar
                  cs_set_eq:NN bar bonanza_bar_new:n
                  }
                  ExplSyntaxOff

                  begin{document}

                  [
                  bar{mathscr{a}}+
                  bar{mathscr{b}}+
                  bar{mathscr{d}}+
                  bar{mathscr{g}}+
                  bar{mathscr{u}}+
                  bar{mathscr{w}}+
                  bar{mscrw}
                  ]

                  end{document}


                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 31 at 17:01

























                  answered Jan 31 at 16:48









                  egregegreg

                  726k8819193227




                  726k8819193227























                      4














                      with overline{mscrw} instead of bar



                      enter image description here






                      share|improve this answer
























                      • Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                        – bonanza
                        Jan 30 at 10:05






                      • 4





                        @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                        – Ulrike Fischer
                        Jan 30 at 10:27











                      • @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                        – bonanza
                        Jan 30 at 10:31






                      • 1





                        @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                        – Ulrike Fischer
                        Jan 30 at 10:36
















                      4














                      with overline{mscrw} instead of bar



                      enter image description here






                      share|improve this answer
























                      • Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                        – bonanza
                        Jan 30 at 10:05






                      • 4





                        @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                        – Ulrike Fischer
                        Jan 30 at 10:27











                      • @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                        – bonanza
                        Jan 30 at 10:31






                      • 1





                        @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                        – Ulrike Fischer
                        Jan 30 at 10:36














                      4












                      4








                      4







                      with overline{mscrw} instead of bar



                      enter image description here






                      share|improve this answer













                      with overline{mscrw} instead of bar



                      enter image description here







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 30 at 9:56









                      HerbertHerbert

                      275k25419732




                      275k25419732













                      • Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                        – bonanza
                        Jan 30 at 10:05






                      • 4





                        @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                        – Ulrike Fischer
                        Jan 30 at 10:27











                      • @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                        – bonanza
                        Jan 30 at 10:31






                      • 1





                        @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                        – Ulrike Fischer
                        Jan 30 at 10:36



















                      • Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                        – bonanza
                        Jan 30 at 10:05






                      • 4





                        @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                        – Ulrike Fischer
                        Jan 30 at 10:27











                      • @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                        – bonanza
                        Jan 30 at 10:31






                      • 1





                        @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                        – Ulrike Fischer
                        Jan 30 at 10:36

















                      Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                      – bonanza
                      Jan 30 at 10:05





                      Thanks! I also thought about this, but tex.stackexchange.com/questions/98028/… seems to discourage overline for some reasons. I would have naively expected that a font used via unicode-math with it's own accents should be fine. Is that a bug in unicode math and/or the font ?

                      – bonanza
                      Jan 30 at 10:05




                      4




                      4





                      @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                      – Ulrike Fischer
                      Jan 30 at 10:27





                      @bonanza I would say it is a bug in the font. Other accents are misplaced too, it fails also with xelatex, but other fonts work. With lualatex you could patch the top_accent value, but it would be better to report this to the font maintainers.

                      – Ulrike Fischer
                      Jan 30 at 10:27













                      @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                      – bonanza
                      Jan 30 at 10:31





                      @UlrikeFischer, thanks, I could not find any reliable source of how to get in contact with the font maintainers. Do you know how to reach them?

                      – bonanza
                      Jan 30 at 10:31




                      1




                      1





                      @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                      – Ulrike Fischer
                      Jan 30 at 10:36





                      @bonanza There is a slightly hidden mail address in the contact info on gust.org.pl/projects/e-foundry/tex-gyre

                      – Ulrike Fischer
                      Jan 30 at 10:36











                      1














                      Using widebar from the macro (slightly amended) at this page Can I get a widebar without using the mathabx package?



                      enter image description here



                      documentclass{article}
                      usepackage{amsmath,unicode-math}
                      unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
                      setmathfont{texgyrepagella-math.otf}
                      %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

                      makeatletter
                      newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                      newcommand*widebar[1]{%
                      begingroup
                      defmathaccent##1##2{%
                      rel@kern{0.8}%
                      overline{rel@kern{-0.8}macc@nucleusrel@kern{-0.1}}%
                      rel@kern{-0.3}%
                      }%
                      macc@depth@ne
                      letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                      mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                      macc@set@skewcharrelax
                      letmathaccentVmacc@nested@a
                      macc@nested@arelax111{#1}%
                      endgroup
                      }
                      makeatother
                      begin{document}
                      $widebar{mscrw}$
                      end{document}





                      share|improve this answer






























                        1














                        Using widebar from the macro (slightly amended) at this page Can I get a widebar without using the mathabx package?



                        enter image description here



                        documentclass{article}
                        usepackage{amsmath,unicode-math}
                        unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
                        setmathfont{texgyrepagella-math.otf}
                        %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

                        makeatletter
                        newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                        newcommand*widebar[1]{%
                        begingroup
                        defmathaccent##1##2{%
                        rel@kern{0.8}%
                        overline{rel@kern{-0.8}macc@nucleusrel@kern{-0.1}}%
                        rel@kern{-0.3}%
                        }%
                        macc@depth@ne
                        letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                        mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                        macc@set@skewcharrelax
                        letmathaccentVmacc@nested@a
                        macc@nested@arelax111{#1}%
                        endgroup
                        }
                        makeatother
                        begin{document}
                        $widebar{mscrw}$
                        end{document}





                        share|improve this answer




























                          1












                          1








                          1







                          Using widebar from the macro (slightly amended) at this page Can I get a widebar without using the mathabx package?



                          enter image description here



                          documentclass{article}
                          usepackage{amsmath,unicode-math}
                          unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
                          setmathfont{texgyrepagella-math.otf}
                          %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

                          makeatletter
                          newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                          newcommand*widebar[1]{%
                          begingroup
                          defmathaccent##1##2{%
                          rel@kern{0.8}%
                          overline{rel@kern{-0.8}macc@nucleusrel@kern{-0.1}}%
                          rel@kern{-0.3}%
                          }%
                          macc@depth@ne
                          letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                          mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                          macc@set@skewcharrelax
                          letmathaccentVmacc@nested@a
                          macc@nested@arelax111{#1}%
                          endgroup
                          }
                          makeatother
                          begin{document}
                          $widebar{mscrw}$
                          end{document}





                          share|improve this answer















                          Using widebar from the macro (slightly amended) at this page Can I get a widebar without using the mathabx package?



                          enter image description here



                          documentclass{article}
                          usepackage{amsmath,unicode-math}
                          unimathsetup{math-style=ISO,bold-style=ISO,sans-style=italic}
                          setmathfont{texgyrepagella-math.otf}
                          %setmathfont[range={scr,bfscr}]{texgyredejavu-math.otf}

                          makeatletter
                          newcommand*rel@kern[1]{kern#1dimexprmacc@kerna}
                          newcommand*widebar[1]{%
                          begingroup
                          defmathaccent##1##2{%
                          rel@kern{0.8}%
                          overline{rel@kern{-0.8}macc@nucleusrel@kern{-0.1}}%
                          rel@kern{-0.3}%
                          }%
                          macc@depth@ne
                          letmath@bgroup@empty letmath@egroupmacc@set@skewchar
                          mathsurroundz@ frozen@everymath{mathgroupmacc@grouprelax}%
                          macc@set@skewcharrelax
                          letmathaccentVmacc@nested@a
                          macc@nested@arelax111{#1}%
                          endgroup
                          }
                          makeatother
                          begin{document}
                          $widebar{mscrw}$
                          end{document}






                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jan 31 at 16:17

























                          answered Jan 30 at 10:04









                          SebastianoSebastiano

                          10.8k42163




                          10.8k42163






























                              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%2f472528%2fbar-and-overbar-not-centered-with-unicode-math-and-tex-gyre-font%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

                              Human spaceflight

                              Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                              張江高科駅