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

2024-04-27 Thread Wolfgang Schuster
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 can be customi

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

2024-04-25 Thread ai2472206007
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} \installcommandhandler

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

2023-09-04 Thread Hans Hagen via ntg-context
] 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 \setupSlug

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

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

[NTG-context] About the use of command handlers

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

Re: [NTG-context] update/install error

2016-09-24 Thread Jean-Pierre Delange
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 \newtoks\t_node_rules_checklist 84 The same happe

Re: [NTG-context] update/install error

2016-09-24 Thread Pablo Rodriguez
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} \??

[NTG-context] installation error

2016-09-24 Thread Csikos Bela
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 82 83

[NTG-context] update/install error

2016-09-23 Thread Mikael P. Sundqvist
file{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 \newtoks\t_node_rules_checklist 84 The same happens w

Re: [NTG-context] \startchemical

2015-08-21 Thread Hans Hagen
different (compatibility) 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

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

2014-09-21 Thread Hans Hagen
with \installcommandhandler-generated \setupname) 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

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) \definename and \setupname commands. Thus it is easy to provide a key with \setupname[key=value] and to read the value of such a key with \nameparameter{key}. My question is: How

[NTG-context] How to get parameters in lua

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

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) \definename and \setupname commands. Thus it is easy to provide a key with \setup...[key=value] and to read the value of such a key with \nameparameter{key}. My question is: How do I read

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

2014-05-01 Thread Aditya Mahajan
\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 \scaleandclip {scaleandclip} \scaleandclip \setupscaleandclip

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

2014-05-01 Thread Mikael P. Sundqvist
{scaleandclip} \installcommandhandler \scaleandclip {scaleandclip} \scaleandclip \setupscaleandclip [width=\textwidth, height=\textheight] \unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip} \def\doscaleandclip[#1][#2]% {\bgroup \ifsecondargument \edef

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

2014-05-01 Thread Wolfgang Schuster
{scaleandclip} \installcommandhandler \scaleandclip {scaleandclip} \scaleandclip \setupscaleandclip [width=\textwidth, height=\textheight] \unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip} \def\doscaleandclip[#1][#2]% {\bgroup \ifsecondargument \edef

[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
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 one of the helpers I mean. Wolfgang

[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

Re: [NTG-context] need help with macro

2012-09-23 Thread Wolfgang Schuster
\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 \endgroup% } \installnamespace {ww} \installcommandhandler \ww {ww

Re: [NTG-context] need help with macro

2012-09-23 Thread Philipp Gesang
\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} \installnamespace {ww} \installcommandhandler \ww

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

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

Re: [NTG-context] Bug with linenumbering

2012-05-03 Thread Wolfgang Schuster
\setupwhatever. \unprotect \installnamespace{whatever} \installcommandhandler \whatever {whatever} \whatever \appendtoks \definelinenumbering[\currentwhatever]% \to \everydefinewhatever \appendtoks \setuevalue{\e!start\currentwhatever}{\whatever_start[\currentwhatever

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 schuster.wolfg...@googlemail.com wrote: 2. Many of the \define… and \setup… commands are now auto generated from \installcommandhandler which generates only one setup-command which can

Re: [NTG-context] footnotes setup

2012-03-18 Thread Wolfgang Schuster
\installcommandhandler which generates only one setup-command which can be used for global (i.e. \setup…[..,..=..,..]) and local (i.e. \setup…[…][..,..=..,..]) settings. For backward compatibility you can find things like this: \let\setupnotes\setupnote 3. The argument are same as before

Re: [NTG-context] footnotes setup

2012-03-18 Thread Alan Braslau
On Sun, 18 Mar 2012 21:59:17 +0100 Wolfgang Schuster schuster.wolfg...@googlemail.com 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

Re: [NTG-context] cureent beta fails install

2012-01-10 Thread Wolfgang Schuster
? No, \use…styleandcolor is a generated command from \installcommandhandler (see mult-aux.mkiv). Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context