Hello,
** Saša Janiška
On Tue, 21 Apr 2020 23:07:48 +0200 Pablo Rodriguez
wrote:
Hello Pablo,
thank you for your assistance!
This works for me with LMTX in Fedora.
Add to ~/.bashrc "export OSFONTDIR=~/.fonts/:/usr/share/fonts/" (log out and log in)
I'm using fish shell, but here is my env:
Do you understand well how your shell work? If you do, it is Ok, but otherwise why do you use such unusual shell? Why not bash or zsh?
$ env | grep OSFONTDIR OSFONTDIR=/home/gour/.fonts/ /usr/share/fonts/
Is it correct output? I'm not a fish user but as bash user I would test 'OSFONTDIR' as following $ echo "'${OSFONTDIR}'" In my shell I get $ echo "'${OSFONTDIR}'" '/usr/share/fonts;/usr/local/share/fonts;/usr/local/opt/texlive/2020/texmf-dist/fonts/truetype;/usr/local/opt/texlive/2020/texmf-dist/fonts/opentype' As you see, its value is semicolon separated paths. Not a SPACE separated list of paths but a SEMICOLON separated. I'm not sure if fish (shell) changes semicolon in a VALUE to a space or you set it without quoting the value. I set OSFONTDIR as (this is for BASH!) OSFONTDIR="/usr/share/fonts;/usr/local/share/fonts" export OSFONTDIR
Now I changed local one to ~/.local/share/fonts, but it is empty and my fonts are in:
$ fc-cache -v | grep google-noto /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected /usr/share/fonts/google-noto /usr/share/fonts/google-noto-cjk /usr/share/fonts/google-noto-emoji /usr/share/fonts/google-noto-vf /usr/share/fonts/google-noto: skipping, existing cache is valid: 76 fonts, 0 dirs /usr/share/fonts/google-noto-cjk: skipping, existing cache is valid: 45 fonts, 0 dirs /usr/share/fonts/google-noto-emoji: skipping, existing cache is valid: 1 fonts, 0 dirs /usr/share/fonts/google-noto-vf: skipping, existing cache is valid: 146 fonts, 0 dirs /usr/share/fonts/google-noto: skipping, looped directory detected /usr/share/fonts/google-noto-cjk: skipping, looped directory detected /usr/share/fonts/google-noto-emoji: skipping, looped directory detected /usr/share/fonts/google-noto-vf: skipping, looped directory detected
and repeat the three other steps from my previous message.
Here they are:
1. Remove "/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/".
$ rm -rf /home/gour/opt/lmtx/tex/texmf-cache/luatex-cache
2. Run "mtxrun --generate".
$ mtxrun --generate resolvers | resolving | variable 'SELFAUTOLOC' set to '/home/gour/opt/lmtx/bin' resolvers | resolving | variable 'SELFAUTODIR' set to '/home/gour/opt/lmtx' resolvers | resolving | variable 'SELFAUTOPARENT' set to '/home/gour/opt' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'lmtx' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;selfautoparent:/texmf-local/web2c;selfautoparent:/texmf-context/web2c;selfautoparent:/texmf-dist/web2c;selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-local/web2c' from specification 'selfautoparent:/texmf-local/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-context/web2c' from specification 'selfautoparent:/texmf-context/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf-dist/web2c' from specification 'selfautoparent:/texmf-dist/web2c' resolvers | resolving | looking for fallback 'contextcnf.lua' on given path '/home/gour/opt/texmf/web2c' from specification 'selfautoparent:/texmf/web2c' resolvers | resolving | resolvers | resolving | warning: no lua configuration files found resolvers | resolving | no texmf paths are defined (using TEXMF) resolvers | resolving | mtxrun | mtxrun | elapsed lua time: 0.019 seconds
You have a problem here (aside from broken formatting). The 'mtxrun' didn't find necessary files, take a look on last part of output. I have installed LMTX (Luametatex) into /usr/local/opt/lmtx as root and /usr/local/opt/lmtx/tex/texmf-cache is owned by root. If I delete the "root" cache and "user" cache and run 'mtxrun --generate' as root at first I see at bottom of 'mtxrun' output: system | lua | compiling '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' system | lua | dumping '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' stripped resolvers | caching | 'files' compiled to '/usr/local/opt/lmtx/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' mtxrun | mtxrun | elapsed lua time: 0.050 seconds and then 'mtxrun --generate' as an user: system | lua | compiling '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' system | lua | dumping '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lua' into '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' stripped resolvers | caching | 'files' compiled to '/home/vladimir/.cache/lmtx/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/trees/dcb651482955ac31eaab7723b70e0184.lud' mtxrun | mtxrun | elapsed lua time: 0.052 seconds (don't bother by cache path I configured it being like that). So at first you have to be sure that 'mtxrun --generate' has done its work right.
and I notice that after that
/home/gour/opt/lmtx/tex/texmf-cache/luatex-cache/ is empty?
That's wrong. The following will of course fail.
My $PATH is:
$ env | grep PATH PATH=/home/gour/opt/lmtx/bin:/home/gour/opt/lmtx/tex/texmf-linux-64/bin:/home/gour/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
3. Run "context t.tex"
I use the following t.tex
\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari] [range={devanagari,devanagariextended}, features=devanagari-two]
\definefontfamily [mainface] [ss] [Noto Sans]
\setupbodyfont[mainface]
\starttext
ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते । सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
dhyāyato viṣayān puṁsaḥ saṅgas teṣūpajāyate saṅgāt sañjāyate kāmaḥ kāmāt krodho ’bhijāyate
\stoptext
as sugested by Wofgang, but it fails:
$ context t.tex mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
Do I need to setup some other envvar as it is suggested in the link posted by Wolfgang?
Sincerely, Gour
I would suggest you to reinstall lmtx, update PATH, correctly set OSFONTDIR variable and in fresh shell session run 'mtxrun --generate' again. --- WBR, Vladimir Lomov -- The problem that we thought was a problem was, indeed, a problem, but not the problem we thought was the problem. -- Mike Smith