How to adjust the $TEXMFCNF variable not to interfere with ConText?

Pablo González L pablgonz at educarchile.cl
Sun Sep 20 01:46:17 CEST 2020


Hi Karl, I have created a new user "myname" on my local machine
and it plays only the commands I have executed
I will try to be as clear as possible in reproducing my problem:

### General information TeX Live 2020 full installation update today
$ kpsewhich -var-value=TEXMFHOME
/home/myname/texmf
$ kpsewhich -all texmf.cnf
/usr/local/texlive/2020/texmf.cnf
/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf
$ kpsewhich -var-value=TEXMFCNF
{/usr/local/texlive/2020/bin/x86_64-linux,/usr/local/texlive/2020/bin/x86_64-linux/share/texmf-local/web2c,/usr/local/texlive/2020/bin/x86_64-linux/share/texmf-dist/web2c,/usr/local/texlive/2020/bin/x86_64-linux/share/texmf/web2c,/usr/local/texlive/2020/bin/x86_64-linux/texmf-local/web2c,/usr/local/texlive/2020/bin/x86_64-linux/texmf-dist/web2c,/usr/local/texlive/2020/bin/x86_64-linux/texmf/web2c,/usr/local/texlive/2020/bin,/usr/local/texlive/2020/bin/share/texmf-local/web2c,/usr/local/texlive/2020/bin/share/texmf-dist/web2c,/usr/local/texlive/2020/bin/share/texmf/web2c,/usr/local/texlive/2020/bin/texmf-local/web2c,/usr/local/texlive/2020/bin/texmf-dist/web2c,/usr/local/texlive/2020/bin/texmf/web2c,/usr/local/texlive/texmf-local/web2c,/usr/local/texlive/2020,/usr/local/texlive/2020/share/texmf-local/web2c,/usr/local/texlive/2020/share/texmf-dist/web2c,/usr/local/texlive/2020/share/texmf/web2c,/usr/local/texlive/2020/texmf-local/web2c,/usr/local/texlive/2020/texmf-dist/web2c,/usr/local/texlive/2020/texmf/web2c}
$ kpsewhich --show-path=cnf
/usr/local/texlive/2020/bin/x86_64-linux:/usr/local/texlive/2020/bin/x86_64-linux/share/texmf-local/web2c:/usr/local/texlive/2020/bin/x86_64-linux/share/texmf-dist/web2c:/usr/local/texlive/2020/bin/x86_64-linux/share/texmf/web2c:/usr/local/texlive/2020/bin/x86_64-linux/texmf-local/web2c:/usr/local/texlive/2020/bin/x86_64-linux/texmf-dist/web2c:/usr/local/texlive/2020/bin/x86_64-linux/texmf/web2c:/usr/local/texlive/2020/bin:/usr/local/texlive/2020/bin/share/texmf-local/web2c:/usr/local/texlive/2020/bin/share/texmf-dist/web2c:/usr/local/texlive/2020/bin/share/texmf/web2c:/usr/local/texlive/2020/bin/texmf-local/web2c:/usr/local/texlive/2020/bin/texmf-dist/web2c:/usr/local/texlive/2020/bin/texmf/web2c:/usr/local/texlive/texmf-local/web2c:/usr/local/texlive/2020:/usr/local/texlive/2020/share/texmf-local/web2c:/usr/local/texlive/2020/share/texmf-dist/web2c:/usr/local/texlive/2020/share/texmf/web2c:/usr/local/texlive/2020/texmf-local/web2c:/usr/local/texlive/2020/texmf-dist/web2c:/usr/local/texlive/2020/texmf/web2c
$ kpsewhich -show-path=web2c
/home/myname/.texlive2020/texmf-config/web2c:/home/myname/.texlive2020/texmf-var/web2c:/home/myname/texmf/web2c:!!/usr/local/texlive/texmf-local/web2c:!!/usr/local/texlive/2020/texmf-config/web2c:!!/usr/local/texlive/2020/texmf-var/web2c:!!/usr/local/texlive/2020/texmf-dist/web2c
$ tlmgr --version
tlmgr revision 55369 (2020-06-01 02:32:00 +0200)
tlmgr using installation: /usr/local/texlive/2020
TeX Live (https://tug.org/texlive) version 2020
$ context --version
resolvers       | caches | path '/home/myname/.texlive2020/texmf-var' created
mtx-context     | ConTeXt Process Management 1.03
mtx-context     |
mtx-context     | main context file:
/usr/local/texlive/2020/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context     | current version: 2020.03.10 14:44
mtx-context     | main context file:
/usr/local/texlive/2020/texmf-dist/tex/context/base/mkiv/context.mkxl
mtx-context     | current version: 2020.03.10 14:44

### Test ConText working
$ context --nofile

resolvers       | formats | executing runner 'run luatex format':
/usr/local/texlive/2020/bin/x86_64-linux/luatex --jobname="cont-nop"
--fmt=/home/myname/.texlive2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.fmt
--lua=/home/myname/.texlive2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui
cont-nop.mkiv --c:currentrun=1 --c:fulljobname="cont-nop.mkiv"
--c:input="cont-nop.mkiv" --c:kindofrun=1 --c:maxnofruns=9 --c:nofile
--c:texmfbinpath="/usr/local/texlive/2020/bin/x86_64-linux"
This is LuaTeX, Version 1.12.0 (TeX Live 2020)
 system commands enabled.
open source     > level 1, order 1, name
'/usr/local/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-nop.mkiv'
system          >
system          > ConTeXt  ver: 2020.03.10 14:44 MKIV beta  fmt: 2020.9.19  int:
english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name
'/usr/local/texlive/2020/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
'/usr/local/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'cont-nop', input 'cont-nop.mkiv', result
'cont-nop'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
system          > loading dummy replacement for jobname
system          > invalid \starttext ... \stoptext structure
fonts           > beware: no fonts are loaded yet, using 'lm mono' in box
close source    > level 1, order 2, name
'/usr/local/texlive/2020/texmf-dist/tex/context/base/mkiv/cont-nop.mkiv'

mkiv lua stats  > used config file:
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: readable+writable:
'/home/myname/.texlive2020/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9'
mkiv lua stats  > resource resolver: loadtime 0.264 seconds, 0 scans with
scantime 0.000 seconds, 0 shared scans, 7 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 450 modules (0.657 sec), 93 tables
(0.030 sec), 543 chunks (0.688 sec)
mkiv lua stats  > traced context: maxstack: 1398, freed: 0, unreachable: 1398
mkiv lua stats  > cleaned up reserved nodes: 53 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 8 attribute, 3 attribute_list, 2 glue, 51
glue_spec, 2 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 1 instances
(re)created, 2 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.001 seconds loading
mkiv lua stats  > callbacks: internal: 34, file: 61, direct: 2, late: 0,
function 61, total: 158
mkiv lua stats  > randomizer: resumed with value 0.99257405847311
mkiv lua stats  > result saved in file: cont-nop.pdf, compresslevel 3,
objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 1 files: lmmono10-regular.otf
mkiv lua stats  > font engine: otf 3.111, afm 1.513, tfm 1.000, 1 instances,
load time 0.019 seconds
mkiv lua stats  > used platform: linux-64, type: unix, binary subtree: bin
mkiv lua stats  > used engine: luatex version: 1.12, functionality level: 7306,
banner: this is luatex, version 1.12.0 (tex live 2020)
mkiv lua stats  > control sequences: 44135 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 116 MB, ctx: 116
MB, max: unknown MB, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.704 seconds
system          | total runtime: 1.225 seconds
#############################################################

Now set auxtree for project

$ mkdir -p ~/mypath/myfolder/tex/latex
$ echo "\def\TAT{Test auxtrees}" > ~/mypath/myfolder/tex/latex/mysty.sty
$ cat ~/mypath/myfolder/tex/latex/mysty.sty
\def\TAT{Test auxtrees}
$ tlmgr conf auxtrees --conffile ~/mypath/texmf.cnf add ~/mypath/myfolder/
$ tlmgr conf auxtrees --conffile ~/mypath/texmf.cnf show
List of auxiliary texmf trees:
  /home/myname/mypath/myfolder/

So far ConText is still working, but, I can't access `mysty.sty`
$ kpsewhich mysty.sty
$ cat ~/mypath/texmf.cnf
TEXMFAUXTREES = /home/myname/mypath/myfolder/,
$ kpsewhich -all texmf.cnf
/usr/local/texlive/2020/texmf.cnf
/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf

For the system to detect my `texmf.cnf`, I need to configure the variable
$TEXMFCNF
(I do not have permission to write outside my account, I can only modify the
ones under "~/")

$ export TEXMFCNF=~/mypath:
$ echo $TEXMFCNF
/home/myname/mypath:
$ kpsewhich -all texmf.cnf
/home/myname/mypath/texmf.cnf
/usr/local/texlive/2020/texmf.cnf
/usr/local/texlive/2020/texmf-dist/web2c/texmf.cnf
$ kpsewhich -var-value=TEXMFCNF
/home/myname/mypath:
$ kpsewhich mysty.sty
/home/myname/mypath/myfolder/tex/latex/mysty.sty

So far everything OK, (pdf/lua)latex works fine, but ConText fails:

$ context --version
mtxrun          | forcing cache reload
resolvers       | resolving | looking for regular 'texmfcnf.lua' on weird path
'/home/myname/mypath:' from specification '/home/myname/mypath:'
resolvers       | resolving | looking for fallback 'contextcnf.lua' on weird
path '/home/myname/mypath:' from specification '/home/myname/mypath:'
resolvers       | resolving |
resolvers       | resolving | warning: no lua configuration files found
resolvers       | resolving | no texmf paths are defined (using TEXMF)
resolvers       | resolving |
mtxrun          | the resolver databases are not present or outdated
resolvers       | resolving | using suffix based filetype 'lua'
resolvers       | resolving | remembering file 'mtx-context.lua' using hash
'lua::mtx-context.lua'
resolvers       | resolving | using suffix based filetype 'lua'
resolvers       | resolving | remembering file 'mtx-contexts.lua' using hash
'lua::mtx-contexts.lua'
resolvers       | resolving | remembered file 'mtx-context.lua'
resolvers       | resolving | using suffix based filetype 'lua'
resolvers       | resolving | remembering file 'mtx-t-context.lua' using hash
'lua::mtx-t-context.lua'
resolvers       | resolving | using suffix based filetype 'lua'
resolvers       | resolving | remembering file 'mtx-t-contexts.lua' using hash
'lua::mtx-t-contexts.lua'
resolvers       | resolving | remembered file 'mtx-t-context.lua'
resolvers       | resolving | using suffix based filetype 'lua'
resolvers       | resolving | remembering file 'context.lua' using hash
'lua::context.lua'
mtxrun          | unknown script 'context.lua' or 'mtx-context.lua'

When ConText works OK, this is the line you are looking for:
mkiv lua stats > used config file:
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua

When I add 'export' it fails and throws:
resolvers       | resolving | looking for regular 'texmfcnf.lua' on weird path
'/home/myname/mypath:' from specification '/home/myname/mypath:'
resolvers       | resolving | looking for fallback 'contextcnf.lua' on weird
path '/home/myname/mypath:' from specification '/home/myname/mypath:'

Here I am lost, I don't know if the problem is the use of `export` (that the
line is mistyped) or the `texmfcnf.lua` file must be copied in some path for
ConText to find it.

Best for all
Pablo



More information about the tex-live mailing list.