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
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
] 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
]
\unprotect
\writestatus{loading}{ConTeXt User Module / look}
\installnamespace {look}
\installcommandhandler \look {look} \look
\appendtoks
\setuevalue{\currentlook}{\do_look{\currentlook}}
\to \everydefinelook
\unexpanded
Module / look}
\installnamespace {look}
\installcommandhandler \look {look} \look
\appendtoks
\setuevalue{\currentlook}{\do_look{\currentlook}}
\to \everydefinelook
\unexpanded\def\do_look#id{%
\edef\currentlook{#id
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
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} \??
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
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
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
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
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
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
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
\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
{scaleandclip}
\installcommandhandler \scaleandclip {scaleandclip} \scaleandclip
\setupscaleandclip
[width=\textwidth,
height=\textheight]
\unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip}
\def\doscaleandclip[#1][#2]%
{\bgroup
\ifsecondargument
\edef
{scaleandclip}
\installcommandhandler \scaleandclip {scaleandclip} \scaleandclip
\setupscaleandclip
[width=\textwidth,
height=\textheight]
\unexpanded\def\scaleandclip{\dodoubleempty\doscaleandclip}
\def\doscaleandclip[#1][#2]%
{\bgroup
\ifsecondargument
\edef
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
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
}%
}%
\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
\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
\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
-- \installcolumnbreakhandler
2 61 24 \installcommandhandler
3 5 -- \installdefinehandler
-- 15 5 \installdirectcommandhandler
-- 3 -- \installdirectparameterhandler
-- 3 -- \installdirectparametersethandler
-- 3
\setupwhatever.
\unprotect
\installnamespace{whatever}
\installcommandhandler \whatever {whatever} \whatever
\appendtoks
\definelinenumbering[\currentwhatever]%
\to \everydefinewhatever
\appendtoks
\setuevalue{\e!start\currentwhatever}{\whatever_start[\currentwhatever
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
\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
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
?
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
28 matches
Mail list logo