Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I’m so so sorry for yet another message in this thread. I’ve solved it, but 
still don’t quite understand why it works. I post the solution here so that 
nobody has to spend any time crafting the solution. But I still have 1 key 
question.

Key question: Why does \setwhitespace[line] prevent \blank[-0.5em] from working 
after a \framed?

(Ok. I better sleep before I pollute the mailing list further.)

Apparent Solution:

\usecolors[xwi]
\setupwhitespace[line]

\starttext
\definetextbackground[secondary][
  location=always,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]

\input knuth

{

\blank[line]

\setupwhitespace[none]

\startnarrower
  \dontleavehmode\framed[
width=local, corner=03, background=color, backgroundcolor=cyan,
frame=off
  ]{My header!}

  \blank[-0.5em]

  \startsecondary
  {

  \setupwhitespace[line]

\input knuth

  }
  \stopsecondary
\stopnarrower

}

\input knuth
\stoptext


> On Aug 21, 2019, at 10:21 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Ok, last message in this topic, I promise. I’ve crafted a MWE.
> 
> If I \setupwhitespace[line], the \blank[-0.5em] stops working. I’m sure I 
> need to revise my TeX notes. For now, can somebody give me a little 
> encouragement and tell me the answer? :-P
> 
> \usecolors[xwi]
> % \setupwhitespace[line]
> 
> \starttext
> \definetextbackground[secondary][
>   location=always,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
> 
> \input knuth
> 
> \startnarrower
>   \dontleavehmode\framed[
> width=local, corner=03, background=color, backgroundcolor=cyan,
> frame=off
>   ]{My header!}
> 
>   \blank[-0.5em]
> 
>   \startsecondary
> \input knuth
>   \stopsecondary
> \stopnarrower
> 
> \input knuth
> \stoptext
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 9:37 PM, Jon Wong > > wrote:
>> 
>> Hi all,
>> 
>> Ah, found the solution in TextBackground. At here: 
>> https://www.contextgarden.net/TextBackground 
>> 
>> 
>> Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
>> TextBackgrounds, zero vspace between them)?
>> 
>> For the top segment, I want rounded corners only for top corners (corner=03 
>> with \framed).
>> 
>> Seems I really should dig into MetaFun and TextBackground. Looks really fun 
>> and useful.
>> 
>> Sorry for the noise. Am a little carried away exploring the Garden. :-P
>> 
>> Regards
>> Jon
>> 
>> 
>>> On Aug 21, 2019, at 9:25 PM, Jon Wong >> > wrote:
>>> 
>>> Hi all,
>>> 
>>> Sorry, my solution didn’t work.
>>> 
>>> My purpose of using \startnarrower is to have some paragraphs of text 
>>> inside the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
>>> 
>>> \startframedtext doesn’t have as many border options as \framed.
>>> 
>>> Should I use overlays? Or layers? It seems layers require absolutely 
>>> positioning, and can’t be logically contained inside a \startnarrower?
>>> 
>>> Regards
>>> Jon
>>> 
>>> 
 On Aug 21, 2019, at 8:53 PM, Jon Wong >>> > wrote:
 
 Hi all,
 
 I got some progress!
 
 \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
 \startnarrower
 \dontleavehmode\framed[width=local]{testing}
 
 Since this works for left offset: \framed[width=local]{testing}
 \endnarrower
 
 So, how do I do a gradient background? Yeah, I know I have to dive into 
 MetaPost and MetaFun some time. Is that where the solution is?
 
 Regards
 Jon
 
> On Aug 21, 2019, at 8:14 PM, Jon Wong  > wrote:
> 
> Hi all,
> 
> I want to have a \startnarrower effect. But I also want that segment to 
> have a border (hopefully a gradient background color too!).
> 
> I tried:
> 
> \startnarrower
> \framed{testing}
> 
> Seems framed doesn’t observe startnarrower commands.
> \endnarrower
> 
> How do I achieve that?
> 
> Regards
> Jon
 
>>> 
>> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Ok, last message in this topic, I promise. I’ve crafted a MWE.

If I \setupwhitespace[line], the \blank[-0.5em] stops working. I’m sure I need 
to revise my TeX notes. For now, can somebody give me a little encouragement 
and tell me the answer? :-P

\usecolors[xwi]
% \setupwhitespace[line]

\starttext
\definetextbackground[secondary][
  location=always,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]

\input knuth

\startnarrower
  \dontleavehmode\framed[
width=local, corner=03, background=color, backgroundcolor=cyan,
frame=off
  ]{My header!}

  \blank[-0.5em]

  \startsecondary
\input knuth
  \stopsecondary
\stopnarrower

\input knuth
\stoptext

Regards
Jon


> On Aug 21, 2019, at 9:37 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Ah, found the solution in TextBackground. At here: 
> https://www.contextgarden.net/TextBackground 
> 
> 
> Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
> TextBackgrounds, zero vspace between them)?
> 
> For the top segment, I want rounded corners only for top corners (corner=03 
> with \framed).
> 
> Seems I really should dig into MetaFun and TextBackground. Looks really fun 
> and useful.
> 
> Sorry for the noise. Am a little carried away exploring the Garden. :-P
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 9:25 PM, Jon Wong > > wrote:
>> 
>> Hi all,
>> 
>> Sorry, my solution didn’t work.
>> 
>> My purpose of using \startnarrower is to have some paragraphs of text inside 
>> the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
>> 
>> \startframedtext doesn’t have as many border options as \framed.
>> 
>> Should I use overlays? Or layers? It seems layers require absolutely 
>> positioning, and can’t be logically contained inside a \startnarrower?
>> 
>> Regards
>> Jon
>> 
>> 
>>> On Aug 21, 2019, at 8:53 PM, Jon Wong >> > wrote:
>>> 
>>> Hi all,
>>> 
>>> I got some progress!
>>> 
>>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>>> \startnarrower
>>> \dontleavehmode\framed[width=local]{testing}
>>> 
>>> Since this works for left offset: \framed[width=local]{testing}
>>> \endnarrower
>>> 
>>> So, how do I do a gradient background? Yeah, I know I have to dive into 
>>> MetaPost and MetaFun some time. Is that where the solution is?
>>> 
>>> Regards
>>> Jon
>>> 
 On Aug 21, 2019, at 8:14 PM, Jon Wong >>> > wrote:
 
 Hi all,
 
 I want to have a \startnarrower effect. But I also want that segment to 
 have a border (hopefully a gradient background color too!).
 
 I tried:
 
 \startnarrower
 \framed{testing}
 
 Seems framed doesn’t observe startnarrower commands.
 \endnarrower
 
 How do I achieve that?
 
 Regards
 Jon
>>> 
>> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Ah, found the solution in TextBackground. At here: 
https://www.contextgarden.net/TextBackground 


Can I have a 2-segment (2 vboxes) TextBackground (presumably with 2 
TextBackgrounds, zero vspace between them)?

For the top segment, I want rounded corners only for top corners (corner=03 
with \framed).

Seems I really should dig into MetaFun and TextBackground. Looks really fun and 
useful.

Sorry for the noise. Am a little carried away exploring the Garden. :-P

Regards
Jon


> On Aug 21, 2019, at 9:25 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> Sorry, my solution didn’t work.
> 
> My purpose of using \startnarrower is to have some paragraphs of text inside 
> the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.
> 
> \startframedtext doesn’t have as many border options as \framed.
> 
> Should I use overlays? Or layers? It seems layers require absolutely 
> positioning, and can’t be logically contained inside a \startnarrower?
> 
> Regards
> Jon
> 
> 
>> On Aug 21, 2019, at 8:53 PM, Jon Wong  wrote:
>> 
>> Hi all,
>> 
>> I got some progress!
>> 
>> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
>> \startnarrower
>> \dontleavehmode\framed[width=local]{testing}
>> 
>> Since this works for left offset: \framed[width=local]{testing}
>> \endnarrower
>> 
>> So, how do I do a gradient background? Yeah, I know I have to dive into 
>> MetaPost and MetaFun some time. Is that where the solution is?
>> 
>> Regards
>> Jon
>> 
>>> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
>>> 
>>> Hi all,
>>> 
>>> I want to have a \startnarrower effect. But I also want that segment to 
>>> have a border (hopefully a gradient background color too!).
>>> 
>>> I tried:
>>> 
>>> \startnarrower
>>> \framed{testing}
>>> 
>>> Seems framed doesn’t observe startnarrower commands.
>>> \endnarrower
>>> 
>>> How do I achieve that?
>>> 
>>> Regards
>>> Jon
>> 
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

Sorry, my solution didn’t work.

My purpose of using \startnarrower is to have some paragraphs of text inside 
the \framed. Unfortunately, it seems \framed doesn’t take paragraphs.

\startframedtext doesn’t have as many border options as \framed.

Should I use overlays? Or layers? It seems layers require absolutely 
positioning, and can’t be logically contained inside a \startnarrower?

Regards
Jon


> On Aug 21, 2019, at 8:53 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> I got some progress!
> 
> \setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
> \startnarrower
>  \dontleavehmode\framed[width=local]{testing}
> 
>  Since this works for left offset: \framed[width=local]{testing}
> \endnarrower
> 
> So, how do I do a gradient background? Yeah, I know I have to dive into 
> MetaPost and MetaFun some time. Is that where the solution is?
> 
> Regards
> Jon
> 
>> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
>> 
>> Hi all,
>> 
>> I want to have a \startnarrower effect. But I also want that segment to have 
>> a border (hopefully a gradient background color too!).
>> 
>> I tried:
>> 
>> \startnarrower
>> \framed{testing}
>> 
>> Seems framed doesn’t observe startnarrower commands.
>> \endnarrower
>> 
>> How do I achieve that?
>> 
>> Regards
>> Jon
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I got some progress!

\setupnarrower[left=2cm, right=2cm] % what does middle do, actually?
\startnarrower
  \dontleavehmode\framed[width=local]{testing}

  Since this works for left offset: \framed[width=local]{testing}
\endnarrower

So, how do I do a gradient background? Yeah, I know I have to dive into 
MetaPost and MetaFun some time. Is that where the solution is?

Regards
Jon

> On Aug 21, 2019, at 8:14 PM, Jon Wong  wrote:
> 
> Hi all,
> 
> I want to have a \startnarrower effect. But I also want that segment to have 
> a border (hopefully a gradient background color too!).
> 
> I tried:
> 
> \startnarrower
>  \framed{testing}
> 
>  Seems framed doesn’t observe startnarrower commands.
> \endnarrower
> 
> How do I achieve that?
> 
> Regards
> Jon

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] startnarrower and framed?

2019-08-21 Thread Hans Hagen

On 8/21/2019 2:14 PM, Jon Wong wrote:

\startnarrower
   \framed{testing}

   Seems framed doesn’t observe startnarrower commands.
\endnarrower

\starttext

Seems framed doesn’t observe startnarrower commands.

\startnarrower
\dontleavehmode \framed{testing}

Seems framed doesn’t observe startnarrower commands.

\startlinecorrection
\dontleavehmode \framed{testing}
\stoplinecorrection
\stopnarrower

\stoptext

for gradients, see metafun and example sin test suite

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] startnarrower and framed?

2019-08-21 Thread Jon Wong
Hi all,

I want to have a \startnarrower effect. But I also want that segment to have a 
border (hopefully a gradient background color too!).

I tried:

\startnarrower
  \framed{testing}

  Seems framed doesn’t observe startnarrower commands.
\endnarrower

How do I achieve that?

Regards
Jon
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \startnarrower

2018-12-20 Thread Wolfgang Schuster



Hans van der Meer schrieb am 20.12.18 um 14:15:

Wolfgang,

Your solution works, but repeats after every \par. The purpose was to 
have the very first line only as the one without the indent. I tried 
several parameters from \definedelimitedtext and from \setupindenting, 
but could not achieve that result.
Below an example that exhibits the behaviour I am looking for, but at 
the expense of a \setupindentig roughly after the first \par.

Is there a better solution?

\definedelimitedtext
   [narrowtext]
   [leftmargin=2em,
    indenting={yes,-2em},
    ]

\showframe [text] [text]

\starttext

\startdelimitedtext [narrowtext]
This is a text meant to make a long paragraph such that it stretches 
over more than one line when typeset for example on an A4 page in order 
to demonstrate the behaviour of definedelimitedtext.

%\setupindenting[no] works here too
\par
\setupindenting[no]
This is a text meant to make a long paragraph such that it stretches 
over more than one line when typeset for example on an A4 page in order 
to demonstrate the behaviour of definedelimitedtext.

\par
\stopdelimitedtext

\stoptext


\definehspace [outdent] [-2em]

\definedelimitedtext
  [narrowtext]
  [leftmargin=2em,
   rightmargin=0pt,
   location=paragraph,
   left={\dontleavehmode\hspace[outdent]}]

\showframe [text] [text]

\starttext

\startdelimitedtext [narrowtext]
This is a text meant to make a long paragraph such that it stretches 
over more than one line when typeset for example on an A4 page in order 
to demonstrate the behaviour of definedelimitedtext.


This is a text meant to make a long paragraph such that it stretches 
over more than one line when typeset for example on an A4 page in order 
to demonstrate the behaviour of definedelimitedtext.

\stopdelimitedtext

\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] \startnarrower

2018-12-13 Thread Wolfgang Schuster

Hans van der Meer schrieb am 13.12.18 um 12:15:

Is it possible to not indent the very first line of narrower content?

Thus
\startnarrower
first line
second line
etc.
\stopnarrower

resulting in:
first line
    second line
    etc.

Use a negative value for the indentation of the paragraph.

When you use the delimitedtext environment instead of narrower you can
do it with the indenting key.

\definedelimitedtext
  [narrowtext]
  [leftmargin=2em,
   indenting={yes,-2em}]

\showframe [text] [text]

\starttext

\startdelimitedtext [narrowtext]
\samplefile{zapf}
\stopdelimitedtext

\stoptext

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] \startnarrower

2018-12-13 Thread Hans van der Meer
Is it possible to not indent the very first line of narrower content?

Thus
\startnarrower
first line
second line
etc.
\stopnarrower

resulting in:
first line
second line
etc.

dr. Hans van der Meer


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Rudolf Bahr
On Wed, Jan 22, 2014 at 11:20:45PM +0100, Wolfgang Schuster wrote:
 
 Hi Rudolf,  
 
 what you try doesn’t work because the narrower environment and the list 
 alternative you use try to change the same internal register for the distance 
 from the left margin. What you have to do is to write your own layout for the 
 section entries in the TOC because this way you don’t reset the margins added 
 by \startnarrower.  
 
 Wolfgang
 

Hello Wolfgang,

ok, I shall look for a workaround. Thank you for your explanation!

Rudolf

___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/22/2014 11:20 PM, Wolfgang Schuster wrote:


Hi Rudolf,

what you try doesn’t work because the narrower environment and the list
alternative you use try to change the same internal register for the
distance from the left margin. What you have to do is to write your own
layout for the section entries in the TOC because this way you don’t
reset the margins added by \startnarrower.

Wolfgang




we can do this:

\startsetups[\??listrenderings:abc]
\endgraf % are we grouped?
\advance\leftskip\listparameter\c!margin % after \endgraf !

but it needs testing

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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Wolfgang Schuster
2014/1/23 Hans Hagen pra...@wxs.nl


 we can do this:

 \startsetups[\??listrenderings:abc]
 \endgraf % are we grouped?
 \advance\leftskip\listparameter\c!margin % after \endgraf !

 but it needs testing



I don’t think this is an option because it will change the layout of the
TOC in many existing documents.

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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl


we can do this:

\startsetups[\??__listrenderings:abc]
 \endgraf % are we grouped?
 \advance\leftskip\__listparameter\c!margin % after \endgraf !

but it needs testing


I don’t think this is an option because it will change the layout of the
TOC in many existing documents.


i wonder how many people have narrower around it ...

-
  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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Hans Hagen

On 1/23/2014 10:24 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl

On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl
mailto:pra...@wxs.nl mailto:pra...@wxs.nl


 we can do this:

 \startsetups[\??listrenderings:abc]

  \endgraf % are we grouped?
  \advance\leftskip\listparameter\c!margin % after
\endgraf !


 but it needs testing


I don’t think this is an option because it will change the
layout of the
TOC in many existing documents.


i wonder how many people have narrower around it ...



The layout will also change when you have chapter, sections etc. with
alternative a–c
because each new entry in the list will increase the left margin.


hm, we can catch that if needed, but indeed it needs thinking / checking

-
  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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-23 Thread Wolfgang Schuster
2014/1/23 Hans Hagen pra...@wxs.nl

 On 1/23/2014 10:03 PM, Wolfgang Schuster wrote:

 2014/1/23 Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl


 we can do this:

 \startsetups[\??__listrenderings:abc]

  \endgraf % are we grouped?
  \advance\leftskip\__listparameter\c!margin % after \endgraf !


 but it needs testing


 I don’t think this is an option because it will change the layout of the
 TOC in many existing documents.


 i wonder how many people have narrower around it ...



The layout will also change when you have chapter, sections etc. with
alternative a–c
because each new entry in the list will increase the left margin.

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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-22 Thread Rudolf Bahr

Hello listmembers,

ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2014.1.6

I'm typesetting a book in A4 landscape and would like to indent the TOC
at both sides. I tried two solutions which both didn't work as expected.

1. attempt with \startnarrower[left,right] 
\completecontent[pageboundaries={0.1.1.5}] \stopnarrower:
   The output of the following minimalistic example is partly attached as .pdf 
file. I shortened there
   the textheight to 80mm.
   a.) I would expect the TOC to be midaligned. But it isn't. It is leftaligned.
   b.) I would expect the TOC stopped after the 5th subsection row at page 
bottom and to be
   continued at the next page due to [pageboundaries={0.1.1.5}]. But it 
isn't.

2. attempt with 
\line{\hfill\vbox{\hsize=.75\hsize\completecontent[pageboundaries={0.1.1.5}]}\hfill},
   outcommented in the following example. The TOC is really indented at both 
sides, but
   it doesn't stop at all at page bottom.

Something must be wrong here. But what?

Regards,

Rudolf Bahr

-8
\setuppapersize[A4,landscape]
\setuplayout[backspace=27.5mm,topspace=20mm,height=80mm,width=242mm,footer=5mm,header=8mm,margin=18mm]

\setuplayout [location=middle, marking=on, margindistance=3mm]

\setuppagenumbering[alternative=singlesided,
location={footer, margin},
style=bold,
command=\midaligned]
\setupheader[text][after=\hrule]

\setupbodyfont[default]

\definebodyfontswitch [xvii] [17.3pt]
\definebodyfontswitch [xiv]  [14.4pt]
\definebodyfontswitch [xii]  [12pt]

\setupheadtext[content=\rm\xvii\bf Inhaltsverzeichnis]
\definelist[chapter]
\setuplist[chapter]   [style=\rm\xvii\bf, pagenumber=no]

\definelist[section]
\setuplist[section]   [margin=1.5em, style=\rm\xiv\bf, pagenumber=no]

\definelist[subsection]
\setuplist[subsection][margin=3.0em, style=\rm\xii, alternative=c]

\setuphead[chapter]   [header=empty, style=\rm\xvii\bf, number=no, 
align=middle, textstyle=\rm\xvii\bf]
\setuphead[section]   [header=empty, style=\rm\xiv\bf,  number=no, align=middle]
\setuphead[subsection][header=empty, style=\rm\xii\bf,  number=no. align=middle]

\showframe

\setupnarrower[left=.125\hsize,right=.125\hsize]
 % -

\starttext

%\line{\hfill\vbox{\hsize=.75\hsize\completecontent[pageboundaries={0.1.1.5}]}\hfill}
\startnarrower[left,right] \completecontent[pageboundaries={0.1.1.5}] 
\stopnarrower  % -

\chapter{2010}
\section{My Home Is My Castle}

\subsection{A}
Here we are in subsection A.
\subsection{B}
Here we are in subsection B.
\subsection{C}
Here we are in subsection C.
\subsection{D}
Here we are in subsection D.
\subsection{E}
Here we are in subsection E.
\subsection{F}
Here we are in subsection F.
\subsection{G}
Here we are in subsection G.
\subsection{H}
Here we are in subsection H.
\subsection{I}
Here we are in subsection I.

\stoptext
-8



1_pdfsam_test.pdf
Description: Adobe PDF document
___
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] \startnarrower[left, right] \completecontent[pageboundaries={0.1.1.5}] \stopnarrower

2014-01-22 Thread Wolfgang Schuster

Hi Rudolf,  

what you try doesn’t work because the narrower environment and the list 
alternative you use try to change the same internal register for the distance 
from the left margin. What you have to do is to write your own layout for the 
section entries in the TOC because this way you don’t reset the margins added 
by \startnarrower.  

Wolfgang


On 22.01.2014 12:05:33, Rudolf Bahr qu...@quasi.de wrote:  
Hello listmembers,

ConTeXt ver: 2013.05.28 00:36 MKIV current fmt: 2014.1.6

I'm typesetting a book in A4 landscape and would like to indent the TOC
at both sides. I tried two solutions which both didn't work as expected.

1. attempt with \startnarrower[left,right] 
\completecontent[pageboundaries={0.1.1.5}] \stopnarrower:
The output of the following minimalistic example is partly attached as .pdf 
file. I shortened there
the textheight to 80mm.
a.) I would expect the TOC to be midaligned. But it isn't. It is leftaligned.
b.) I would expect the TOC stopped after the 5th subsection row at page bottom 
and to be
continued at the next page due to [pageboundaries={0.1.1.5}]. But it isn't.

2. attempt with 
\line{\hfill\vbox{\hsize=.75\hsize\completecontent[pageboundaries={0.1.1.5}]}\hfill},
outcommented in the following example. The TOC is really indented at both 
sides, but
it doesn't stop at all at page bottom.

Something must be wrong here. But what?

Regards,

Rudolf Bahr  ___
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] \startnarrower and ToC

2013-02-07 Thread Markus Finke

Hi,

\startnarrower doesn’t work for the left margin in lists. What is wrong 
in my minimal example?


TIA!




\starttext

\startnarrower [5*middle]   % 5*left,5*right
\placecontent [criterium=local]
\stopnarrower

\part{First part}
\chapter{Chapter one}
\chapter{Chapter two}
\chapter{Chapter three}

\stoptext
___
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] \startnarrower and ToC

2013-02-07 Thread Marco Patzer
On 2013–02–07 Markus Finke wrote:

 \startnarrower doesn’t work for the left margin in lists. What is
 wrong in my minimal example?

I did not check why it doesn't work. But to add a left margin you
can use:

\setuplist [margin=3cm]


Marco


signature.asc
Description: Digital signature
___
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] \startnarrower and ToC

2013-02-07 Thread Wolfgang Schuster

Am 07.02.2013 um 13:22 schrieb Marco Patzer home...@lavabit.com:

 On 2013–02–07 Markus Finke wrote:
 
 \startnarrower doesn’t work for the left margin in lists. What is
 wrong in my minimal example?
 
 I did not check why it doesn't work. But to add a left margin you
 can use:
 
 \setuplist [margin=3cm]

Both environments use the same register to indent the content
and the list overwrites the narrower value.

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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hi,

my goal is to make a table that is as wide as the current \startnarrower ... 
\stopnarrower part (thanks to the answer to this question on 
tex.stackexchange.com:  http://tex.stackexchange.com/q/3381/243 )


--
\starttext
\startnarrower

\input tufte

\bTABLE[option=stretch]
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
\eTABLE

\stopnarrower


\stoptext
--

Can I make the table exactly as wide as the text?


Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 10:14 schrieb Patrick Gundlach:

 Hi,
 
 my goal is to make a table that is as wide as the current \startnarrower ... 
 \stopnarrower part (thanks to the answer to this question on 
 tex.stackexchange.com:  http://tex.stackexchange.com/q/3381/243 )
 
 
 --
 \starttext
 \startnarrower
 
 \input tufte

\startlinecorrection \dontleavehmode
\bTABLE[option=stretch,textwidth=\localhsize]

 \bTABLE[option=stretch]
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \bTR \bTD 2 \eTD \bTD 3 \eTD \eTR
 \eTABLE

\stoplinecorrection

 \stopnarrower
 
 \stoptext
 --
 
 Can I make the table exactly as wide as the text?

Use the “textwidth” key but keep in mind with the linecorrection you can
use split tables, for tables which use indent from \startnarrower and
split across pages you can use tabulate.

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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hello Wolfgang,



 Use the “textwidth” key but keep in mind with the linecorrection you can
 use split tables, for tables which use indent from \startnarrower and
 split across pages you can use tabulate.

I am afraid I don't get the full meaning of your answer. When I use tabulate, I 
have exactly the same problem as I have with TABLEs:

-
\starttext
\startnarrower

\input tufte

\starttabulate[|l|l|]
\HL
\NC format  \NC meaning \NC\NR
\HL
\NC c   \NC centered\NC\NR
\NC l   \NC left aligned\NC\NR
\NC r   \NC right aligned   \NC\NR
\NC w(1cm)  \NC one line, fixed width   \NC\NR
\NC p(2cm)  \NC paragraph, lines broken to fixed width  \NC\NR
\NC cg(.)   \NC align on a character\NC\NR
\HL
\stoptabulate
\stopnarrower


\stoptext
-

(and I couldn't find a key from setuptabulate that changes the width of the 
table)

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 10:48 schrieb Patrick Gundlach:

 Hello Wolfgang,
 
 
 
 Use the “textwidth” key but keep in mind with the linecorrection you can
 use split tables, for tables which use indent from \startnarrower and
 split across pages you can use tabulate.
 
 I am afraid I don't get the full meaning of your answer. When I use tabulate, 
 I have exactly the same problem as I have with TABLEs:

Sorry but i don’t know what you mean, in my example the tabulate has the same
width as the text in the narrower environment.

\starttext

\input knuth

\startnarrower

\input knuth

\starttabulate[|p|p|]
\NC \input ward \NC \input zapf \NC\NR
\stoptabulate

\stopnarrower

\stoptext

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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach
Hello Wolfgang,

 Sorry but i don’t know what you mean, in my example the tabulate has the same
 width as the text in the narrower environment.

Insert an \HL and you'll see that this a bit strange.

 
 \starttext
 
 \input knuth
 
 \startnarrower
 
 \input knuth
 
 \starttabulate[|p|p|]

\HL

 \NC \input ward \NC \input zapf \NC\NR
 \stoptabulate
 
 \stopnarrower
 
 \stoptext

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 11:00 schrieb Patrick Gundlach:

 Hello Wolfgang,
 
 Sorry but i don’t know what you mean, in my example the tabulate has the same
 width as the text in the narrower environment.
 
 Insert an \HL and you'll see that this a bit strange.

You can use \HR, it has more spacing before and after the line
but it works correct in narrower text and itemize.

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] \startnarrower and TABLEs

2010-09-23 Thread Patrick Gundlach


 You can use \HR, it has more spacing before and after the line
 but it works correct in narrower text and itemize.


Sorry for the stupid question, but how do I use \HR?

\starttabulate[|p|p|]
\HR
\NC \input ward \NC \input zapf \NC\NR
\HR
\stoptabulate


gives me a misplaced noalign.

Patrick

___
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] \startnarrower and TABLEs

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 11:27 schrieb Patrick Gundlach:

 You can use \HR, it has more spacing before and after the line
 but it works correct in narrower text and itemize.
 
 
 Sorry for the stupid question, but how do I use \HR?
 
 \starttabulate[|p|p|]
 \HR
 \NC \input ward \NC \input zapf \NC\NR
 \HR
 \stoptabulate
 
 
 gives me a misplaced noalign.

Make a bug report, your example works with mkii but fails with mkiv.

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] \startnarrower as \abstract in LaTeX and bottom layer as footnote without markers

2010-08-12 Thread Xan

Hi,

I try to duplicate this [http://arxiv.org/abs/0901.1458] article to 
ConTeXt. The original article was written in LaTeX. I have to troubles 
in this duplication:


- abstract: I emulate LaTeX abstract environment with \startnarrower 
... \stopnarrower, as this 
[http://wiki.contextgarden.net/Article_Abstracts] wiki page suggests. 
But I see that the space between lines is much bigger in ConTeXt than 
LaTeX and that if we put $n^2$ for example in abstract, ConTeXt displays 
too big, as a normal text, instead of LaTeX where all is \small sized.


- for the other hand, I want to put a layer as a footnote without 
markers. In the original article it begins with Date:  How can I 
achieve that?


- Finally, I want to put my name and title alternatively in the 
headertexts, in odd and even pages. How can I do that?



Anyone could help me?

Thanks a lot,
Xan.

PS: Please CC-me.
___
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] \startnarrower as \abstract in LaTeX and bottom layer as footnote without markers

2010-08-12 Thread Wolfgang Schuster

Am 12.08.10 17:29, schrieb Xan:

Hi,

I try to duplicate this [http://arxiv.org/abs/0901.1458] article to
ConTeXt. The original article was written in LaTeX. I have to troubles
in this duplication:

- abstract: I emulate LaTeX abstract environment with \startnarrower
... \stopnarrower, as this
[http://wiki.contextgarden.net/Article_Abstracts] wiki page suggests.
But I see that the space between lines is much bigger in ConTeXt than
LaTeX and that if we put $n^2$ for example in abstract, ConTeXt displays
too big, as a normal text, instead of LaTeX where all is \small sized.

- for the other hand, I want to put a layer as a footnote without
markers. In the original article it begins with Date:  How can I
achieve that?

- Finally, I want to put my name and title alternatively in the
headertexts, in odd and even pages. How can I do that?



\definedelimitedtext
 [abstract]
 [leftmargin=yes,
  spacebefore=line,
  before=\smallbodyfont]

\setupheadertexts[\midaligned{Title}][][\midaligned{Ben Lee User}][]

\starttext

\footnotetext[-]{Date: \currentdate}

\startabstract
\WORD{Abstract:} \input ward
\stopabstract

\dorecurse{10}{\input knuth\par}

\stoptext

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] startnarrower

2009-10-03 Thread Wolfgang Schuster

Hi Hans,

here is a new attempt to get a more generalized version of the  
startnarrower macros, now mkiv only.


Wolfgang

\unprotect

\def\narrowerparameter  #1{\csname\donarrowerparameter{\??sl 
\@@narrower}#1\endcsname}
\def\donarrowerparameter  #1#2{\ifcsname#1#2\endcsname#1#2\else 
\expandafter\donarrowerparentparameter\csname#1\s!parent\endcsname#2\fi}
\def\donarrowerparentparameter#1#2{\ifx#1\relax\s!empty\else 
\donarrowerparameter#1#2\fi}


\getparameters
  [\??sl]
  [\c!before=\endgraf,
   \c!after=\endgraf,
   \c!left=1.5em,
   \c!right=1.5em,
   \c!middle=1.5em]

\def\definenarrower
  {\dodoubleempty\dodefinenarrower}

\def\dodefinenarrower[#1][#2]%
  {\getparameters[\??sl#1][\s!parent=\??sl,#2]%
   \setvalue{\e!start#1}{\dodoubleempty\dostartnarrower[#1]}%
   \setvalue{\e!stop #1}{\dostopnarrower}}

\def\setupnarrower
  {\dodoubleempty\dosetupnarrower}

\def\dosetupnarrower[#1][#2]%
  {\doifelsenothing{#2}
 {\getparameters[\??sl][#1]}
 {\def\docommand##1{\getparameters[\??sl##1][#2]}%
  \processcommacommand[#1]\docommand}}

\definenarrowermethod[\v!left   ]{\global\advance\ctxleftskip   
\narrowerparameter\c!left  \relax}
\definenarrowermethod[\v!middle ]{\global\advance\ctxmidskip
\narrowerparameter\c!middle\relax}
\definenarrowermethod[\v!right  ]{\global\advance\ctxrightskip  
\narrowerparameter\c!right \relax}
\definenarrowermethod[-\v!left  ]{\global\advance\ctxleftskip - 
\narrowerparameter\c!left  \relax}
\definenarrowermethod[-\v!middle]{\global\advance\ctxmidskip  - 
\narrowerparameter\c!middle\relax}
\definenarrowermethod[-\v!right ]{\global\advance\ctxrightskip- 
\narrowerparameter\c!right \relax}

\definenarrowermethod[\v!reset  ]{\global\ctxleftskip \zeropoint
  \global\ctxmidskip  \zeropoint
  \global\ctxrightskip\zeropoint\relax}
\definenarrowermethod[\v!none   ]{}

\def\dostartnarrower[#1][#2]%
  {\bgroup
   \ifsecondargument % \doifsomethingelse{#2}?
 \dodostartnarrower[#1][#2]%
   \else
 \dodostartnarrower[#1][\v!middle]%
   \fi}

\def\dodostartnarrower[#1][#2]%
  {\edef\@@narrower{#1}%
   \narrowerparameter\c!before
   \global\ctxleftskip \zeropoint
   \global\ctxrightskip\zeropoint
   \global\ctxmidskip  \zeropoint
   \processcommalistwithparameters[#2]\donarrower
   \advance\leftskip \dimexpr\ctxleftskip +\ctxmidskip\relax
   \advance\rightskip\dimexpr\ctxrightskip+\ctxmidskip\relax
   \seteffectivehsize}

\def\dostopnarrower
  {\narrowerparameter\c!after
   \egroup}

\def\v!narrower{narrower}

\definenarrower[\v!narrower]

\protect

\definenarrower[wide]  [before={\blank[2*line]},after={\blank 
[2*line]},middle=0.5em]
\definenarrower[narrow][before={\blank[4*line]},after={\blank 
[4*line]},middle=4.0em]


\starttext

\input ward

\startnarrower
\input ward\endgraf
\stopnarrower

\input ward

\startnarrow
\input ward\endgraf
\stopnarrow

\input ward

\startwide
\input ward\endgraf
\stopwide

\input ward

\stoptext

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___