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
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
add a comment |
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
add a comment |
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
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
fonts luatex lua lfs
asked 16 mins ago
Gurebu BokofuGurebu Bokofu
3151316
3151316
add a comment |
add a comment |
0
active
oldest
votes
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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