[NTG-context] Protect the lettrine
I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter wherein the first letter is a lettrine. When the first paragraph is too short, the second paragraph overlaps the lettrine. % SOT \setupinitial[n=2] \setuphead[chapter][ after={\placeinitial}, page=no, ] \starttext \chapter{one} Kermit Ruffins Meet me at the second line. \chapter{two} \input knuth Meet me at the second line. \stoptext % EOT Produces: https://i.stack.imgur.com/kNDqw.png How would you instruct ConTeXt to "protect" the lettrine such that regardless of whether the first paragraph spans multiple lines, a short first paragraph will still prevent the second paragraph from overlapping the lettrine? That is, the setups should work in both cases, without any knowledge about the first paragraph length being added between \starttext and \stoptext. ConTeXt LMTX version: 2023.06.04 18:58 Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] letfrozen?
On 6/12/2023 12:32 PM, Hans van der Meer via ntg-context wrote: On 12 Jun 2023, at 11:12, Hans Hagen via ntg-context wrote: On 6/12/2023 10:57 AM, Hans van der Meer via ntg-context wrote: The manual LMTX-primitives on page 21 tells me: You can explicitly freeze an unfrozen macro. ... A redefinition will now give: You can't redefine a frozen macro. But is this true? The following code seems to contradict this: \def\HOME{myhome} \writestatus{1}{\meaning\HOME} \letfrozen\HOME \writestatus{2}{\meaning\HOME} \def\HOME{other home} \writestatus{3}{\meaning\HOME}  Is this mechanism broken? It looks so useful to prevent accidental redefinition! here i run with \enabledirectives[overloadmode=error] (you can do that in cont-sys.mkxl) \enabledirectives[overloadmode=warning] Hans Pity. Now I get on loading the tex file: "csname overload > fatal error, protection level 4, control sequence 'nbsp', properties 'immutable', file 't-hvdm-text.tex', line 63 while I had hoped that frozen would give me something like: illegal attempt to redefine \HOME Byproduct (not unwanted) the above illegal redefinition to be solved :-) May I ask why obviously the frozen-mechanism seems (yet?) unimplemented? It's okay and has been around for quite a while now. \enabledirectives[overloadmode=error] \starttext \frozen\def\HOME{} \def\HOME{!} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On 6/12/2023 6:49 PM, Carlos via ntg-context wrote: On Thu, Jun 08, 2023 at 11:57:36PM -0400, Aditya Mahajan via ntg-context wrote: On Thu, 8 Jun 2023, Jigé via ntg-context wrote: Thanks a lot Aditya. The very simple TikZ example with the cross works. The more complex example with the trigonometric circle from the pgf manual, quoted in https://wiki.contextgarden.net/TikZ , does not compile unless you also comment out or find(n,"pdftex") in line 181 of the mtx-install-modules.lua file before doing mtxrun --script install-modules --install tikz but I could guess that from a: Driver file ``pgfsys-pdftex.def'' not found.. message Ah so tikz uses both drivers. @Hans, so the validate function should be: local function validate(n) return not ( find(n,"latex") what's the point of latex there? -- or find(n,"lualatex") or for that matter this one lualatex too or find(n,"plain") or find(n,"optex") -- or find(n,"luatex") -- or find(n,"pdftex") ) end just getting rid of files we don't need Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TiKz with LMTX
On Thu, Jun 08, 2023 at 11:57:36PM -0400, Aditya Mahajan via ntg-context wrote: > On Thu, 8 Jun 2023, Jigé via ntg-context wrote: > > > Thanks a lot Aditya. > > > > The very simple TikZ example with the cross works. > > The more complex example with the trigonometric circle from the pgf manual, > > quoted in https://wiki.contextgarden.net/TikZ , does not compile > > unless you also comment out > > or find(n,"pdftex") > > in line 181 of the mtx-install-modules.lua file > > before doing mtxrun --script install-modules --install tikz > > but I could guess that from a: > > Driver file ``pgfsys-pdftex.def'' not found.. > > message > > Ah so tikz uses both drivers. > > @Hans, so the validate function should be: > > local function validate(n) > return not ( >find(n,"latex") what's the point of latex there? > -- or find(n,"lualatex") or for that matter this one lualatex too > or find(n,"plain") > or find(n,"optex") > -- or find(n,"luatex") > -- or find(n,"pdftex") > ) > end > > > Aditya Through rsync only and by default without mtx-install-modules script, obviously, it'll simply fall back loading by pgfsys-pdftex so you'd be better off by just having local function validate(n) return not ( find(n,"latex") or find(n,"lualatex") or find(n,"plain") or find(n,"optex") -- or find(n,"luatex") or find(n,"pdftex") ) end instead. Also, forget about the curl --ssl or whatever you mentioned earlier. > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ -- Brian Kernighan has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the numerous idiot lights which plague the modern driver. Rather, if the driver makes any mistake, a giant "?" lights up in the center of the dashboard. "The experienced driver", he says, "will usually know what's wrong." ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] letfrozen?
> On 12 Jun 2023, at 11:12, Hans Hagen via ntg-context > wrote: > > On 6/12/2023 10:57 AM, Hans van der Meer via ntg-context wrote: >> The manual LMTX-primitives on page 21 tells me: >> You can explicitly freeze an unfrozen macro. >> ... >> A redefinition will now give: You can't redefine a frozen macro. >> But is this true? The following code seems to contradict this: >> \def\HOME{myhome} >> \writestatus{1}{\meaning\HOME} >> \letfrozen\HOME >> \writestatus{2}{\meaning\HOME} >> \def\HOME{other home} >> \writestatus{3}{\meaning\HOME} >>  >> Is this mechanism broken? It looks so useful to prevent accidental >> redefinition! > > here i run with > > \enabledirectives[overloadmode=error] > > (you can do that in cont-sys.mkxl) > > \enabledirectives[overloadmode=warning] > Hans > Pity. Now I get on loading the tex file: "csname overload > fatal error, protection level 4, control sequence 'nbsp', properties 'immutable', file 't-hvdm-text.tex', line 63 while I had hoped that frozen would give me something like: illegal attempt to redefine \HOME Byproduct (not unwanted) the above illegal redefinition to be solved :-) May I ask why obviously the frozen-mechanism seems (yet?) unimplemented? dr. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] letfrozen?
On 6/12/2023 10:57 AM, Hans van der Meer via ntg-context wrote: The manual LMTX-primitives on page 21 tells me: You can explicitly freeze an unfrozen macro. ... A redefinition will now give: You can't redefine a frozen macro. But is this true? The following code seems to contradict this: \def\HOME{myhome} \writestatus{1}{\meaning\HOME} \letfrozen\HOME \writestatus{2}{\meaning\HOME} \def\HOME{other home} \writestatus{3}{\meaning\HOME}  Is this mechanism broken? It looks so useful to prevent accidental redefinition! here i run with \enabledirectives[overloadmode=error] (you can do that in cont-sys.mkxl) \enabledirectives[overloadmode=warning] Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] letfrozen?
The manual LMTX-primitives on page 21 tells me: You can explicitly freeze an unfrozen macro. ... A redefinition will now give: You can't redefine a frozen macro. But is this true? The following code seems to contradict this: \def\HOME{myhome} \writestatus{1}{\meaning\HOME} \letfrozen\HOME \writestatus{2}{\meaning\HOME} \def\HOME{other home} \writestatus{3}{\meaning\HOME}  Is this mechanism broken? It looks so useful to prevent accidental redefinition! dr. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___