LuaLaTeX: How to correctly resolve absolute path with directlua on Windows The Next CEO of Stack OverflowHow to understand which control sequence in undefined in “Undefined control sequence.” message?lualatex print, directlua env, and newlineLuaLaTeX for dummies: basic directlua useLuaLaTeX for dummies: how to add LaTeX macros into directlua?How to insert output of Lua script verbatim at location with LuaLaTeX?umlaute not rendered correctly with lualatexRelative Path to Font in Luatexproblem with string.format, directlua and tex.sprintHow to resolve a LuaLaTeX font error regarding missing or bad metric data?LuaLaTeX set a path in luaOperator font with lualatex not changing correctly

Is there a reasonable and studied concept of reduction between regular languages?

Inexact numbers as keys in Association?

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

When "be it" is at the beginning of a sentence, what kind of structure do you call it?

Purpose of level-shifter with same in and out voltages

Expectation in a stochastic differential equation

Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?

How to find image of a complex function with given constraints?

IC has pull-down resistors on SMBus lines?

Does the Idaho Potato Commission associate potato skins with healthy eating?

Is there such a thing as a proper verb, like a proper noun?

Calculate the Mean mean of two numbers

Can someone explain this formula for calculating Manhattan distance?

Graph of the history of databases

What can the phrase “is embedded in a whale of a bill” mean?

Players Circumventing the limitations of Wish

How to Implement Deterministic Encryption Safely in .NET

Can this note be analyzed as a non-chord tone?

My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?

Why the last AS PATH item always is `I` or `?`?

Is there a way to save my career from absolute disaster?

Easy to read palindrome checker

What day is it again?

Prepend last line of stdin to entire stdin



LuaLaTeX: How to correctly resolve absolute path with directlua on Windows



The Next CEO of Stack OverflowHow to understand which control sequence in undefined in “Undefined control sequence.” message?lualatex print, directlua env, and newlineLuaLaTeX for dummies: basic directlua useLuaLaTeX for dummies: how to add LaTeX macros into directlua?How to insert output of Lua script verbatim at location with LuaLaTeX?umlaute not rendered correctly with lualatexRelative Path to Font in Luatexproblem with string.format, directlua and tex.sprintHow to resolve a LuaLaTeX font error regarding missing or bad metric data?LuaLaTeX set a path in luaOperator font with lualatex not changing correctly










0















I need to resolve absolute path to fonts:



setmainjfont[
Path = currfileabsdir,
UprightFont = fonts/HGS_Mincho/HGRMB.ttc,
BoldFont = fonts/HGS_Mincho/HGRME.ttc
]HGS Mincho


The solution usepackage[abspath]currfile requires -recorder option, but I don't use console, and setup -recorder option is potentially unnecessary routine.



Other solution based on lfs library, but if we just use it as shown below, error will occur (at least, in Windows):



edefcurrfileabsdirdirectluatex.sprint(lfs.currentdir())/


! Undefined control sequence.
l.1 C:Users
iDocumentsTeXLuaLaTeX_Development
l.6 ...sdirdirectluatex.sprint(lfs.currentdir())
/


It was recommended to use catcodes as shown below:



edefcurrfileabsdirdirectluatex.sprint(-2, lfs.currentdir())/


What really will be is backslashes will be removed from absolute path, so



C:Users/i/Documents/TeX/LuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


becomes to



C:UsersmeDocumentsTeXLuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


How I get correct absolute path to font?










share|improve this question


























    0















    I need to resolve absolute path to fonts:



    setmainjfont[
    Path = currfileabsdir,
    UprightFont = fonts/HGS_Mincho/HGRMB.ttc,
    BoldFont = fonts/HGS_Mincho/HGRME.ttc
    ]HGS Mincho


    The solution usepackage[abspath]currfile requires -recorder option, but I don't use console, and setup -recorder option is potentially unnecessary routine.



    Other solution based on lfs library, but if we just use it as shown below, error will occur (at least, in Windows):



    edefcurrfileabsdirdirectluatex.sprint(lfs.currentdir())/


    ! Undefined control sequence.
    l.1 C:Users
    iDocumentsTeXLuaLaTeX_Development
    l.6 ...sdirdirectluatex.sprint(lfs.currentdir())
    /


    It was recommended to use catcodes as shown below:



    edefcurrfileabsdirdirectluatex.sprint(-2, lfs.currentdir())/


    What really will be is backslashes will be removed from absolute path, so



    C:Users/i/Documents/TeX/LuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


    becomes to



    C:UsersmeDocumentsTeXLuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


    How I get correct absolute path to font?










    share|improve this question
























      0












      0








      0








      I need to resolve absolute path to fonts:



      setmainjfont[
      Path = currfileabsdir,
      UprightFont = fonts/HGS_Mincho/HGRMB.ttc,
      BoldFont = fonts/HGS_Mincho/HGRME.ttc
      ]HGS Mincho


      The solution usepackage[abspath]currfile requires -recorder option, but I don't use console, and setup -recorder option is potentially unnecessary routine.



      Other solution based on lfs library, but if we just use it as shown below, error will occur (at least, in Windows):



      edefcurrfileabsdirdirectluatex.sprint(lfs.currentdir())/


      ! Undefined control sequence.
      l.1 C:Users
      iDocumentsTeXLuaLaTeX_Development
      l.6 ...sdirdirectluatex.sprint(lfs.currentdir())
      /


      It was recommended to use catcodes as shown below:



      edefcurrfileabsdirdirectluatex.sprint(-2, lfs.currentdir())/


      What really will be is backslashes will be removed from absolute path, so



      C:Users/i/Documents/TeX/LuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


      becomes to



      C:UsersmeDocumentsTeXLuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


      How I get correct absolute path to font?










      share|improve this question














      I need to resolve absolute path to fonts:



      setmainjfont[
      Path = currfileabsdir,
      UprightFont = fonts/HGS_Mincho/HGRMB.ttc,
      BoldFont = fonts/HGS_Mincho/HGRME.ttc
      ]HGS Mincho


      The solution usepackage[abspath]currfile requires -recorder option, but I don't use console, and setup -recorder option is potentially unnecessary routine.



      Other solution based on lfs library, but if we just use it as shown below, error will occur (at least, in Windows):



      edefcurrfileabsdirdirectluatex.sprint(lfs.currentdir())/


      ! Undefined control sequence.
      l.1 C:Users
      iDocumentsTeXLuaLaTeX_Development
      l.6 ...sdirdirectluatex.sprint(lfs.currentdir())
      /


      It was recommended to use catcodes as shown below:



      edefcurrfileabsdirdirectluatex.sprint(-2, lfs.currentdir())/


      What really will be is backslashes will be removed from absolute path, so



      C:Users/i/Documents/TeX/LuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


      becomes to



      C:UsersmeDocumentsTeXLuaLaTeX_Development/fonts/HGS_Mincho/HGRMB.ttc


      How I get correct absolute path to font?







      fonts luatex lua lfs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 16 mins ago









      Gurebu BokofuGurebu Bokofu

      3151316




      3151316




















          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%2f482519%2flualatex-how-to-correctly-resolve-absolute-path-with-directlua-on-windows%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%2f482519%2flualatex-how-to-correctly-resolve-absolute-path-with-directlua-on-windows%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

          How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

          Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

          inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX