* setupnarrower and startnarrower
@ 2013-08-06 13:11 Alan BRASLAU
2013-08-06 13:27 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Alan BRASLAU @ 2013-08-06 13:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hello,
Could (should) startnarrower be modified to accept setup assignments?
As in:
\startnarrower [before=\blank,after=\blank]
or
\startnarrower [left=3cm] [left]
etc.
Alan
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 13:11 setupnarrower and startnarrower Alan BRASLAU
@ 2013-08-06 13:27 ` Wolfgang Schuster
2013-08-06 14:09 ` Alan BRASLAU
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-08-06 13:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 06.08.2013 um 15:11 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
> Hello,
>
> Could (should) startnarrower be modified to accept setup assignments?
> As in:
>
> \startnarrower [before=\blank,after=\blank]
>
> or
>
> \startnarrower [left=3cm] [left]
>
> etc.
\usemodule[annotation]
\defineannotation[NARROW][alternative=narrow]
\starttext
\input ward
\startNARROW[leftmargin=3cm]
\input ward
\stopNARROW
\input ward
\startNARROW[rightmargin=2cm]
\input ward
\stopNARROW
\input ward
\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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 13:27 ` Wolfgang Schuster
@ 2013-08-06 14:09 ` Alan BRASLAU
2013-08-06 14:39 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Alan BRASLAU @ 2013-08-06 14:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thank you Wolfgang, but I was wondering about the standard \startnarrower.
Many (some) commands allow setup assignments, the use of which overides but does not change the default. This is a very useful feature of ConTeXt that suggest could be generalized. \startnarrower is but one example.
Alan
On Tue, 6 Aug 2013 15:27:16 +0200
Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
>
> Am 06.08.2013 um 15:11 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>
> > Hello,
> >
> > Could (should) startnarrower be modified to accept setup assignments?
> > As in:
> >
> > \startnarrower [before=\blank,after=\blank]
> >
> > or
> >
> > \startnarrower [left=3cm] [left]
> >
> > etc.
>
>
> \usemodule[annotation]
>
> \defineannotation[NARROW][alternative=narrow]
>
> \starttext
>
> \input ward
>
> \startNARROW[leftmargin=3cm]
> \input ward
> \stopNARROW
>
> \input ward
>
> \startNARROW[rightmargin=2cm]
> \input ward
> \stopNARROW
>
> \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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 14:09 ` Alan BRASLAU
@ 2013-08-06 14:39 ` Wolfgang Schuster
2013-08-06 15:53 ` Aditya Mahajan
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-08-06 14:39 UTC (permalink / raw)
To: Alan BRASLAU; +Cc: mailing list for ConTeXt users
Am 06.08.2013 um 16:09 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
> Thank you Wolfgang, but I was wondering about the standard \startnarrower.
>
> Many (some) commands allow setup assignments, the use of which overides but does not change the default. This is a very useful feature of ConTeXt that suggest could be generalized. \startnarrower is but one example.
Changing the command is simple but I would drop the second
argument when you want to change the left/right etc. values
because you can say “left=4cm” etc. to get the desired margins.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 14:39 ` Wolfgang Schuster
@ 2013-08-06 15:53 ` Aditya Mahajan
2013-08-06 16:05 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2013-08-06 15:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 977 bytes --]
On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>
> Am 06.08.2013 um 16:09 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>
>> Thank you Wolfgang, but I was wondering about the standard \startnarrower.
>>
>> Many (some) commands allow setup assignments, the use of which overides but does not change the default. This is a very useful feature of ConTeXt that suggest could be generalized. \startnarrower is but one example.
>
> Changing the command is simple but I would drop the second
> argument when you want to change the left/right etc. values
> because you can say “left=4cm” etc. to get the desired margins.
startnarrower has a weird interface. Ideally, it should just support
keywords:
\startnarrower
[
leftmargin=...,
rightmargin=...,
alternative=(left|right|both),
spacebefore=....,
spaceafter=....,
indenting=....,
indentnext=....,
before=....,
after=....,
]
Aditya
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 15:53 ` Aditya Mahajan
@ 2013-08-06 16:05 ` Wolfgang Schuster
2013-08-06 16:14 ` Aditya Mahajan
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-08-06 16:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 06.08.2013 um 17:53 schrieb Aditya Mahajan <adityam@umich.edu>:
> On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>
>>
>> Am 06.08.2013 um 16:09 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>>
>>> Thank you Wolfgang, but I was wondering about the standard \startnarrower.
>>>
>>> Many (some) commands allow setup assignments, the use of which overides but does not change the default. This is a very useful feature of ConTeXt that suggest could be generalized. \startnarrower is but one example.
>>
>> Changing the command is simple but I would drop the second
>> argument when you want to change the left/right etc. values
>> because you can say “left=4cm” etc. to get the desired margins.
>
> startnarrower has a weird interface. Ideally, it should just support keywords:
>
> \startnarrower
> [
> leftmargin=...,
> rightmargin=...,
> alternative=(left|right|both),
> spacebefore=....,
> spaceafter=....,
> indenting=....,
> indentnext=....,
> before=....,
> after=....,
> ]
That’s more or less what I use for the “narrow” alternative in the annotation module.
I would prefer such a parameter driven narrower environment myself (do we even need
the left, middle and right option when we can set absolute margins) but keeping the current
interface for backwards compatibility make things a little bit ugly.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 16:05 ` Wolfgang Schuster
@ 2013-08-06 16:14 ` Aditya Mahajan
2013-08-07 20:59 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Aditya Mahajan @ 2013-08-06 16:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1861 bytes --]
On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>
> Am 06.08.2013 um 17:53 schrieb Aditya Mahajan <adityam@umich.edu>:
>
>> On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>>
>>>
>>> Am 06.08.2013 um 16:09 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>>>
>>>> Thank you Wolfgang, but I was wondering about the standard \startnarrower.
>>>>
>>>> Many (some) commands allow setup assignments, the use of which overides but does not change the default. This is a very useful feature of ConTeXt that suggest could be generalized. \startnarrower is but one example.
>>>
>>> Changing the command is simple but I would drop the second
>>> argument when you want to change the left/right etc. values
>>> because you can say “left=4cm” etc. to get the desired margins.
>>
>> startnarrower has a weird interface. Ideally, it should just support keywords:
>>
>> \startnarrower
>> [
>> leftmargin=...,
>> rightmargin=...,
>> alternative=(left|right|both),
>> spacebefore=....,
>> spaceafter=....,
>> indenting=....,
>> indentnext=....,
>> before=....,
>> after=....,
>> ]
>
> That’s more or less what I use for the “narrow” alternative in the annotation module.
>
> I would prefer such a parameter driven narrower environment myself (do we even need
> the left, middle and right option when we can set absolute margins) but keeping the current
> interface for backwards compatibility make things a little bit ugly.
Haven't we broken backward compatibility for other environments as well?
\startlinenumbering immediately comes to mind where the MkII interface was
\startlinenumbering[continue]
and the current interface is
\startlinenumbering[continue=yes]
I, for one, think that it is OK to break backward compatibility for more
elegance and consistency.
Aditya
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: setupnarrower and startnarrower
2013-08-06 16:14 ` Aditya Mahajan
@ 2013-08-07 20:59 ` Hans Hagen
0 siblings, 0 replies; 8+ messages in thread
From: Hans Hagen @ 2013-08-07 20:59 UTC (permalink / raw)
To: ntg-context
On 8/6/2013 6:14 PM, Aditya Mahajan wrote:
> On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>
>>
>> Am 06.08.2013 um 17:53 schrieb Aditya Mahajan <adityam@umich.edu>:
>>
>>> On Tue, 6 Aug 2013, Wolfgang Schuster wrote:
>>>
>>>>
>>>> Am 06.08.2013 um 16:09 schrieb Alan BRASLAU <alan.braslau@cea.fr>:
>>>>
>>>>> Thank you Wolfgang, but I was wondering about the standard
>>>>> \startnarrower.
>>>>>
>>>>> Many (some) commands allow setup assignments, the use of which
>>>>> overides but does not change the default. This is a very useful
>>>>> feature of ConTeXt that suggest could be generalized.
>>>>> \startnarrower is but one example.
>>>>
>>>> Changing the command is simple but I would drop the second
>>>> argument when you want to change the left/right etc. values
>>>> because you can say “left=4cm” etc. to get the desired margins.
>>>
>>> startnarrower has a weird interface. Ideally, it should just support
>>> keywords:
>>>
>>> \startnarrower
>>> [
>>> leftmargin=...,
>>> rightmargin=...,
>>> alternative=(left|right|both),
>>> spacebefore=....,
>>> spaceafter=....,
>>> indenting=....,
>>> indentnext=....,
>>> before=....,
>>> after=....,
>>> ]
>>
>> That’s more or less what I use for the “narrow” alternative in the
>> annotation module.
>>
>> I would prefer such a parameter driven narrower environment myself (do
>> we even need
>> the left, middle and right option when we can set absolute margins)
>> but keeping the current
>> interface for backwards compatibility make things a little bit ugly.
>
> Haven't we broken backward compatibility for other environments as well?
> \startlinenumbering immediately comes to mind where the MkII interface was
>
> \startlinenumbering[continue]
>
> and the current interface is
>
> \startlinenumbering[continue=yes]
>
> I, for one, think that it is OK to break backward compatibility for more
> elegance and consistency.
\startnarrower with its interface is one of the oldest commands which
also means that it's used in our styles
however, we already have \startnarrow and i extended that one to accept
a few more combinations:
\showframe
\definenarrower[whatever][left=3cm,right=2cm,default=left]
\starttext
\input ward
\startnarrower[2*left] \input ward \stopnarrower
\input ward
\startnarrow[whatever] \input ward \stopnarrow
\input ward
\startnarrow[whatever][right] \input ward \stopnarrow
\input ward
\startnarrow[whatever][default=middle] \input ward \stopnarrow
\input ward
\startnarrow[whatever][default=middle,middle=-1cm] \input ward \stopnarrow
\input ward
\startnarrow[default=middle] \input ward \stopnarrow
\input ward
\stoptext
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-07 20:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 13:11 setupnarrower and startnarrower Alan BRASLAU
2013-08-06 13:27 ` Wolfgang Schuster
2013-08-06 14:09 ` Alan BRASLAU
2013-08-06 14:39 ` Wolfgang Schuster
2013-08-06 15:53 ` Aditya Mahajan
2013-08-06 16:05 ` Wolfgang Schuster
2013-08-06 16:14 ` Aditya Mahajan
2013-08-07 20:59 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).