ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: lynx--- via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: lynx@polarcom.com
Subject: Re: [NTG-context] LuaMetaTeX doesn't find files when symlinked
Date: Fri, 28 Apr 2023 00:20:57 -0700	[thread overview]
Message-ID: <2d88e7f2c939db162e1d668a7b848321@polarcom.com> (raw)
In-Reply-To: <9338ba4d4d69bc3ce633ed9c0eebf116fa473a25.camel@telus.net>


[-- Attachment #1.1: Type: text/plain, Size: 3526 bytes --]

Max & Hans: 

I installed the stand-alone ConTeXt installation just today. It seems
like I have my $PATH set correctly now. 

I have been editing ConTeXt and running it within TeXstudio. I had set
up a "user command" to execute arara on LaTeX and ConTeXt files when I
did NOT have the "standalone" version installed. It still works
correctly. 

Today, I created a separate "user command" within TeXstudio, and it
points to "/usr/local/ConTeXt_Standalone/context-linux-64/bin/mtxrun" 
This command generates the same log output as the example at
https://gitlab.com/islandoftex/images/texlive/-/issues/30. 

If I understand this correctly, my OLD user command within TeXstudio is
still finding the TeXlive version of ConTeXt, and that TeXlive version
does have the symlinks mentioned by Max (and BTW, I did NOT create
those, they are part of the default TeXlive installation process!). This
is because my OLD "arara" command has the path to the March 13 version
of TeXlive 2023 version (installed from ISO image, with some updates
using tlmgr already installed). 

Lynx 

On 2023-04-27 21:00, Max Chernoff via ntg-context wrote:

> Hi Hans,
> 
> With the LuaMetaTeX-based ConTeXt wrapper, it's not generally possible
> to run ConTeXt from a symlinked binary in another directory. This shows
> up if someone makes symlinks in "/usr/bin" so that they can avoid adding
> anything to their $PATH.
> 
> If you make run a symlink to the LuaMetaTeX-based ConTeXt wrapper, it
> looks for texmfcnf.lua relative to the symlink location, not the symlink
> target. With the old LuaTeX/kpse-based wrapper, the script would look
> for texmfcnf.lua relative to the symlink target.
> 
> I know that my description above is terrible, so here's a demo:
> 
> $ bin=$(mtxrun --expand-var TEXMFOS | head -1)/*
> $ cd $(mktemp -d)
> $ ln -s $bin/luatex $bin/luametatex $bin/context $bin/context.lua $bin/mtxrun $bin/mtxrun.lua .
> $ ./context --nofile
> $ ./context --luatex --nofile
> 
> Running the above commands used to work with the old LuaTeX/kpse-based
> wrapper, but it doesn't work any more. I was able to ""fix"" this by
> adding the lines
> 
> if os.selfpath then
> environment.ownbin = lfs.symlinktarget(os.selfpath .. io.fileseparator .. os.selfname)
> environment.ownpath = environment.ownbin:match("^.*" .. io.fileseparator)
> else
> environment.ownpath = kpse.new("luatex"):var_value("SELFAUTOLOC")
> environment.ownbin = environment.ownpath .. io.fileseparator .. (arg[-2] or arg[-1] or arg[0] or "luatex"):match("[^" .. io.fileseparator .. "]*$")
> end
> 
> to mtxrun.lua, right below the line
> 
> package.loaded["data-ini"] = package.loaded["data-ini"] or true
> 
> but this is obviously not a very good fix.
> 
> There are some threads with more details at:
> 
> https://tug.org/pipermail/tex-live/2023-March/049028.html
> https://gitlab.com/islandoftex/images/texlive/-/issues/30
> 
> Those links only discuss TL, but I get the same issue if I make a symlink
> to the standalone ConTeXt files. 
> 
> Thanks,
> -- Max
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : https://contextgarden.net
> ___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 4934 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2023-04-28  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  4:00 Max Chernoff via ntg-context
2023-04-28  7:20 ` lynx--- via ntg-context [this message]
2023-04-28  8:28   ` Max Chernoff via ntg-context
2023-04-28 18:14     ` lynx--- via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2d88e7f2c939db162e1d668a7b848321@polarcom.com \
    --to=ntg-context@ntg.nl \
    --cc=lynx@polarcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).