[NTG-context] Re: combining \definetyping and \definebuffer
On 7/29/2023 10:35 PM, Henning Hraban Ramm wrote: Am 29.07.23 um 22:06 schrieb Bruce Horrocks: Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing. The setup for MyCode is not applied to \typeMyBuffer, and I don’t know how it could; something like \typeMyBuffer[MyCode] doesn’t work. These commands inherit from buffer, so \setupbuffer will work. But as I need to prevent you to come up with some ugly hack (after all your upocoming book should be hack free) ... ... attached an extension that supports inheritance (via category), still honors 'buffer' otherwise and accepts an optional category instead of settings. take your choice ... You can put the patch in cont-new.mkxl assuming you wikify it too. 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 - \unprotect \pushoverloadmode \appendtoks \frozen\instance\protected\edefcsname\e!type\currentbuffer\endcsname {\buff_verbatim_type_defined_buffer[\currentbuffer][\currentdefinedbuffer]}% \to \everydefinebuffer \tolerant\protected\def\buff_verbatim_type_defined_buffer[#1]#*[#2]#*[#3]% category name settings {\begingroup \cdef\currenttyping{\namedbufferparameter{#1}\c!category}% \ifempty\currenttyping \let\currenttyping\v!buffer \fi \ifhastok={#3}% \setupcurrenttyping[#3]% \orelse\ifempty{#3}\else \cdef\currenttyping{#3} \fi \buff_verbatim_type_buffer_indeed{\currenttyping}{#2}% \useindentnextparameter\typingparameter \endgroup \dorechecknextindentation} \popoverloadmode \protect \usemodule[visual] \definetyping[MyCode] \setuptyping [MyCode] [option=tex, numbering=file] \definebuffer [MyBuffer] [category=MyCode] \setuptyping [MyBuffer] [option=TEX, numbering=file] % \setuptyping % [buffer] % [option=TEX, %numbering=file] \startMyBuffer \fakewords{10}{20} \stopMyBuffer \starttext \startMyCode \fakeword \stopMyCode \getMyBuffer \typeMyBuffer \typeMyBuffer[MyCode] \typeMyBuffer[option=TEX] \stoptext ___ 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] Re: combining \definetyping and \definebuffer
Am 29.07.23 um 22:49 schrieb Max Chernoff: I'm on mobile now so I can't type out a complete solution, but I think that what you're looking for is in this file: https://github.com/gucci-on-fleek/unnamed-emoji/blob/master/documentation/unemoji-manual.mkxl It doesn't exactly do what you specifically asked for, but I think that it's pretty similar to your end goal. There's a .tex file with example usage in the same folder and a link to the compiled PDF from the main repo page. Thank you! Well, I’m sure it’s in there, and it’s an impressive module, but I don’t understand the code – too many commands I never heard of. I’ll try again tomorrow when my head hopefully hurts less and there won’t be concerts on both sides of my quarter… Hraban ___ 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] Re: combining \definetyping and \definebuffer
I'm on mobile now so I can't type out a complete solution, but I think that what you're looking for is in this file: https://github.com/gucci-on-fleek/unnamed-emoji/blob/master/documentation/unemoji-manual.mkxl It doesn't exactly do what you specifically asked for, but I think that it's pretty similar to your end goal. There's a .tex file with example usage in the same folder and a link to the compiled PDF from the main repo page. Thanks, -- Max ___ 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] Re: combining \definetyping and \definebuffer
Am 29.07.23 um 22:06 schrieb Bruce Horrocks: Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing. The setup for MyCode is not applied to \typeMyBuffer, and I don’t know how it could; something like \typeMyBuffer[MyCode] doesn’t work. Hraban ___ 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] Re: combining \definetyping and \definebuffer
Am 29.07.23 um 22:06 schrieb Bruce Horrocks: Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing. The setup for MyCode is not applied to \typeMyCode, and I don’t know how it could; something like \typeMyBuffer[MyCode] doesn’t work. Hraban ___ 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] Re: combining \definetyping and \definebuffer
Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing. What were you exepcting if not this? (onTeXt ver: 2023.07.18 22:07 LMTX) > On 29 Jul 2023, at 20:09, Henning Hraban Ramm wrote: > > Hi, > I’d like to use a custom buffer ("MyBuffer") to use a custom typing style > ("MyCode"). How does that work? > > > """ > \usemodule[visual] > > \definetyping[MyCode] > > \setuptyping[MyCode][ > option=tex, > numbering=file, > ] > > \definebuffer[MyBuffer] > > \startMyBuffer > \fakewords{10}{20} > \stopMyBuffer > > \starttext > > \startMyCode > \fakeword > \stopMyCode > > \getMyBuffer > > \typeMyBuffer > > \stoptext > """ — Bruce Horrocks Hampshire, UK ___ 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] combining \definetyping and \definebuffer
Hi, I’d like to use a custom buffer ("MyBuffer") to use a custom typing style ("MyCode"). How does that work? """ \usemodule[visual] \definetyping[MyCode] \setuptyping[MyCode][ option=tex, numbering=file, ] \definebuffer[MyBuffer] \startMyBuffer \fakewords{10}{20} \stopMyBuffer \starttext \startMyCode \fakeword \stopMyCode \getMyBuffer \typeMyBuffer \stoptext """ Hraban ___ 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] Re: issue with current latest (2023.07.28 20:04)
On 7/29/23 13:54, Hans Hagen via ntg-context wrote: > Hi, > > There seems to be some mismatch between bin and source .. clueless how > that can happen but I'll upload again. Many thanks for the new upload, Hans. New LMTX binaries and it works fine again. Pablo ___ 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] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-lmt.zip context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.7z context/latest/cont-tst.tar.xz context/latest/cont-tst.zip sent 175,530 bytes received 38,699,762 bytes 4,092,136.00 bytes/sec total size is 562,229,138 speedup is 14.46 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-07-29.15 233581875 /var/www/aanhet.net/context//htdocs/archives/context-2023-07-29.15/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2023-07-29.15/current 360331288 /var/www/aanhet.net/context//htdocs/archives/context-2023-07-29.15 360331288 total ___ 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] Re: issue with current latest (2023.07.28 20:04)
Hi, There seems to be some mismatch between bin and source .. clueless how that can happen but I'll upload again. 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] Re: issue with current latest (2023.07.28 20:04)
On 7/29/23 10:03, Jairo A. del Rio wrote: > [...] > Same here. If, in line 69 of lang-lab.mkxl, you replace \lastchknumber > with #2 [...] works again. Hi Jairo, \lastchknumber is an alias of \lastchkinteger (line 1522 of syst-ini.mkxl). \lastchknumber might even be a primitive in LuaMetaTeX. > Anyway, let's wait for a proper fix by Hans. I wonder whether an updated LMTX binary would be required. Sadly, https://github.com/contextgarden/luametatex is out of sync. Many thanks for your reply, Pablo ___ 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] Re: issue with current latest (2023.07.28 20:04)
El sáb, 29 jul 2023 a la(s) 02:50, Pablo Rodriguez (oi...@gmx.es) escribió: > Dear list, > > trying to generate the format for current latest (2023.07.28 20:04), I > get this error message: > > tex error > tex error on line 280 in file lang-lab.mkxl: Control > sequence expected instead of undefined > > \lang_labels_define_class_indeed {head}{ > > \definelabelclass > ...ded {\lang_labels_define_class_indeed {#1}{\ifchknumber #2\or > \lastchknumber > \else \zerocount \fi }\expandafter \noexpand \csn ... > > \definelabelclass [head] [0] > % titles > > > You injected something that confused the parser, maybe by using some Lua > call. > > LuaMetaTeX is from 20230727 (just in case it might be relevant). > > Could anyone confirm the issue? > Same here. If, in line 69 of lang-lab.mkxl, you replace \lastchknumber with #2 (as it seems it was in older releases, e.g. https://source.contextgarden.net/tex/context/base/mkxl/lang-lab.mkxl?search=lang-lab), it works again. Anyway, let's wait for a proper fix by Hans. Regards, Jairo > 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 / > 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 > > ___ > ___ 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] issue with current latest (2023.07.28 20:04)
Dear list, trying to generate the format for current latest (2023.07.28 20:04), I get this error message: tex error > tex error on line 280 in file lang-lab.mkxl: Control sequence expected instead of undefined \lang_labels_define_class_indeed {head}{ \definelabelclass ...ded {\lang_labels_define_class_indeed {#1}{\ifchknumber #2\or \lastchknumber \else \zerocount \fi }\expandafter \noexpand \csn ... \definelabelclass [head] [0] % titles You injected something that confused the parser, maybe by using some Lua call. LuaMetaTeX is from 20230727 (just in case it might be relevant). Could anyone confirm the issue? 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 / 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 ___