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
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.
(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
Only six or seven arguments work in this case but this only useful in a double sided document. produce unexpected results, e.g. the example below won't work anymore. \setupheadertexts[{\date[d=...,m=...,y=...]}] Wolfgang
On Fri, 2 Aug 2019 21:08:00 +0200
Wolfgang Schuster
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
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 -----------------------------------------------------------------
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
On Fri, 2 Aug 2019 23:36:47 +0200
Wolfgang Schuster
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
On 8/2/2019 11:59 PM, Alan Braslau wrote:
On Fri, 2 Aug 2019 23:36:47 +0200 Wolfgang Schuster
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 -----------------------------------------------------------------
On 8/2/2019 11:59 PM, Alan Braslau wrote:
On Fri, 2 Aug 2019 23:36:47 +0200 Wolfgang Schuster
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 -----------------------------------------------------------------
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 -----------------------------------------------------------------
participants (3)
-
Alan Braslau
-
Hans Hagen
-
Wolfgang Schuster