unexpanded BD
\BDParentrue
\dodoublegroupempty
\doBD
\stoptexdefinition
\starttexdefinition unexpanded BDNP
\BDParenfalse
\dodoublegroupempty
\doBD
\stoptexdefinition
\starttexdefinition doBD #1#2
\removeunwantedspaces
a bare endash inhibits hyphenation
% ‘twixt the endash and the paren.
% By default, add parens around the dates. If none are needed due to
% the context, use \BDNP.
%
\newif\ifBDParen
\starttexdefinition unexpanded BD
\BDParentrue
\dodoublegroupempty
\doBD
expected in many cases. As the first examples after \starttext show,
the problem appears to be with \autoinsertedspace, but perhaps I am
using it incorrectly in the macro as well.
\starttexdefinition unexpanded BD
\dodoublegroupempty
\doBD
\stoptexdefinition
in the macro as well.
\starttexdefinition unexpanded BD
\dodoublegroupempty
\doBD
\stoptexdefinition
\starttexdefinition doBD #1#2
\removeunwantedspaces\ % insert a space
(
\ifsecondargument
#1|–|#2
\else\iffirstargument
#1
380:
Attempt to node.direct.remove() a non-existing node
%<--
\starttexdefinition unexpanded New
\dodoublegroupempty
\doNew
\stoptexdefinition
\starttexdefinition doNew #1#2
\removeunwantedspaces
\ (#
% this is similar to mkiv, although we add protection against
% overload; i should still use the new argument handling here
\permanent\protected\def\startMPanimation
{\dodoublegroupempty\meta_start_animation}
\permanent\protected\lettonothing\stopMPanimation
\def\meta_start_animation#1%
{\normalexpanded
t-animation/
>> |\unprotect|
>> |\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty\meta_start_animation}
>>
>> \def\meta_start_animation#1%{\normalexpanded{\meta_start_animation_indeed{#1}}}
>>
>> \unexpanded\def\meta
On 5/13/2019 2:14 PM, Jeong Dal wrote:
Dear Wolfgang,
I found the following code with a comment “code by Wolfgang” at
https://adityam.github.io/context-blog/post/metapost-animation/
|\unprotect|
|\installnamespace{MPanimationvariables}\unexpanded\def\startMPanimation{\dodoublegroupempty
mation
{\dodoublegroupempty\meta_start_animation}
\def\meta_start_animation#1%
{\normalexpanded{\meta_start_animation_indeed{#1}}}
\unexpanded\def\meta_start_animation_indeed#1#2#3\stopMPanimation
{\doifsomething{#2}{\getparameters[\MPanimationvariables#1:][#2]}%
\set
consecutively ...
1 \unprotect
2 \unexpanded\def\strc_references_smart
3 {\strc_references_start_goto
4 \let\currentreferencecontent\currentreferencedefault
5 \strc_references_pickup_smart_goto}
6 \def\strc_references_pickup_smart_goto
7 {\dodoublegroupempty
/gmane.comp.tex.context/76001
\unprotect
\unexpanded\def\strc_references_smart
{\strc_references_start_goto
\let\currentreferencecontent\currentreferencedefault
\strc_references_pickup_smart_goto}
\def\strc_references_pickup_smart_goto
{\dodoublegroupempty
into such a prefixed strings.
I hope it does what you want! Let me know if you want/need any
alterations, or discover bugs.
Thanks a lot for that. I'd adjust the interface, so that it matches
the behaviour of \in:
\def\inrange
{\dodoublegroupempty\doinrange}
\def\doinrange#left#right#dummy[#label
]%
{[#1:#2]}
\def\nodoone[#1]%
{[#1]}
% \two, \two{…} and \two{…} (no spaces between “{}{}” allowed)
\def\two
{\dodoublegroupempty\dotwo}
\def\dotwo#1#2%
{\ifsecondargument
[#1:#2]%
\else\iffirstargument
[#1]%
\else
[]%
\fi\fi}
\starttext
\startlines
\one text
\letterbody#1%
{{\blank[line]\setupindenting[yes,medium]#1\par}}
\def\letterclosing
{\dodoublegroupempty\doletterclosing}
\def\doletterclosing#1#2%
{\ifsecondargument
\dodoletterclosing{#1}{#2}%
\else
\doifelsenothing{#1}
{\doletterclosing{Hoogachtend,}{Cecil Westerhof
?
\long\def\letterbody#1%
{{\blank[line]\setupindenting[yes,medium]#1\par}}
\def\letterclosing
{\dodoublegroupempty\doletterclosing}
\def\doletterclosing#1#2%
{\ifsecondargument
\dodoletterclosing{#1}{#2}%
\else
\doifelsenothing{#1}
{\doletterclosing{Hoogachtend,}{Cecil
#1%
{\def\@@letterbody{{\blank[line]\setupindenting[yes,medium]#1\par}}}
\def\letterclosing
{\dodoublegroupempty\doletterclosing}
\def\doletterclosing#1#2%
{\ifsecondargument
\dodoletterclosing{#1}{#2}%
\else
\doifelsenothing{#1}
{\dodoletterclosing{Hoogachtend,}{Cecil
without the if-error.
You could also add title=no to \definedescription[answerblock], this stops
TeX from looking after a optional argument between the braces.
I more or less conclude that the lookahead from \dodoublegroupempty
does not stop on the \if. If I remember correctly, that behaviour
that
can and should be avoided, in my view.
Therefore I explain the problem here as fully as possible hoping
someone knowledgeable with descriptions we might need to fall back
to Taco or Hans will find the best remedy.
I would say the message comes from \dodoublegroupempty in \@@description
\dodoublegroupempty
does not stop on the \if. If I remember correctly, that behaviour is
to be expected from tex and the prospects for solving it generically
within the format bleak. If Hans Hagen is listening, can he comment on
this?
Hans van der Meer
On 26 mrt 2008, at 08:32, Wolfgang
Hans van der Meer wrote:
I more or less conclude that the lookahead from \dodoublegroupempty
does not stop on the \if. If I remember correctly, that behaviour is
to be expected from tex and the prospects for solving it generically
within the format bleak. If Hans Hagen is listening, can
=mpos:par:c...
\dodoublegroupempty #1-\def \dodogetargument ##
1{\def
\dodogetargument {\do...
\dohandleMPpositiongraphicrange ...ositiongraphic
{#3}{#4}\fi \fi
...
l.29 third line
?
Process aborted
that it has no gotcha's
search for group(ed)(empty|argument) in cont-sys.tex
Did you mean syst-gen.tex? I tied dodoublegroupempty but it did not
work in one case (see previous post) and I can not figure out why.
Aditya
Hi Aditya,
I tried something similiar and copied a example from core
) in cont-sys.tex
Did you mean syst-gen.tex? I tied dodoublegroupempty but it did not
work in one case (see previous post) and I can not figure out why.
Aditya
Hi Aditya,
I tried something similiar and copied a example from core-rul.tex
The following macro use a method copied from textrule
no gotcha's
search for group(ed)(empty|argument) in cont-sys.tex
Did you mean syst-gen.tex? I tied dodoublegroupempty but it did not
work in one case (see previous post) and I can not figure out why.
Aditya
Hi Aditya,
I tried something similiar and copied a example from
On Tue, 6 Feb 2007, Hans Hagen wrote:
Aditya Mahajan wrote:
Can someone suggest a better way to do this?
I found another way, I hope that it has no gotcha's
search for group(ed)(empty|argument) in cont-sys.tex
Did you mean syst-gen.tex? I tied dodoublegroupempty but it did not
work
\command%
{\dodoubleempty\docommand}
\def\docommand[#1][#2]%
{\dodoublegroupempty{\finalcommand[#1][#2]}}
\starttext
\command
\command [1]
\command [1] {3}
\command [1] [2] {3}
\command {3}
\stoptext
which gives
1 :- (), 2 :- (), 3 :- ()
1 :- (1), 2 :- (), 3 :- ()
1 :- (1), 2 :- (), 3
][#2]#3%
{1 :- (#1), 2 :- (#2), 3 :- (#3)}
\def\command%
{\dodoubleempty\docommand}
\def\docommand[#1][#2]%
{\dodoublegroupempty{\finalcommand[#1][#2]}}
\starttext
\command
\command [1]
\command [1] {3}
\command [1] [2] {3}
\command {3}
\stoptext
which gives
1 :- (), 2
Aditya Mahajan wrote:
The syntax can be made identical (even better) than that of amsmath.
\def\xrightarrow{\dosingleempty\doxrightarrow}
\def\xleftarrow {\dosingleempty\doxleftarrow}
\def\doxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
\def\doxleftarrow[#1
\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
\def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}
\def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
\def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }
\def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1
{\dosingleempty\doxleftarrow}
\def\doxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
\def\doxleftarrow[#1]{\dodoublegroupempty\dodoxleftarrow{#1}}
\def\dodoxrightarrow#1#2{\mathrel
{{\domthxarr0359\rightarrowfill{#1}{#2
\def\dodoxleftarrow#1#2{\mathrel
{{\domthxarr3095
30 matches
Mail list logo