Re: [NTG-context] \autoinsertedspace fails

2023-01-05 Thread Hans Hagen via ntg-context
unexpanded BD   \BDParentrue   \dodoublegroupempty   \doBD \stoptexdefinition \starttexdefinition unexpanded BDNP   \BDParenfalse   \dodoublegroupempty   \doBD \stoptexdefinition \starttexdefinition doBD #1#2    \removeunwantedspaces

Re: [NTG-context] \autoinsertedspace fails

2023-01-05 Thread Rik Kabel via ntg-context
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

Re: [NTG-context] \autoinsertedspace fails

2023-01-04 Thread Rik Kabel via ntg-context
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

[NTG-context] \autoinsertedspace fails

2022-12-29 Thread Rik Kabel via ntg-context
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

[NTG-context] \autoinsertedspace fails following \nbsp under LMTX

2022-11-16 Thread Rik Kabel via ntg-context
380: Attempt to node.direct.remove() a non-existing node %<-- \starttexdefinition unexpanded New   \dodoublegroupempty   \doNew \stoptexdefinition \starttexdefinition doNew #1#2    \removeunwantedspaces    \ (#

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-24 Thread Hans Hagen
% 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

Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
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

Re: [NTG-context] about \startMPanimation

2019-05-13 Thread Hans Hagen
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

[NTG-context] about \startMPanimation

2019-05-13 Thread Jeong Dal
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

Re: [NTG-context] Conditional float references

2013-09-24 Thread Robert Blackstone
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

[NTG-context] Conditional float references

2013-09-22 Thread Marco Patzer
/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

Re: [NTG-context] Referring to multiple elements

2012-09-28 Thread Marco Patzer
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

Re: [NTG-context] prevent gobbling of spaces when omitting optional argument

2011-01-29 Thread Wolfgang Schuster
]% {[#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

Re: [NTG-context] Using defaults and indexes

2009-01-21 Thread Wolfgang Schuster
\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

Re: [NTG-context] Using defaults and indexes

2009-01-21 Thread 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

Re: [NTG-context] Using defaults and indexes

2009-01-21 Thread Wolfgang Schuster
#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

Re: [NTG-context] description fails on \if

2008-03-27 Thread Wolfgang Schuster
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

Re: [NTG-context] description fails on \if

2008-03-26 Thread Wolfgang Schuster
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

Re: [NTG-context] description fails on \if

2008-03-26 Thread Hans van der Meer
\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

Re: [NTG-context] description fails on \if

2008-03-26 Thread Hans Hagen
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

[NTG-context] error in textbackground with metapost

2007-07-18 Thread Hans van der Meer
=mpos:par:c... \dodoublegroupempty #1-\def \dodogetargument ## 1{\def \dodogetargument {\do... \dohandleMPpositiongraphicrange ...ositiongraphic {#3}{#4}\fi \fi ... l.29 third line ? Process aborted

Re: [NTG-context] ConTeXt Marcro Quesiton

2007-02-08 Thread Aditya Mahajan
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

Re: [NTG-context] ConTeXt Marcro Quesiton

2007-02-07 Thread Wolfgang Schuster
) 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

Re: [NTG-context] ConTeXt Marcro Quesiton

2007-02-07 Thread Hans Hagen
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

Re: [NTG-context] ConTeXt Marcro Quesiton

2007-02-06 Thread Aditya Mahajan
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

[NTG-context] ConTeXt Marcro Quesiton

2007-02-05 Thread Aditya Mahajan
\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

Re: [NTG-context] ConTeXt Marcro Quesiton

2007-02-05 Thread Aditya Mahajan
][#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

Re: [NTG-context] extentable arrows

2006-06-29 Thread Hans Hagen
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

Re: [NTG-context] extentable arrows

2006-06-29 Thread Hans Hagen
\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow} \def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow} \def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow} \def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow } \def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1

Re: [NTG-context] extentable arrows

2006-06-28 Thread Aditya Mahajan
{\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