Re: [NTG-context] no indent after blank

2010-08-03 Thread Wolfgang Schuster

 Am 03.08.10 02:17, schrieb Hans Hagen:
I also need to add \detokenized...parameter an maybe more. But at 
least we have something to discuss (apart from \ namespaces).


Can you also extend the defintion of the \setup... command to allow 
environment lists, e.g.


\setup...[one,two][..=..]

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-08-02 Thread Hans Hagen

On 2-8-2010 9:09, Wolfgang Schuster wrote:


you forgot the comma before '##2'.


Ok, fixed. I also need to add \detokenized...parameter an maybe more. 
But at least we have something to discuss (apart from \ namespaces).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-08-02 Thread Wolfgang Schuster

 Am 02.08.10 16:41, schrieb Hans Hagen:

there is an experimental mult-aux.mkiv file in the beta


looks interesting, can't test it today but there a few things which are 
not right


\unexpanded\def\doinstallparameterhandler#1#2#3#4#5#6#7#8#9% \??aa 
{whatever} \current..

  {\def#3##1{\csname#6{#1#2}{##1}\endcsname}%
   \def#4##1{#7{#1#2}{##1}}%
-  \def#5##1##2{\csname#6{#1##2}{##1}\endcsname}%
+  \def#5##1##2{\csname#6{#1##1}{##2}\endcsname}%
   
\def#6##1##2{\ifcsname##1##2\endcsname##1##2\else\expandafter#8\csname##1\s!parent\endcsname{##2}\fi}%
   \def#7##1##2{\ifcsname##1##2\endcsname   
##1\else\expandafter#9\csname##1\s!parent\endcsname{##2}\fi}%

   \def#8##1##2{\ifx##1\relax\s!empty\else#6{##1}{##2}\fi}%
   \def#9##1##2{\ifx##1\relax\else#7{##1}{##2}\fi}}

For \named...parameter it's better to use the first argument the name of 
the environment

and the second for the key, e.g. \namedwhateverparameter{command}{width}


Here

\unexpanded\def\doinstallcommandhandler#1#2#3#4#5#6#7#8%
  {...
   \def#5[##1][##2]%
 {\edef#4{##1}%
  \ifsecondargument
\getparameters[#1#4][\s!parent=#1##2]%
  \else
\getparameters[#1#4][\s!parent=#3]%
  \fi
   ...}

you forgot the comma before '##2'.

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-08-02 Thread Hans Hagen

On 31-7-2010 3:00, Aditya Mahajan wrote:

On Sat, 31 Jul 2010, Hans Hagen wrote:


[1] http://bitbucket.org/wolfs/fancybreak/src


I'll have a more detailed look at it later (remind me that we need to
formalize this \ namespace for modules issue; we might need \???
for the core soon as we run out of \??'s).


I have started use \??whatever?? to avoid clashing with Wolfgang :-)


As you write nice and clean modules that are perfect examples for
others, we should take some time at the context conference and see if
we can derive some 'module writing conventions'.


+1


I wonder if I should finaly make a definer for \fancybreakparameter
like cases. I had one once but it looked quite horrible and there are
subtle differences between all cases but I'll give it a try some day
soon.


Wolfgang taught me how to use them and now I use
(http://github.com/adityam/filter/blob/master/t-filter.tex)

\def\externalfilterparameter
#1{\csname\docheckparentparameter{\??externalfilter??\currentexternalfilter}#1\endcsname}


\def\docheckparentparameter
#1#2{\ifcsname#1#2\endcsname#1#2\else\expandafter\redocheckparentparameter\csname#1\s!parent\endcsname#2\fi}


\def\redocheckparentparameter#1#2{\ifx#1\relax\s!empty\else\docheckparentparameter#1#2\fi}


I am pretty sure this does not cover all the situations that arise in
the core.


there is an experimental mult-aux.mkiv file in the beta

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-31 Thread Hans Hagen

On 31-7-2010 10:01, Wolfgang Schuster wrote:


You mean \installparameterhandler in str-def.mkiv?

The macro is interesting but three arguments are enough because 'framed'
part is always the same in the parameter commands.


indeed, but i need to think about some variants as well, as there are 
differences in parent resolving (or something like that) ... eventually 
we will have this parent chain in all comands i guess (less hash space 
wasted but a bit slower but normally that's not the bottleneck)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-31 Thread Wolfgang Schuster

 Am 31.07.10 00:50, schrieb Hans Hagen:

[1] http://bitbucket.org/wolfs/fancybreak/src


I'll have a more detailed look at it later (remind me that we need to 
formalize this \ namespace for modules issue; we might need \??? 
for the core soon as we run out of \??'s).


I wonder what the side effects of \everyvbox are as the next box 
content can have vboxes itself (ok, you can do an everyvbox\emptytoks 
inside the \everyvbox); maybe \dowithnextboxcontent can be used here


I changed it now to \dowithnextbox and it works as well, the main 
purpose of the macro is to insert
a symbol between paragraphs but it's true you can't know how other 
people misuse the function.

Another convention could be

\doifmode\s!mkiv{\let\dosetfancybreakattributes\gobbletwoarguments}

so that you then get (less testing):

   \dowithnextboxcontent
 {\setupalign[\fancybreakparameter\c!align]%
  \dosetfancybreakattributes\c!style\c!color}%
 {\blank[\fancybreakparameter\c!spacebefore]%
  \flushnextbox


Done although it has to be \doifmode\v!mkii ;)
As you write nice and clean modules that are perfect examples for 
others, we should take some time at the context conference and see if 
we can derive some 'module writing conventions'.


I want to use this module myself to present how to include macros to 
document a modules source (%M, %D etc.).
I wonder if I should finaly make a definer for \fancybreakparameter 
like cases. I had one once but it looked quite horrible and there are 
subtle differences between all cases but I'll give it a try some day soon.

You mean \installparameterhandler in str-def.mkiv?

The macro is interesting but three arguments are enough because 'framed' 
part is always the same in the parameter commands.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-30 Thread Aditya Mahajan

On Sat, 31 Jul 2010, Hans Hagen wrote:


 [1] http://bitbucket.org/wolfs/fancybreak/src


I'll have a more detailed look at it later (remind me that we need to 
formalize this \ namespace for modules issue; we might need \??? for the 
core soon as we run out of \??'s).


I have started use \??whatever?? to avoid clashing with Wolfgang :-)

As you write nice and clean modules that are perfect examples for others, we 
should take some time at the context conference and see if we can derive some 
'module writing conventions'.


+1

I wonder if I should finaly make a definer for \fancybreakparameter like 
cases. I had one once but it looked quite horrible and there are subtle 
differences between all cases but I'll give it a try some day soon.


Wolfgang taught me how to use them and now I use
(http://github.com/adityam/filter/blob/master/t-filter.tex)

\def\externalfilterparameter 
#1{\csname\docheckparentparameter{\??externalfilter??\currentexternalfilter}#1\endcsname}


\def\docheckparentparameter 
#1#2{\ifcsname#1#2\endcsname#1#2\else\expandafter\redocheckparentparameter\csname#1\s!parent\endcsname#2\fi}


\def\redocheckparentparameter#1#2{\ifx#1\relax\s!empty\else\docheckparentparameter#1#2\fi}

I am pretty sure this does not cover all the situations that arise in the 
core.


Aditya
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-30 Thread Hans Hagen

Hi Wolfgang,


Am 30.07.10 18:37, schrieb Henning Hraban Ramm:

(latest beta MkIV)

With
\setupindenting[yes, medium]
there shouldn't be an indent after a \blank IMO.

How can I suppress it?

\setupindenting[yes,medium]
\starttext
\input knuth
\blank
\noindentation\input ward
\stoptext

or you use my fancybreak [1] module:

\usemodule[fancybreak]
\setupindenting[yes,medium]
\setupfancybreak[indentnext=no]
\starttext
\input knuth
\fancybreak
\input ward
\stoptext

[1] http://bitbucket.org/wolfs/fancybreak/src


I'll have a more detailed look at it later (remind me that we need to 
formalize this \ namespace for modules issue; we might need \??? for 
the core soon as we run out of \??'s).


I wonder what the side effects of \everyvbox are as the next box content 
can have vboxes itself (ok, you can do an everyvbox\emptytoks inside the 
\everyvbox); maybe \dowithnextboxcontent can be used here


\def\dodofancybreak
  {\begingroup
   \everyvbox
 {\setupalign[\fancybreakparameter\c!align]%
  \doifmode\s!mkiv{\dosetfancybreakattributes\c!style\c!color}}%
   \dowithnextbox
 {\blank[\fancybreakparameter\c!spacebefore]%
  \flushnextbox
  \blank[\fancybreakparameter\c!spaceafter]%
  \checknextindentation[\fancybreakparameter\c!indentnext]%
  \dorechecknextindentation
  \endgroup}
 \normalvbox}

so:

   \dowithnextboxcontent
 {\setupalign[\fancybreakparameter\c!align]%
  \doifmode\s!mkiv{\dosetfancybreakattributes\c!style\c!color}}%
 {\blank[\fancybreakparameter\c!spacebefore]%
  \flushnextbox

Another convention could be

\doifmode\s!mkiv{\let\dosetfancybreakattributes\gobbletwoarguments}

so that you then get (less testing):

   \dowithnextboxcontent
 {\setupalign[\fancybreakparameter\c!align]%
  \dosetfancybreakattributes\c!style\c!color}%
 {\blank[\fancybreakparameter\c!spacebefore]%
  \flushnextbox

As you write nice and clean modules that are perfect examples for 
others, we should take some time at the context conference and see if we 
can derive some 'module writing conventions'.


I wonder if I should finaly make a definer for \fancybreakparameter like 
cases. I had one once but it looked quite horrible and there are subtle 
differences between all cases but I'll give it a try some day soon.


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-30 Thread Henning Hraban Ramm

Am 2010-07-30 um 22:55 schrieb Wolfgang Schuster:


Am 30.07.10 18:37, schrieb Henning Hraban Ramm:

(latest beta MkIV)

With
\setupindenting[yes, medium]
there shouldn't be an indent after a \blank IMO.

How can I suppress it?

\setupindenting[yes,medium]
\starttext
\input knuth
\blank
\noindentation\input ward
\stoptext


Yes, I tried that. I should have asked "how can I suppress it  
*generally*".

Like in
\def\Gap{\blank[big]\noindent}


or you use my fancybreak [1] module:

\usemodule[fancybreak]
\setupindenting[yes,medium]
\setupfancybreak[indentnext=no]
\starttext
\input knuth
\fancybreak
\input ward
\stoptext

[1] http://bitbucket.org/wolfs/fancybreak/src



Great, works like expected. Thank you!
(I'll probably need fancy breaks anyway...)

Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] no indent after blank

2010-07-30 Thread Wolfgang Schuster

 Am 30.07.10 18:37, schrieb Henning Hraban Ramm:

(latest beta MkIV)

With
\setupindenting[yes, medium]
there shouldn't be an indent after a \blank IMO.

How can I suppress it?

\setupindenting[yes,medium]
\starttext
\input knuth
\blank
\noindentation\input ward
\stoptext

or you use my fancybreak [1] module:

\usemodule[fancybreak]
\setupindenting[yes,medium]
\setupfancybreak[indentnext=no]
\starttext
\input knuth
\fancybreak
\input ward
\stoptext

[1] http://bitbucket.org/wolfs/fancybreak/src

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] no indent after blank

2010-07-30 Thread Henning Hraban Ramm

(latest beta MkIV)

With
\setupindenting[yes, medium]
there shouldn't be an indent after a \blank IMO.

How can I suppress it?


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___