ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \setupheadertexts \setupfootertexts
@ 2019-08-02 18:29 Alan Braslau
  2019-08-02 19:08 ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2019-08-02 18:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

\setupheadertexts [{center}]
sets a centered header (and wipes-out any left and right header)

\setupheadertexts [{left}] [{right}]
sets the left and right headers (and keeps the centered header)

\setupheadertexts [{left odd}] [{right odd}] [{left even}] [{right even}]
sets the left and right headers for even and odd pages
(perhaps I have this backwards?)



(1) It would be useful to have
	\setupheadertexts [{left}] [{center}] [{right}]
but this does not work.
In this case, we probably also need a *six* argument version (even/odd).

(2) It would also be useful that
	\setupheadertexts [{center}]
NOT wipe-out left and right if they are set
(but I could live with this perhaps historical behavior if we were to have (1).)

(3) It is a bit messy that one must use
	\setupheader []
	\setupheader [left] [right]
*two calls* in order to have no centered header.
(Again, I could live with
	\setupheader [left] [] [right]
if we were to have (1).)


Similarly for footertexts, of course.
What is the reasoning, presently?



ALTERNATIVELY (or additionally), we could have

\setupheadertexts [center={center},
                   left={left},
                   lefteven={left, even},
                   ...]

which would be even cleaner.

Thanks,

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 18:29 \setupheadertexts \setupfootertexts Alan Braslau
@ 2019-08-02 19:08 ` Wolfgang Schuster
  2019-08-02 20:26   ` Alan Braslau
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2019-08-02 19:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau

Alan Braslau schrieb am 02.08.2019 um 20:29:
> Hello,
>
> \setupheadertexts [{center}]
> sets a centered header (and wipes-out any left and right header)
>
> \setupheadertexts [{left}] [{right}]
> sets the left and right headers (and keeps the centered header)
>
> \setupheadertexts [{left odd}] [{right odd}] [{left even}] [{right even}]
> sets the left and right headers for even and odd pages
> (perhaps I have this backwards?)
>
>
>
> (1) It would be useful to have
> 	\setupheadertexts [{left}] [{center}] [{right}]
> but this does not work.
> In this case, we probably also need a *six* argument version (even/odd).
When you use three arguments the first is used for the position of text, 
i.e. above the text, margin or edge areas.

Only six or seven arguments work in this case but this only useful in a 
double sided document.
> (2) It would also be useful that
> 	\setupheadertexts [{center}]
> NOT wipe-out left and right if they are set
> (but I could live with this perhaps historical behavior if we were to have (1).)
>
> (3) It is a bit messy that one must use
> 	\setupheader []
> 	\setupheader [left] [right]
> *two calls* in order to have no centered header.
> (Again, I could live with
> 	\setupheader [left] [] [right]
> if we were to have (1).)
>
>
> Similarly for footertexts, of course.
> What is the reasoning, presently?
>
>
>
> ALTERNATIVELY (or additionally), we could have
>
> \setupheadertexts [center={center},
>                     left={left},
>                     lefteven={left, even},
>                     ...]
>
> which would be even cleaner.
You need a new command for this because adding an assignment option can 
produce unexpected results, e.g. the example below won't work anymore.

\setupheadertexts[{\date[d=...,m=...,y=...]}]

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 19:08 ` Wolfgang Schuster
@ 2019-08-02 20:26   ` Alan Braslau
  2019-08-02 21:10     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Braslau @ 2019-08-02 20:26 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On Fri, 2 Aug 2019 21:08:00 +0200
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

Thank you



> When you use three arguments the first is used for the position of text, 
> i.e. above the text, margin or edge areas.

I know this, and I find the syntax unfortunate, to say the least.

> Only six or seven arguments work in this case but this only useful in a 
> double sided document.

Indeed, a double-sided (asymmetric) document.
And it is pretty unwieldy.

> You need a new command for this because adding an assignment option can 
> produce unexpected results, e.g. the example below won't work anymore.
> 
> \setupheadertexts[{\date[d=...,m=...,y=...]}]

Well, what would make sense?
I would have no problem dropping/ignoring this (historic) command.
How about:

\setupheader [left=,leftodd=,middle=,...]
\setupfooter

or

\setupheader [lefttext=,leftoddtext=,middletext=,...]

This would be logical.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 20:26   ` Alan Braslau
@ 2019-08-02 21:10     ` Hans Hagen
  2019-08-02 21:36       ` Wolfgang Schuster
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2019-08-02 21:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Alan Braslau, Wolfgang Schuster

On 8/2/2019 10:26 PM, Alan Braslau wrote:

> \setupheader [lefttext=,leftoddtext=,middletext=,...]
> 
> This would be logical.
we have a lot or areas ... and if you really want you can do this ...

\setuplayouttext
   [header][text]
   [lefttext=L,
    middletext=M,
    righttext=\doifoddpageelse{RO}{RE}]

\setuplayouttext
   [footer][text]
   [lefttext=L,
    middletext=M,
    righttext=\doifoddpageelse{RO}{RE}]

\setuppagenumbering
   [alternative=doublesided]

\starttext
    test \page test \page test
\stoptext

Has been there for ages ... (but I never use that method).

Hans

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 21:10     ` Hans Hagen
@ 2019-08-02 21:36       ` Wolfgang Schuster
  2019-08-02 21:59         ` Alan Braslau
  2019-08-02 22:46         ` Hans Hagen
  0 siblings, 2 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2019-08-02 21:36 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1069 bytes --]

Hans Hagen schrieb am 02.08.2019 um 23:10:
> On 8/2/2019 10:26 PM, Alan Braslau wrote:
>
>> \setupheader [lefttext=,leftoddtext=,middletext=,...]
>>
>> This would be logical.
> we have a lot or areas ... and if you really want you can do this ...
>
> \setuplayouttext
>   [header][text]
>   [lefttext=L,
>    middletext=M,
>    righttext=\doifoddpageelse{RO}{RE}]
>
> \setuplayouttext
>   [footer][text]
>   [lefttext=L,
>    middletext=M,
>    righttext=\doifoddpageelse{RO}{RE}]
>
> \setuppagenumbering
>   [alternative=doublesided]
>
> \starttext
>    test \page test \page test
> \stoptext
>
> Has been there for ages ... (but I never use that method).
I has the same question a few years ago but I never used it
because it has a few limitations like missing style/color support.

\setuplayouttext[header][text][lefttext=L,middletext=M,righttext=R]

%\setupheadertexts[M]
%\setupheadertexts[L][R]

\setupheader
   [color=red,style=bold]

\setuppagenumbering
   [alternative=doublesided]

\starttext
\dorecurse{2}{\page[dummy]}
\stoptext

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1623 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 21:36       ` Wolfgang Schuster
@ 2019-08-02 21:59         ` Alan Braslau
  2019-08-02 22:23           ` Hans Hagen
  2019-08-02 22:31           ` Hans Hagen
  2019-08-02 22:46         ` Hans Hagen
  1 sibling, 2 replies; 9+ messages in thread
From: Alan Braslau @ 2019-08-02 21:59 UTC (permalink / raw)
  To: Wolfgang Schuster, Hans Hagen; +Cc: mailing list for ConTeXt users

On Fri, 2 Aug 2019 23:36:47 +0200
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> > we have a lot or areas ... and if you really want you can do this ...
> >
> > \setuplayouttext
> >
> > Has been there for ages ... (but I never use that method).  
>
> I has the same question a few years ago but I never used it
> because it has a few limitations like missing style/color support.

I am looking for a simple and obvious way of setting header and footer
texts. The \setupheadertexts has limitations and I view this as
historical, for ConTeXt commands have evolved over time usually towards
better solutions, even if we leave in place for reasons of backward
compatibility habits that can be hard to quit.

One example is \setuppapersize [page=letter,paper=letter]
(sorry, and I *do* much prefer A4).
This is, I believe, far superior to \setuppapersize [letter] [letter]


Do you find that keys in \setupheader make sense? If so, what choice?
(as we like to limit the proliferation of key names).

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 21:59         ` Alan Braslau
@ 2019-08-02 22:23           ` Hans Hagen
  2019-08-02 22:31           ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2019-08-02 22:23 UTC (permalink / raw)
  To: Alan Braslau, Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 8/2/2019 11:59 PM, Alan Braslau wrote:
> On Fri, 2 Aug 2019 23:36:47 +0200
> Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
>>> we have a lot or areas ... and if you really want you can do this ...
>>>
>>> \setuplayouttext
>>>
>>> Has been there for ages ... (but I never use that method).
>>
>> I has the same question a few years ago but I never used it
>> because it has a few limitations like missing style/color support.
> 
> I am looking for a simple and obvious way of setting header and footer
> texts. The \setupheadertexts has limitations and I view this as
> historical, for ConTeXt commands have evolved over time usually towards
> better solutions, even if we leave in place for reasons of backward
> compatibility habits that can be hard to quit.

What limitations? \foo[{sometext}] is not that different from 
\foo[text={sometext}] and often I do

\setupheadertexts[\setups[header}]

\startsetups
   lots of stuff
\stopsetups

because you don't want to add all kind of stuff in a value.

> One example is \setuppapersize [page=letter,paper=letter]
> (sorry, and I *do* much prefer A4).
> This is, I believe, far superior to \setuppapersize [letter] [letter]

A matter of taste but we're not going to drop something ... that kind of 
compatibility has always been a principle. If one has few docs it's no 
problem to adapt a few styles but it's a no go otherwise (and I'm not 
even speaking of adapting all kind of manuals, examples, etc etc.)

And for most of those commands there are k/v varianst too.

(\setuppapersize actually takes lists as page setups can be more complex 
than just 'letter')

(But I'm willing to remove the command that I know you hate most, namely 
{ {foo} \over {bar} }.)

> Do you find that keys in \setupheader make sense? If so, what choice?
> (as we like to limit the proliferation of key names).
\setupheader is used for styling and such, not for content.

Hans

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 21:59         ` Alan Braslau
  2019-08-02 22:23           ` Hans Hagen
@ 2019-08-02 22:31           ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2019-08-02 22:31 UTC (permalink / raw)
  To: Alan Braslau, Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 8/2/2019 11:59 PM, Alan Braslau wrote:
> On Fri, 2 Aug 2019 23:36:47 +0200
> Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> 
>>> we have a lot or areas ... and if you really want you can do this ...
>>>
>>> \setuplayouttext
>>>
>>> Has been there for ages ... (but I never use that method).
>>
>> I has the same question a few years ago but I never used it
>> because it has a few limitations like missing style/color support.
> 
> I am looking for a simple and obvious way of setting header and footer
> texts. The \setupheadertexts has limitations and I view this as
> historical, for ConTeXt commands have evolved over time usually towards
> better solutions, even if we leave in place for reasons of backward
> compatibility habits that can be hard to quit.
> 
> One example is \setuppapersize [page=letter,paper=letter]
> (sorry, and I *do* much prefer A4).
> This is, I believe, far superior to \setuppapersize [letter] [letter]
> 
> 
> Do you find that keys in \setupheader make sense? If so, what choice?
> (as we like to limit the proliferation of key names).
actually there is not really a \setupheader as these are shortcuts to a 
few kind of generic commands that set up properties of these areas (a 
matrix) on the one hand, and set the content with a different command

(also, this part of context is quite optimized deep down because 
checking 25 areas for all possible properties each page flush is costly, 
so it would be a major rewrite with little gain; it would also mean 
dropping \setuphead etc and using one command for everything ... not 
something i want to do in the middle of other transitions like 
mkiv->mkxl and such)

hans

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: \setupheadertexts \setupfootertexts
  2019-08-02 21:36       ` Wolfgang Schuster
  2019-08-02 21:59         ` Alan Braslau
@ 2019-08-02 22:46         ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2019-08-02 22:46 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users

On 8/2/2019 11:36 PM, Wolfgang Schuster wrote:
> Hans Hagen schrieb am 02.08.2019 um 23:10:
>> On 8/2/2019 10:26 PM, Alan Braslau wrote:
>>
>>> \setupheader [lefttext=,leftoddtext=,middletext=,...]
>>>
>>> This would be logical.
>> we have a lot or areas ... and if you really want you can do this ...
>>
>> \setuplayouttext
>>   [header][text]
>>   [lefttext=L,
>>    middletext=M,
>>    righttext=\doifoddpageelse{RO}{RE}]
>>
>> \setuplayouttext
>>   [footer][text]
>>   [lefttext=L,
>>    middletext=M,
>>    righttext=\doifoddpageelse{RO}{RE}]
>>
>> \setuppagenumbering
>>   [alternative=doublesided]
>>
>> \starttext
>>    test \page test \page test
>> \stoptext
>>
>> Has been there for ages ... (but I never use that method).
> I has the same question a few years ago but I never used it
> because it has a few limitations like missing style/color support.
> 
> \setuplayouttext[header][text][lefttext=L,middletext=M,righttext=R]
> 
> %\setupheadertexts[M]
> %\setupheadertexts[L][R]
> 
> \setupheader
>    [color=red,style=bold]
> 
> \setuppagenumbering
>    [alternative=doublesided]
> 
> \starttext
> \dorecurse{2}{\page[dummy]}
> \stoptext
I can look into that but only when there is no speed penalty

Hans

-----------------------------------------------------------------
                                           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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-08-02 22:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 18:29 \setupheadertexts \setupfootertexts Alan Braslau
2019-08-02 19:08 ` Wolfgang Schuster
2019-08-02 20:26   ` Alan Braslau
2019-08-02 21:10     ` Hans Hagen
2019-08-02 21:36       ` Wolfgang Schuster
2019-08-02 21:59         ` Alan Braslau
2019-08-02 22:23           ` Hans Hagen
2019-08-02 22:31           ` Hans Hagen
2019-08-02 22:46         ` 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).