Redefining math symbols in `mathspec`












0















I'm using the Skolar font for a work and I'm experimenting with mathspec just to match the fonts in regular and math text.



There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image. Interestingly, there's no italic correction.



I tried this



makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
makeatother


but prints nothing. I can write symbol{"0192} and get ƒ in the pdf, so, I also tried



makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
makeatother


but does not print anything; and



makeatlettter
DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
makeatother


crashes. In this site is pointed that the command DeclareMathSymbol must be invoked like this



DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}


and I think the problem is in the way I'm writing the <slot> with a wrong format. So, my question is how I can solve this whithout defining f as symbol{"0192} cuz I will need to replace every single f (in a math environment) in my code by f.



A MWE would be like this.



documentclass{article}

usepackage{mathspec}

defaultfontfeatures{Ligatures=TeX}

setmainfont{Times New Roman}

setmathfont(Digits,Latin,Greek){Times New Roman}

setmathrm{Times New Roman}

begin{document}
ftextit{f}symbol{"0192} $f(x)=f(x).$
end{document}


I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman for Ubuntu or anything else.










share|improve this question



























    0















    I'm using the Skolar font for a work and I'm experimenting with mathspec just to match the fonts in regular and math text.



    There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image. Interestingly, there's no italic correction.



    I tried this



    makeatlettter
    DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
    makeatother


    but prints nothing. I can write symbol{"0192} and get ƒ in the pdf, so, I also tried



    makeatlettter
    DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
    makeatother


    but does not print anything; and



    makeatlettter
    DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
    makeatother


    crashes. In this site is pointed that the command DeclareMathSymbol must be invoked like this



    DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}


    and I think the problem is in the way I'm writing the <slot> with a wrong format. So, my question is how I can solve this whithout defining f as symbol{"0192} cuz I will need to replace every single f (in a math environment) in my code by f.



    A MWE would be like this.



    documentclass{article}

    usepackage{mathspec}

    defaultfontfeatures{Ligatures=TeX}

    setmainfont{Times New Roman}

    setmathfont(Digits,Latin,Greek){Times New Roman}

    setmathrm{Times New Roman}

    begin{document}
    ftextit{f}symbol{"0192} $f(x)=f(x).$
    end{document}


    I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman for Ubuntu or anything else.










    share|improve this question

























      0












      0








      0








      I'm using the Skolar font for a work and I'm experimenting with mathspec just to match the fonts in regular and math text.



      There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image. Interestingly, there's no italic correction.



      I tried this



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
      makeatother


      but prints nothing. I can write symbol{"0192} and get ƒ in the pdf, so, I also tried



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
      makeatother


      but does not print anything; and



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
      makeatother


      crashes. In this site is pointed that the command DeclareMathSymbol must be invoked like this



      DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}


      and I think the problem is in the way I'm writing the <slot> with a wrong format. So, my question is how I can solve this whithout defining f as symbol{"0192} cuz I will need to replace every single f (in a math environment) in my code by f.



      A MWE would be like this.



      documentclass{article}

      usepackage{mathspec}

      defaultfontfeatures{Ligatures=TeX}

      setmainfont{Times New Roman}

      setmathfont(Digits,Latin,Greek){Times New Roman}

      setmathrm{Times New Roman}

      begin{document}
      ftextit{f}symbol{"0192} $f(x)=f(x).$
      end{document}


      I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman for Ubuntu or anything else.










      share|improve this question














      I'm using the Skolar font for a work and I'm experimenting with mathspec just to match the fonts in regular and math text.



      There's a latin character called "f with hook" (unicode 0192; ALT+131 on Windows) that I want instead of the italic f in math mode. The difference between the regular f, italic f and f with hook is shown in the next image. Interestingly, there's no italic correction.



      I tried this



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{`ƒ}
      makeatother


      but prints nothing. I can write symbol{"0192} and get ƒ in the pdf, so, I also tried



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{"0192}
      makeatother


      but does not print anything; and



      makeatlettter
      DeclareMathSymbol{f}{mathalpha}{eu@LatinLowercase@symfont}{symbol{"0192}}
      makeatother


      crashes. In this site is pointed that the command DeclareMathSymbol must be invoked like this



      DeclareMathSymbol {<symbol>} {<type>} {<sym-font>} {<slot>}


      and I think the problem is in the way I'm writing the <slot> with a wrong format. So, my question is how I can solve this whithout defining f as symbol{"0192} cuz I will need to replace every single f (in a math environment) in my code by f.



      A MWE would be like this.



      documentclass{article}

      usepackage{mathspec}

      defaultfontfeatures{Ligatures=TeX}

      setmainfont{Times New Roman}

      setmathfont(Digits,Latin,Greek){Times New Roman}

      setmathrm{Times New Roman}

      begin{document}
      ftextit{f}symbol{"0192} $f(x)=f(x).$
      end{document}


      I don't know if Times New Roman is installed on Linux distributions but you can change Times New Roman for Ubuntu or anything else.







      xetex mathspec






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 4 hours ago









      Diego D. R. RiveraDiego D. R. Rivera

      175




      175






















          0






          active

          oldest

          votes












          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%2f482655%2fredefining-math-symbols-in-mathspec%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f482655%2fredefining-math-symbols-in-mathspec%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

          Contact image not getting when fetch all contact list from iPhone by CNContact

          count number of partitions of a set with n elements into k subsets

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks