Opened 13 months ago

Closed 13 months ago

Last modified 9 months ago

#17843 closed enhancement (wontfix)

luametatex

Reported by: ken@… Owned by: ken@…
Priority: normal Milestone: 12.0
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

With TL2023, the context files have been altered to use luametatext, and the old stub scripts have been removed.

A source tarball (unversioned directory name) can currently be downloaded in firefox from [ https://tug.org/svn/texlive/trunk/Master/source/] (click on it, click on download - currently on rev 66577, it might change under us.) See #17823 for more about available trees - it looks an order of magnitude easier to just take this years pretarred source.

Getting it to work was an order of magnitude worse than for any of the other tex 'extensions' and caused a shed-load of swearing. In the end I managed to get a binary copy of 2023 install_tl_unx and only install the 'context' scheme. I was still none the wiser, but using strace I eventually got it to work, at least for MKIV. Documentation for this is generally old and unreliable.

The following appears to be what is needed (I had a few mis-steps along the way, need to retest this on a fresh system):

cmake -DCMAKE_INSTALL_PREFIX=${TEXLIVE_PREFIX}/bin/${TEXARCH} \
      -DCMAKE_BUILD_TYPE=Release   \
      -GNinja ..

ninja

install -v -m755 luametatex ${TEXLIVE_PREFIX}/bin/${TEXARCH}/
ln -svf luametatex ${TEXLIVE_PREFIX}/bin/${TEXARCH}/context
ln -svf luametatex ${TEXLIVE_PREFIX}/bin/${TEXARCH}/mtxrun

for F in context.lua mtxrun.lua ; do
ln -sfv /$TEXLIVE_PREFIX/texmf-dist/scripts/context/lua/$F \
        /$TEXLIVE_PREFIX/bin/$TEXARCH/$F
done

mtxrun --generate

Please note:

  1. There are no tests
  2. ninja install will install luametatex, but the source (developed on windoze) assumes it will be in a regular prefix and installs luametatex in a /bin/ directory so that would be /opt/texlive/2023/bin/x86_64-linux/bin/luametatex which is of course not on $PATH.
  3. It doesn't create symlinks for context and mtxrun.
  4. It doesn't create symlinks for the context.lua and mtxrun.lua scripts.

Change History (6)

comment:1 by ken@…, 13 months ago

Norbert replied to me that the git repo at git.texlive.info has all history and all files.

comment:2 by ken@…, 13 months ago

I spent some time looking at how fedora do things: they have a simple fix for context (mkiv) using a couple of scripts. I had to symlink mtxrun.lua, create the luatex-cache directory, and tweak one of the scripts.

Not sure I have fully debugged how I'm doing it, currently on yet another rerun. When it works, the example 'Hello-world.tex' from the context garden works (might still need context.lua, I had added that while trying to work out why it didn't work).

Context is horrible, mtxrun-generate provides lots of weird unuseful output, and both context and mtxrun tend to fail silently when things are not correctly setup.

comment:3 by ken@…, 13 months ago

For luametatex, it is so tangential to the rest of texlive that I have no desire to put it into BLFS. Anybody who wants it can use git to pull it from https://github.com/contextgarden/luametatex/releases/ - for the TL2023 version, .../tag/v2.10.07 - and build it with cmake and ninja, in /usr or wherever.

For old mkiv (mkii scripts are apparently no longer supplied after being deprecated in the past) I have the following steps which make my available test files work. All as root, after running fmtutil-sys and recreating the libkpathsea symlink for evince and dvisvgm:

mkdir -pv $TEXLIVE_PREFIX/texmf-var/luatex-cache/context/

ln -sfv /$TEXLIVE_PREFIX/texmf-dist/scripts/context/lua/mtxrun.lua \
        /$TEXLIVE_PREFIX/bin/$TEXARCH/mtxrun

# note: explicitly link mtxrun to the mtxrun.lua script, trying to use the approach followed by fedora and mentioned in the context files is a recipe for pain

cat > $TEXLIVE_PREFIX/bin/$TEXARCH/context << EOF
#!/bin/sh
export TEXMF=$TEXLIVE_PREFIX/texmf-dist;
export TEXMFCNF=$TEXLIVE_PREFIX/texmf-dist/web2c;
export TEXMFCACHE=$TEXLIVE_PREFIX/texmf-var/luatex-cache/context/;
$TEXLIVE_PREFIX/bin/$TEXARCH/mtxrun --script context "\$@"
EOF
chmod -v 0755 $TEXLIVE_PREFIX/bin/$TEXARCH/context

mtxrun --generate 

I'm not convinced that mtxrun --generate is actually needed, but it seems to do no harm.

comment:4 by ken@…, 13 months ago

Resolution: wontfix
Status: assignedclosed

Workaround for using mkiv context files committed in (sha:g830acb578ee0 r11.3-221). Marking as WONTFIX because there is no desire to add luametatex to BLFS.

comment:5 by ken@…, 9 months ago

I was updating my own test scripts, and looking at adding a new context script using OTF and TTF files. With mkiv it fits on a single page. But I've jsut tried it on current tl binary (luametatex) and (as with earlier tests from the start of TL2023) it now occupies two pages.

So, the hint for adding luametatex to TL which I had thought about (instead of minimally fixing mkiv context) seems a total wast of time, and I'm inclined to remove context from our build whenever texllive-source needs to be updated.

comment:6 by Bruce Dubbs, 9 months ago

Milestone: 11.412.0

Milestone renamed

Note: See TracTickets for help on using tickets.