[NTG-context] Re: Define a new command that inherits from multiple other command options

2024-04-27 Thread Wolfgang Schuster
ommands provide a way to inherit their options but the "framed" and "counter" mechanism supports it. To use the framed mechanism with your own command replace \installcommandhandler with \installframedcommandhandler. This creates a command named \inherited...framed which ca

[NTG-context] Define a new command that inherits from multiple other command options

2024-04-25 Thread ai2472206007
te command by searching, and I know how to define a new option for it. But what I don't know is how to get it to inherit the options of other commands and perform these features correctly. Any clue is warmly welcome. ``` % macros=mkvi \unprotect \installnamespace {sidenote} \instal

[NTG-context] Re: Reinserting a section title followed by (continued) after a page break

2023-09-04 Thread Hans Hagen via ntg-context
error] loading will be aborted earlier on because you overload existing macros. It sounds worse than it is because if you use mkiv/lmtx there are easier ways to define an enviroment, think: \unprotect \installnamespace {Slug} \installcommandhandler \Slug {Slug} \Slug \protect \setu

Re: [NTG-context] About the use of command handlers

2020-05-29 Thread Hans Hagen
odule[look] \unprotect \writestatus{loading}{ConTeXt User Module / look} \installnamespace {look} \installcommandhandler \look {look} \look \appendtoks \setuevalue{\currentlook}{\do_look{\currentlook}} \to \everydefinelook \

[NTG-context] About the use of command handlers

2020-05-28 Thread Jairo A. del Rio
nTeXt User Module / look} \installnamespace {look} \installcommandhandler \look {look} \look \appendtoks \setuevalue{\currentlook}{\do_look{\currentlook}} \to \everydefinelook \unexpanded\def\do_look#id{% \edef\curre

Re: [NTG-context] update/install error

2016-09-24 Thread Jean-Pierre Delange
emattribute[ruled] 72 %definesystemattribute[shifted] 73 74 >> \registerctxluafile{node-rul}{1.001} 75 76 \installcorenamespace{bar} 77 \installcorenamespace{barindex} 78 \installcorenamespace{barattribute} 79 \installcorenamespace{barstack} 80 81 \installcommandhandler \??bar {bar} \??bar

Re: [NTG-context] update/install error

2016-09-24 Thread Pablo Rodriguez
temattribute[ruled] > 72 %definesystemattribute[shifted] > 73 > 74 >> \registerctxluafile{node-rul}{1.001} > 75 > 76 \installcorenamespace{bar} > 77 \installcorenamespace{barindex} > 78 \installcorenamespace{barattribute} > 79 \installcorenamespace{barstack} > 80 &

[NTG-context] installation error

2016-09-24 Thread Csikos Bela
68 69 \unprotect 70 71 %definesystemattribute[ruled] 72 %definesystemattribute[shifted] 73 74 >> \registerctxluafile{node-rul}{1.001} 75 76 \installcorenamespace{bar} 77 \installcorenamespace{barindex} 78 \installcorenamespace{barattribute} 79 \installcorenamespace{barstack} 80

[NTG-context] update/install error

2016-09-23 Thread Mikael P. Sundqvist
ystemattribute[shifted] 73 74 >> \registerctxluafile{node-rul}{1.001} 75 76 \installcorenamespace{bar} 77 \installcorenamespace{barindex} 78 \installcorenamespace{barattribute} 79 \installcorenamespace{barstack} 80 81 \installcommandhandler \??bar {bar} \??bar 82 83 \n

Re: [NTG-context] \startchemical

2015-08-21 Thread Hans Hagen
patibility) but we can do this: in chem-str.mkiv: % \installsimplecommandhandler \??chemical {chemical} \??chemical % no \define... \installcommandhandler \??chemical {chemical} \??chemical % no \define... \let\setupchemicals \setupchemical \let\definechemicals\definechemical then we can do:

Re: [NTG-context] How to get parameters in lua

2014-09-21 Thread Hans Hagen
\installcommandhandler-generated \setup) are stored on the TeX side and not on the lua side. Is this correct? yes and getting the macro meaning at the lua end is not efficient as it is tokenized 2. Calling \ctxlua from lua. I was tempted to add another level of indirection to your second (the

Re: [NTG-context] How to get parameters in lua

2014-09-20 Thread Christoph Reller
On 9/19/2014 9:30 AM, Christoph Reller wrote: > > Hi, > > > > \installcommandhandler nicely provides (among others) \define and > > \setup commands. Thus it is easy to provide a key with > > \setup[key=value] and to read the value of such a key with > > \paramet

Re: [NTG-context] How to get parameters in lua

2014-09-19 Thread Hans Hagen
On 9/19/2014 9:30 AM, Christoph Reller wrote: Hi, \installcommandhandler nicely provides (among others) \define and \setup commands. Thus it is easy to provide a key with \setup...[key=value] and to read the value of such a key with \parameter{key}. My question is: How do I read the value of a

[NTG-context] How to get parameters in lua

2014-09-19 Thread Christoph Reller
Hi, \installcommandhandler nicely provides (among others) \define and \setup commands. Thus it is easy to provide a key with \setup...[key=value] and to read the value of such a key with \parameter{key}. My question is: How do I read the value of a key defined with \setup...[key=value] on the

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Wolfgang Schuster
>> >> >> >> and then run >> >> >> \lundklippfyllbild{k.jpg}{\textwidth}{\textheight} > > Here is an eTeX solution. > > \unprotect > > \newdimen\d_scaleandclip_actual_wd > \newdimen\d_scaleandclip_actual_ht > > \newdimen\d_sc

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Mikael P. Sundqvist
d([==[#1]==],[==[#2]==],[==[#3]==])} >> >> >> >> and then run >> >> >> \lundklippfyllbild{k.jpg}{\textwidth}{\textheight} > > > Here is an eTeX solution. > > \unprotect > > \newdimen\d_scaleandclip_actual_wd > \newdimen\d_scaleandclip_actual_h

Re: [NTG-context] resize and center and clip image

2014-05-01 Thread Aditya Mahajan
ht} Here is an eTeX solution. \unprotect \newdimen\d_scaleandclip_actual_wd \newdimen\d_scaleandclip_actual_ht \newdimen\d_scaleandclip_requested_wd \newdimen\d_scaleandclip_requested_ht \newbox\scaleandclip_box \installnamespace{scaleandclip} \installcommandhandler \sc

[NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-25 Thread Marco Patzer
Hi, the following example produces an “Undefined control sequence” error. If \def is used instead of \starttexdefinition then there is no error. Why? \starttexcode \installcommandhandler{foo}{foo}{foo} \appendtoks \setuevalue{start\currentfoo}{\foo@start[\currentfoo]}%% \setuevalue{stop

Re: [NTG-context] New module: crossref

2012-11-04 Thread Wolfgang Schuster
ifference between both is that I have to create the \definefancybreak, \setupfancybreak and \fancybreakparameter commands for MkII myself while in MkIV the \installcommandhandler creates all three commands with a single line of code. This command in MkIV is

Re: [NTG-context] need help with macro

2012-09-23 Thread Philipp Gesang
\def\mogrify#content% > {\begingroup >\edef\m_mogrify_content{#content}% >\expandafter\mogrify_scan\m_mogrify_content\relax >\colored [red]{\m_mogrify_three}% >\colored[green]{\m_mogrify_rest }% >\endgraf > \endgroup} > > \installnamespa

Re: [NTG-context] need help with macro

2012-09-23 Thread Wolfgang Schuster
{% > \begingroup >\let\stopper\relax >\def\get_first_three##1##2##3##4\stopper{% > \def\first_three{##1##2##3}% > \def\rest{##4}% >}% >\get_first_three#content\stopper% >\colored[red]{\first_three}% >\colored[green]{\rest}% > \endgraf &

[NTG-context] need help with macro

2012-09-23 Thread Philipp Gesang
}% }% \get_first_three#content\stopper% \colored[red]{\first_three}% \colored[green]{\rest}% \endgraf \endgroup% } \installnamespace {ww} \installcommandhandler \ww {ww} \ww \appendtoks \setuevalue{\currentww}{\wont_work[\currentww]} \to \everydefineww \unexpanded

[NTG-context] List of macro-generating macro (was: Ctx: list of commands)

2012-09-19 Thread Sietse Brouwer
2 1 -- \installcolumnbreakhandler 2 61 24 \installcommandhandler 3 5 -- \installdefinehandler -- 15 5 \installdirectcommandhandler -- 3 -- \installdirectparameterhandler -- 3 -- \installdirectparametersethandler -

Re: [NTG-context] Bug with linenumbering

2012-05-03 Thread Wolfgang Schuster
value with \definewhatever where I think it’s better to use \setupwhatever. \unprotect \installnamespace {whatever} \installcommandhandler \whatever {whatever} \whatever \appendtoks \definelinenumbering[\currentwhatever]% \to \everydefinewhatever \appendtoks \setue

Re: [NTG-context] footnotes setup

2012-03-19 Thread Wolfgang Schuster
Am 18.03.2012 um 23:10 schrieb Alan Braslau: > On Sun, 18 Mar 2012 21:59:17 +0100 > Wolfgang Schuster wrote: > >> 2. Many of the \define… and \setup… commands are now auto generated >> from \installcommandhandler which generates only one setup-command >> which

Re: [NTG-context] footnotes setup

2012-03-18 Thread Alan Braslau
On Sun, 18 Mar 2012 21:59:17 +0100 Wolfgang Schuster wrote: > 2. Many of the \define… and \setup… commands are now auto generated >from \installcommandhandler which generates only one setup-command >which can be used for global (i.e. \setup…[..,..=..,..]) and local >

Re: [NTG-context] footnotes setup

2012-03-18 Thread Wolfgang Schuster
re any difference between the singular and the plural forms? > Also, what parameters are accepted? (I see "% not all make sense here" > in strc-not.mkvi) 1. The \setupnotedefinition was replaced with \setupnotation 2. Many of the \define… and \setup… commands are now auto generated

Re: [NTG-context] cureent beta fails install

2012-01-10 Thread Wolfgang Schuster
le\c!color > but searching the sourcesfor its definition does not reveal it. > Could it be forgotten? No, \use…styleandcolor is a generated command from \installcommandhandler (see mult-aux.mkiv). Wolfgang __