xfrac resets oldstylenums to computer modern












2















Using xelatex, fontspec and unicode-math, old style nums work just fine. But when using xfrac, the oldstylenums seems to be reverted to some basic version of the command, using a pixely computer modern font.
How can I avoid this?



comparison of output (with and without xfrac)



MWE:



documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
usepackage{fontspec}
setmainfont{TeX Gyre Pagella}
usepackage{mathtools,amssymb,amsthm}
usepackage{xfrac}
usepackage{unicode-math}
setmathfont{TeX Gyre Pagella Math}


begin{document}

with xfrac oldstylenums{10827}

end{document}


xelatex outputs the following (only when using xfrac), and I understand this is the problem, but why does it happen and how do I keep xfrac from doing this?



LaTeX Font Warning: Font shape `TS1/TeXGyrePagella(0)/m/n' undefined
(Font) using `TS1/cmr/m/n' instead on input line 12.


(And, btw: Is this an okay way to setupfontspec and unicode-math using xelatex? I am just switching from pdflatex.)










share|improve this question



























    2















    Using xelatex, fontspec and unicode-math, old style nums work just fine. But when using xfrac, the oldstylenums seems to be reverted to some basic version of the command, using a pixely computer modern font.
    How can I avoid this?



    comparison of output (with and without xfrac)



    MWE:



    documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
    usepackage{fontspec}
    setmainfont{TeX Gyre Pagella}
    usepackage{mathtools,amssymb,amsthm}
    usepackage{xfrac}
    usepackage{unicode-math}
    setmathfont{TeX Gyre Pagella Math}


    begin{document}

    with xfrac oldstylenums{10827}

    end{document}


    xelatex outputs the following (only when using xfrac), and I understand this is the problem, but why does it happen and how do I keep xfrac from doing this?



    LaTeX Font Warning: Font shape `TS1/TeXGyrePagella(0)/m/n' undefined
    (Font) using `TS1/cmr/m/n' instead on input line 12.


    (And, btw: Is this an okay way to setupfontspec and unicode-math using xelatex? I am just switching from pdflatex.)










    share|improve this question

























      2












      2








      2








      Using xelatex, fontspec and unicode-math, old style nums work just fine. But when using xfrac, the oldstylenums seems to be reverted to some basic version of the command, using a pixely computer modern font.
      How can I avoid this?



      comparison of output (with and without xfrac)



      MWE:



      documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
      usepackage{fontspec}
      setmainfont{TeX Gyre Pagella}
      usepackage{mathtools,amssymb,amsthm}
      usepackage{xfrac}
      usepackage{unicode-math}
      setmathfont{TeX Gyre Pagella Math}


      begin{document}

      with xfrac oldstylenums{10827}

      end{document}


      xelatex outputs the following (only when using xfrac), and I understand this is the problem, but why does it happen and how do I keep xfrac from doing this?



      LaTeX Font Warning: Font shape `TS1/TeXGyrePagella(0)/m/n' undefined
      (Font) using `TS1/cmr/m/n' instead on input line 12.


      (And, btw: Is this an okay way to setupfontspec and unicode-math using xelatex? I am just switching from pdflatex.)










      share|improve this question














      Using xelatex, fontspec and unicode-math, old style nums work just fine. But when using xfrac, the oldstylenums seems to be reverted to some basic version of the command, using a pixely computer modern font.
      How can I avoid this?



      comparison of output (with and without xfrac)



      MWE:



      documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
      usepackage{fontspec}
      setmainfont{TeX Gyre Pagella}
      usepackage{mathtools,amssymb,amsthm}
      usepackage{xfrac}
      usepackage{unicode-math}
      setmathfont{TeX Gyre Pagella Math}


      begin{document}

      with xfrac oldstylenums{10827}

      end{document}


      xelatex outputs the following (only when using xfrac), and I understand this is the problem, but why does it happen and how do I keep xfrac from doing this?



      LaTeX Font Warning: Font shape `TS1/TeXGyrePagella(0)/m/n' undefined
      (Font) using `TS1/cmr/m/n' instead on input line 12.


      (And, btw: Is this an okay way to setupfontspec and unicode-math using xelatex? I am just switching from pdflatex.)







      xetex fontspec xfrac






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 days ago









      MarianMarian

      1707




      1707






















          2 Answers
          2






          active

          oldest

          votes


















          6














          xfrac loads the textcomp package, and textcomp redefines oldstylenums. Load xfrac before fontspec, than the definition of fontspec will win:



          documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
          usepackage{xfrac}
          usepackage{fontspec}
          setmainfont{TeX Gyre Pagella}

          begin{document}

          with xfrac oldstylenums{10827}

          end{document}


          enter image description here






          share|improve this answer
























          • Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

            – Marian
            yesterday











          • I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

            – Ulrike Fischer
            yesterday



















          4














          I can’t explain the innards of xfrac, but if you want lowercase numbers and vulgar fractions with Palatino, you don’t need xfrac.



          Instead, get FPL Neu, which, unlike TeX Gyre Pagella, defines the dnom and numr features needed for arbitrary fractions. Then use the vfrac command provided by xltxtra:



          documentclass{article}
          usepackage{xltxtra}% loads fontspec, realscripts, and metalogo
          setmainfont{FPL Neu}[Numbers=OldStyle]
          begin{document}
          10827

          vfrac{123}{456}
          end{document}


          output






          share|improve this answer
























          • I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

            – Marian
            yesterday











          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%2f471147%2fxfrac-resets-oldstylenums-to-computer-modern%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









          6














          xfrac loads the textcomp package, and textcomp redefines oldstylenums. Load xfrac before fontspec, than the definition of fontspec will win:



          documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
          usepackage{xfrac}
          usepackage{fontspec}
          setmainfont{TeX Gyre Pagella}

          begin{document}

          with xfrac oldstylenums{10827}

          end{document}


          enter image description here






          share|improve this answer
























          • Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

            – Marian
            yesterday











          • I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

            – Ulrike Fischer
            yesterday
















          6














          xfrac loads the textcomp package, and textcomp redefines oldstylenums. Load xfrac before fontspec, than the definition of fontspec will win:



          documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
          usepackage{xfrac}
          usepackage{fontspec}
          setmainfont{TeX Gyre Pagella}

          begin{document}

          with xfrac oldstylenums{10827}

          end{document}


          enter image description here






          share|improve this answer
























          • Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

            – Marian
            yesterday











          • I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

            – Ulrike Fischer
            yesterday














          6












          6








          6







          xfrac loads the textcomp package, and textcomp redefines oldstylenums. Load xfrac before fontspec, than the definition of fontspec will win:



          documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
          usepackage{xfrac}
          usepackage{fontspec}
          setmainfont{TeX Gyre Pagella}

          begin{document}

          with xfrac oldstylenums{10827}

          end{document}


          enter image description here






          share|improve this answer













          xfrac loads the textcomp package, and textcomp redefines oldstylenums. Load xfrac before fontspec, than the definition of fontspec will win:



          documentclass[11pt,paper=a4,parskip=half,ngerman]{scrartcl}
          usepackage{xfrac}
          usepackage{fontspec}
          setmainfont{TeX Gyre Pagella}

          begin{document}

          with xfrac oldstylenums{10827}

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          Ulrike FischerUlrike Fischer

          189k8295678




          189k8295678













          • Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

            – Marian
            yesterday











          • I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

            – Ulrike Fischer
            yesterday



















          • Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

            – Marian
            yesterday











          • I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

            – Ulrike Fischer
            yesterday

















          Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

          – Marian
          yesterday





          Thank you! Is that kind of a bug that should be reported? (And if so, for which packet?)

          – Marian
          yesterday













          I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

          – Ulrike Fischer
          yesterday





          I'm discussing this already on the latex team list, imho we should avoid that textcomp redefines oldstylenums in such cases.

          – Ulrike Fischer
          yesterday











          4














          I can’t explain the innards of xfrac, but if you want lowercase numbers and vulgar fractions with Palatino, you don’t need xfrac.



          Instead, get FPL Neu, which, unlike TeX Gyre Pagella, defines the dnom and numr features needed for arbitrary fractions. Then use the vfrac command provided by xltxtra:



          documentclass{article}
          usepackage{xltxtra}% loads fontspec, realscripts, and metalogo
          setmainfont{FPL Neu}[Numbers=OldStyle]
          begin{document}
          10827

          vfrac{123}{456}
          end{document}


          output






          share|improve this answer
























          • I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

            – Marian
            yesterday
















          4














          I can’t explain the innards of xfrac, but if you want lowercase numbers and vulgar fractions with Palatino, you don’t need xfrac.



          Instead, get FPL Neu, which, unlike TeX Gyre Pagella, defines the dnom and numr features needed for arbitrary fractions. Then use the vfrac command provided by xltxtra:



          documentclass{article}
          usepackage{xltxtra}% loads fontspec, realscripts, and metalogo
          setmainfont{FPL Neu}[Numbers=OldStyle]
          begin{document}
          10827

          vfrac{123}{456}
          end{document}


          output






          share|improve this answer
























          • I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

            – Marian
            yesterday














          4












          4








          4







          I can’t explain the innards of xfrac, but if you want lowercase numbers and vulgar fractions with Palatino, you don’t need xfrac.



          Instead, get FPL Neu, which, unlike TeX Gyre Pagella, defines the dnom and numr features needed for arbitrary fractions. Then use the vfrac command provided by xltxtra:



          documentclass{article}
          usepackage{xltxtra}% loads fontspec, realscripts, and metalogo
          setmainfont{FPL Neu}[Numbers=OldStyle]
          begin{document}
          10827

          vfrac{123}{456}
          end{document}


          output






          share|improve this answer













          I can’t explain the innards of xfrac, but if you want lowercase numbers and vulgar fractions with Palatino, you don’t need xfrac.



          Instead, get FPL Neu, which, unlike TeX Gyre Pagella, defines the dnom and numr features needed for arbitrary fractions. Then use the vfrac command provided by xltxtra:



          documentclass{article}
          usepackage{xltxtra}% loads fontspec, realscripts, and metalogo
          setmainfont{FPL Neu}[Numbers=OldStyle]
          begin{document}
          10827

          vfrac{123}{456}
          end{document}


          output







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          ThérèseThérèse

          9,33732241




          9,33732241













          • I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

            – Marian
            yesterday



















          • I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

            – Marian
            yesterday

















          I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

          – Marian
          yesterday





          I've chosen Ulrike's answer as the "accepted" one as it most closely answers the exact question, but yours also helps. Thank you!

          – Marian
          yesterday


















          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%2f471147%2fxfrac-resets-oldstylenums-to-computer-modern%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

          "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

          Alcedinidae

          Origin of the phrase “under your belt”?