LuaLaTeX: How to correctly resolve absolute path with directlua on Windows The Next CEO of...
From jafe to El-Guest
Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?
How many extra stops do monopods offer for tele photographs?
Why is information "lost" when it got into a black hole?
Spaces in which all closed sets are regular closed
Would a completely good Muggle be able to use a wand?
Help/tips for a first time writer?
AB diagonalizable then BA also diagonalizable
Prepend last line of stdin to entire stdin
Can this note be analyzed as a non-chord tone?
Traduction de « Life is a roller coaster »
Aggressive Under-Indexing and no data for missing index
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?
Help! I cannot understand this game’s notations!
Getting Stale Gas Out of a Gas Tank w/out Dropping the Tank
Is it ever safe to open a suspicious HTML file (e.g. email attachment)?
What difference does it make using sed with/without whitespaces?
If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?
What was Carter Burke's job for "the company" in Aliens?
Can I calculate next year's exemptions based on this year's refund/amount owed?
When "be it" is at the beginning of a sentence, what kind of structure do you call it?
Can I board the first leg of the flight without having final country's visa?
How did Beeri the Hittite come up with naming his daughter Yehudit?
Easy to read palindrome checker
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):
edefcurrfileabsdir{directlua{tex.sprint(lfs.currentdir())}/}
! Undefined control sequence.
l.1 C:Users
iDocumentsTeXLuaLaTeX_Development
l.6 ...sdir{directlua{tex.sprint(lfs.currentdir())}
/}
It was recommended to use catcodes as shown below:
edefcurrfileabsdir{directlua{tex.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):
edefcurrfileabsdir{directlua{tex.sprint(lfs.currentdir())}/}
! Undefined control sequence.
l.1 C:Users
iDocumentsTeXLuaLaTeX_Development
l.6 ...sdir{directlua{tex.sprint(lfs.currentdir())}
/}
It was recommended to use catcodes as shown below:
edefcurrfileabsdir{directlua{tex.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):
edefcurrfileabsdir{directlua{tex.sprint(lfs.currentdir())}/}
! Undefined control sequence.
l.1 C:Users
iDocumentsTeXLuaLaTeX_Development
l.6 ...sdir{directlua{tex.sprint(lfs.currentdir())}
/}
It was recommended to use catcodes as shown below:
edefcurrfileabsdir{directlua{tex.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):
edefcurrfileabsdir{directlua{tex.sprint(lfs.currentdir())}/}
! Undefined control sequence.
l.1 C:Users
iDocumentsTeXLuaLaTeX_Development
l.6 ...sdir{directlua{tex.sprint(lfs.currentdir())}
/}
It was recommended to use catcodes as shown below:
edefcurrfileabsdir{directlua{tex.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 2 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');
});
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');
});
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');
});
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');
});
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');
});
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
