Re: [NTG-context] Changing font and font size inside textex
Thanks Max that works perfectly! But It would still be useful if I could change families inside a MPpage. Sure, but you'll need to store the x-heights first: \starttexdefinition storexheight [#1] % Placing the first use of \switchtobodyfont inside a group messes % with the definitions, so we need to reset the font family manually. \edef\oldfontclass{\fontclass} \switchtobodyfont[#1] \expandafter\newcount\csname #1_xheight\endcsname \global\csname #1_xheight\endcsname=\numexpr 100 * \number\dimexpr1em\relax / \number\dimexpr1ex\relax \relax \switchtobodyfont[\oldfontclass] \stoptexdefinition \starttexdefinition setxheight [#1][#2] % Combining these two lines into one sometimes fails. No idea why. \switchtobodyfont[#1] \switchtobodyfont[\the\dimexpr#2 * \csname #1_xheight\endcsname / 100 \relax] \stoptexdefinition \storexheight[adventor] \storexheight[pagella] \storexheight[heros] \starttext \startMPpage draw textext.origin("\setxheight[adventor][1cm]Hello!"); draw (0, 1cm) -- (6cm, 1cm); \stopMPpage \startMPpage draw textext.origin("\setxheight[pagella][1cm]Hello!"); draw (0, 1cm) -- (6cm, 1cm); \stopMPpage \startMPpage draw textext.origin("\setxheight[heros][6pt]Hello!"); draw textext.origin("\setxheight[heros][24pt]Hello!"); draw (0, 6pt) -- (6cm, 6pt); draw (0, 24pt) -- (6cm, 24pt); \stopMPpage \stoptext It's pretty ugly code, but it seems to work alright. -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Context path resolving, Problem with MkIV and TeXLive
Hi, I had/have a very similar problem on FreeBSD with TeXLive 2021, with the same context.lua not found message. I “resolved” it by setting TEXMF to point to my texmf-dist directory, in my case /usr/local/share/texmf-dist. It would be nice for it to work without setting TEXMF. Without setting TEXMF, running "mtxrun —generate” guesses a little differently, then attempts to scan all of /usr, and then fails when parts have no read permission. (See log at the end of this message.) I suspect it is working when you are in /usr/share/texmf-dist because the “collapsepath” function in mtxrun is collapsing “/../..” from /usr/bin to “.” instead of “/“. (Which seems like a bug, but I’m not sure.) If I run “TEXMF=/usr/local/share/texmf-dist context file.tex” things run correctly, and a ~/.texlive2021 directory is created. Running “TEXMF=/usr/local/shared/texmf-dist mtxrun —generate” runs without error but also doesn’t generate a ~/.texlive2021 directory. The real problem seems to be that mtxrun doesn’t deal well with the filesystem layout case of “/top-level/bin/mtxrun” and “/top-level/share/texmf-dist”. Regards, Jan M. resolvers | resolving | variable 'SELFAUTOLOC' set to '/usr/local/bin' resolvers | resolving | variable 'SELFAUTODIR' set to '/usr/local' resolvers | resolving | variable 'SELFAUTOPARENT' set to '/usr' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'local' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf-dist/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,/var/db/tlpkg,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf-dist/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf-dist/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/janm/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr/local/bin' from specification 'selfautoloc:' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/share/texmf-local/web2c' from specification 'selfautoloc:/share/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/share/texmf-dist/web2c' from specification 'selfautoloc:/share/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/share/texmf/web2c' from specification 'selfautoloc:/share/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/texmf-local/web2c' from specification 'selfautoloc:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/texmf-dist/web2c' from specification 'selfautoloc:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/bin/texmf/web2c' from specification 'selfautoloc:/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/var/db/tlpkg' from specification '/var/db/tlpkg' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr/local' from specification 'selfautodir:' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/share/texmf-local/web2c' from specification 'selfautodir:/share/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/share/texmf-dist/web2c' from specification 'selfautodir:/share/texmf-dist/web2c' resolvers | resolving | found regular configuration file '/usr/local/share/texmf-dist/web2c/texmfcnf.lua' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/share/texmf/web2c' from specification 'selfautodir:/share/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texmf-local/web2c' from specification 'selfautodir:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texmf-dist/web2c' from specification 'selfautodir:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/local/texmf/web2c' from specification 's
Re: [NTG-context] Changing font and font size inside textex
Thank you, I'll try that later. On Tue, May 31, 2022 at 9:42 AM Max Chernoff wrote: > > Thanks Max that works perfectly! But It would still be useful if I could > > change families inside a MPpage. > > Sure, but you'll need to store the x-heights first: > > \starttexdefinition storexheight [#1] > % Placing the first use of \switchtobodyfont inside a group messes > % with the definitions, so we need to reset the font family > manually. > \edef\oldfontclass{\fontclass} > > \switchtobodyfont[#1] > \expandafter\newcount\csname #1_xheight\endcsname > \global\csname #1_xheight\endcsname=\numexpr 100 * > \number\dimexpr1em\relax / \number\dimexpr1ex\relax \relax > > \switchtobodyfont[\oldfontclass] > \stoptexdefinition > > \starttexdefinition setxheight [#1][#2] > % Combining these two lines into one sometimes fails. No idea why. > \switchtobodyfont[#1] > \switchtobodyfont[\the\dimexpr#2 * \csname #1_xheight\endcsname / > 100 \relax] > \stoptexdefinition > > \storexheight[adventor] > \storexheight[pagella] > \storexheight[heros] > > \starttext > \startMPpage > draw textext.origin("\setxheight[adventor][1cm]Hello!"); > > draw (0, 1cm) -- (6cm, 1cm); > \stopMPpage > > \startMPpage > draw textext.origin("\setxheight[pagella][1cm]Hello!"); > > draw (0, 1cm) -- (6cm, 1cm); > \stopMPpage > > \startMPpage > draw textext.origin("\setxheight[heros][6pt]Hello!"); > draw textext.origin("\setxheight[heros][24pt]Hello!"); > > draw (0, 6pt) -- (6cm, 6pt); > draw (0, 24pt) -- (6cm, 24pt); > \stopMPpage > \stoptext > > It's pretty ugly code, but it seems to work alright. > > -- Max > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with compress in linenote
Dear list, I have the following sample: \setuppapersize[A6] \setuplinenumbering [width=margin, location=outer, align=middle] \setupnote[linenote] [paragraph=yes, compress=yes, compressmethod=separator] \setupnotation[linenote] [alternative=serried, width=broad] \definelinenote[otherlinenote] %~ \setupnote[otherlinenote] %~ [compress=yes] \starttext \startlinenumbering \dorecurse{20} {uvwxyz\linenote{abcdef} } \stoplinenumbering \stoptext For some reason unknown to me, "compress=yes" only works in linenote if I setup another linenote and set it up with "compress=yes". Could anyone tell me what I am missing or have I hit a bug? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] stacking of marginals
If you have many marginals, they tend to conflict. The option stack=yes should enhance the situation. I don’t expect wonders – if there’s not enough space, then ConTeXt can’t solve it. But it used to work better, as I can see in my magazines from the last years. Now I can’t see a difference between stack=yes or no: \usemodule[visual] \useMPlibrary[dum] \setupmargindata[inmargin][stack=yes] \starttext \dorecurse{20}{% \fakewords{5}{30} \inmargin{\externalfigure[dummy\recurselevel][width=15mm,height=15mm]} \fakewords{5}{40}\par } \stoptext Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] stacking of marginals
On 5/31/22 19:09, Henning Hraban Ramm via ntg-context wrote: > If you have many marginals, they tend to conflict. > > The option stack=yes should enhance the situation. > > I don’t expect wonders – if there’s not enough space, then ConTeXt can’t > solve it. But it used to work better, as I can see in my magazines from > the last years. > > Now I can’t see a difference between stack=yes or no: Hi Hraban, I can confirm that, diffpdf (open source version shipped with Fedora) shows no difference (they appear to be the same). Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue in Lua syntax formatting
the formatting of Lua multi-line strings messes up the source structure, in the following MWE, the "one" is displayed after "[[": \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext I can reproduce this. As a workaround, you can insert a non-breaking space (U+00A0) immediately after the "[[": \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext (You can't see the NBSP, but it's there) You can also use the Scite syntax highlighting: \usemodule[scite] \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext It produces different (but usually better) output than the default highlighter. This module is installed by default with ConTeXt LMTX. There's also the Vim module: \usemodule[vim] \definevimtyping[LUA][syntax=lua] \starttext \startLUA words = [[ one two three ]] \stopLUA \stoptext You would need to install this module manually though. -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___