With LuajitTeX, Version 1.10.0 (TeX Live 2019) and ConTeXt ver: 2019.02.26 20:04 MKIV beta fmt: 2019.3.1 I can run the following MWE:


Adding % engine=luajittex at the top breaks everything:

$ context font.tex 
mtx-context     | redirect texlua -> luajittex: luajittex --luaonly "/home/stenner/.local/bin/mtxrun" --script context font.tex --redirected
mtx-context     | run 1: luajittex --fmt="$TEXDIR/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luajittex/cont-en" --jobname="font" --lua="$TEXDIR/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luajittex/cont-en.lui" --c:currentrun=1 --c:engine="luajittex" --c:fulljobname="./font.tex" --c:input="./font.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:redirected --c:texmfbinpath="$TEXDIR/bin/x86_64-linux" "cont-yes.mkiv"

This is LuajitTeX, Version 1.10.0 (TeX Live 2019) 
 system commands enabled.
open source     > level 1, order 1, name '$TEXDIR/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2019.02.26 20:04 MKIV beta  fmt: 2019.3.1  int: english/english
system          > 
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name '$TEXDIR/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name '$TEXDIR/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'font', input './font', result 'font'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name '/tmp/font.tex'
open source     > level 3, order 4, name '$TEXDIR/texmf-dist/tex/context/fonts/mkiv/type-imp-postscript.mkiv'
open source     > level 4, order 5, name '$TEXDIR/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 4, order 5, name '$TEXDIR/texmf-dist/tex/context/fonts/mkiv/type-imp-texgyre.mkiv'
close source    > level 3, order 5, name '$TEXDIR/texmf-dist/tex/context/fonts/mkiv/type-imp-postscript.mkiv'
fonts           > defining > font with asked name 'texgyreheros-regular' is not found using lookup 'file'
fonts           > defining > unknown font 'texgyreheros-regular', loading aborted

fonts           > !! No bodyfont has been defined and no defaults have been
fonts           > !! loaded (maybe due to a missing \starttext).

In theory, ConTeXt is able to find the font:

$ mtxrun --script fonts --list texgyreheros

identifier            familyname     fontname              filename                   subfont   instances

texgyreherosregular   texgyreheros   texgyreherosregular   texgyreheros-regular.otf
  • 2
    For a context question the tag luaotfload is wrong. – Ulrike Fischer Mar 1 at 11:51
  • I cannot reproduce with latest beta. I'm also curious where you obtained this version of ConTeXt. My local version still reports This is LuajitTeX, Version 1.09.2 (TeX Live 2019/dev). – Henri Menke Mar 1 at 20:29
  • 2
    Could you try executing the following: context --make; contextjit --make; mtxrun --generate; mtxrunjit --generate. If that doesn't fix it, try additionally mtxrun --script fonts --reload; mtxrunjit --script fonts --reload. – Henri Menke Mar 1 at 20:36
  • @HenriMenke tlmgr info context reports it as context revision 50165. After rebuilding everything with mtxrunjit and using contextjit instead of the %% engine = luajittex comment it produced the same output as plain context – tstenner Mar 2 at 9:47
  • 1
    @tstenner So the problem is solved? – Henri Menke Mar 2 at 10:43

In general, when ConTeXt can't find files which you are sure are there, or complains about undefined control sequences which you are sure are defined, or chokes on mismatched formats, try rebuilding the ConTeXt formats and caches:

# Remake the formats
context --make
contextjit --make
# Regenerate the file database
mtxrun --generate
mtxrunjit --generate

If you are loading fonts by fontname, rather than by filename (e.g. TeX Gyre Heros rather than texgyreheros-regular.otf) you should also reload the font database:

mtxrun --script fonts --reload
mtxrunjit --script fonts --reload
  • Actually reloading the file and font database with both mtxrun and mtxrunjit might be unnecessary. It's probably sufficient to just use one of them, but I haven't tried. – Henri Menke Mar 4 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.