show header text only on first page of chapter
Hello again, in my current magazine layout I’m abusing the part structure as a rubric, i.e. the part title shows up only in the header and in the ToC. That works nicely so far, but I must show the rubric header only on the first page of a chapter (article). Which approach would you suggest? In my experience, it’s hard to find the right place for \setupheader(texts) so that it affects the right page(s). Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
Am 2018-02-20 um 12:30 schrieb Henning Hraban Ramm
Hello again,
in my current magazine layout I’m abusing the part structure as a rubric, i.e. the part title shows up only in the header and in the ToC. That works nicely so far, but I must show the rubric header only on the first page of a chapter (article).
Which approach would you suggest? In my experience, it’s hard to find the right place for \setupheader(texts) so that it affects the right page(s).
I tried something like: \def\SetPart{% \setlayerframed[background]% [y=10mm,x=20mm,]% {\getmarking[part]} } \setuphead[chapter][after={\SetPart}] But I always get the name of the previous part. :( Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
\definetext[henning][header][chapter] \setuphead[chapter][header=henning] \starttext \dorecurse{5} {\expanded{\chapter{Kapitel \recurselevel}} \dorecurse{10}{\input{lorem}\par}} \stoptext Wolfgang
Henning Hraban Ramm mailto:texml@fiee.net 20. Februar 2018 um 15:30
I tried something like:
\def\SetPart{% \setlayerframed[background]% [y=10mm,x=20mm,]% {\getmarking[part]} } \setuphead[chapter][after={\SetPart}]
But I always get the name of the previous part. :(
Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Hi Wolfgang,
thank you very much - does that mean it’s not possible to use the part title?
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
Am 2018-02-20 um 17:17 schrieb Wolfgang Schuster
\definetext[henning][header][chapter]
\setuphead[chapter][header=henning]
\starttext
\dorecurse{5} {\expanded{\chapter{Kapitel \recurselevel}} \dorecurse{10}{\input{lorem}\par}}
\stoptext
Wolfgang
Henning Hraban Ramm 20. Februar 2018 um 15:30
I tried something like:
\def\SetPart{% \setlayerframed[background]% [y=10mm,x=20mm,]% {\getmarking[part]} } \setuphead[chapter][after={\SetPart}]
But I always get the name of the previous part. :(
Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD
___________________________________________________________________________________ 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 ___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Henning Hraban Ramm mailto:texml@fiee.net 20. Februar 2018 um 17:35 Hi Wolfgang, thank you very much - does that mean it’s not possible to use the part title?
\definetext[henning][header][part] \setuphead[part][placehead=empty] \setuphead[chapter][header=henning] \starttext \dorecurse{3} {\expanded{\part{Rubrik \recurselevel}} \dorecurse{5} {\expanded{\chapter{Kapitel \recurselevel}} \dorecurse{10}{\input{lorem}\par}}} \stoptext Wolfgang
Thank you, but I don’t know how to use that in my setup.
Since my rubric has to be in a defined place and I didn’t manage to achieve that with header setups, I used \setlayer with \getmarking[part]
Would that defined text behave differently than the part "marker"? And how do I get at that?
Since I must complete that damned layout tonight, I’ll resolve to setting the rubric manually. :(
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
Am 2018-02-20 um 17:56 schrieb Wolfgang Schuster
Henning Hraban Ramm 20. Februar 2018 um 17:35 Hi Wolfgang, thank you very much - does that mean it’s not possible to use the part title?
\definetext[henning][header][part]
\setuphead[part][placehead=empty]
\setuphead[chapter][header=henning]
\starttext
\dorecurse{3} {\expanded{\part{Rubrik \recurselevel}} \dorecurse{5} {\expanded{\chapter{Kapitel \recurselevel}} \dorecurse{10}{\input{lorem}\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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Hi, Why does not work "rulecolor" in my example below ? it keeps the color of textcolor... The other options of setcolumns (background...) work well but I fail on that one.Have I understood everything? I am able to use ConTexT enough. Take a look at my little newspaper http://gulliver77.org/gulinfo/ I did not find any information in "Context the manual" about rulecolor and I did not find anything on the internet. Thanks for the help ! and thanks to "google translate" :-D G. ps : I'm trying to write a brief notice in French %---- exemple basique ------- \enableregime[utf-8] \mainlanguage[fr] \setupcolors[state=start,textcolor=blue] \setupcolumns[n=2,rule=on,rulecolor=red] \starttext \startcolumns \input tufte \stopcolumns \stoptext
On 23. Feb 2018, at 12:04, Gerard
wrote: Why does not work "rulecolor" in my example below ? it keeps the color of textcolor...
The other options of setcolumns (background...) work well but I fail on that one. Have I understood everything?
If you look into the source (page-mul.mkiv), there is no key “rulecolor” for \setupcolumns. I don’t think that the color can be set separately? Thomas
Thanks Thomas, I use Texworks with Context (pdftex)... With the code below, I get the text in blue and separator in red. See the command \setupcolors[textcolor=red] and \color[blue] before \startcolumns. Gérard ------- exemple basique----- \enableregime[utf-8] \mainlanguage[fr] \setupcolors[state=start,textcolor=blue] \setupcolumns[n=2,rule=on,rulecolor=red] \starttext \setupcolors[textcolor=red] \color[blue] \startcolumns \input tufte \stopcolumns \stoptext Le 23/02/2018 à 13:23, Schmitz Thomas A. a écrit :
On 23. Feb 2018, at 12:04, Gerard
wrote: Why does not work "rulecolor" in my example below ? it keeps the color of textcolor...
The other options of setcolumns (background...) work well but I fail on that one. Have I understood everything?
If you look into the source (page-mul.mkiv), there is no key “rulecolor” for \setupcolumns. I don’t think that the color can be set separately?
Thomas ___________________________________________________________________________________ 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 ___________________________________________________________________________________
I tried to add the example to the garden, but at least there it doesn’t work:
http://wiki.contextgarden.net/Columns
As soon as I use \setupcolors, I get only a single column or the example doesn’t compile at all. Strange.
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD
Am 2018-02-23 um 13:50 schrieb Gerard
Thanks Thomas,
I use Texworks with Context (pdftex)...
With the code below, I get the text in blue and separator in red. See the command \setupcolors[textcolor=red] and \color[blue] before \startcolumns.
Gérard
------- exemple basique----- \enableregime[utf-8] \mainlanguage[fr] \setupcolors[state=start,textcolor=blue]
\setupcolumns[n=2,rule=on,rulecolor=red] \starttext \setupcolors[textcolor=red] \color[blue] \startcolumns \input tufte \stopcolumns \stoptext
Le 23/02/2018 à 13:23, Schmitz Thomas A. a écrit :
On 23. Feb 2018, at 12:04, Gerard
wrote: Why does not work "rulecolor" in my example below ? it keeps the color of textcolor...
The other options of setcolumns (background...) work well but I fail on that one. Have I understood everything?
If you look into the source (page-mul.mkiv), there is no key “rulecolor” for \setupcolumns. I don’t think that the color can be set separately?
Thomas ___________________________________________________________________________________ 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
___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Henning Hraban Ramm mailto:texml@fiee.net 23. Februar 2018 um 14:38 I tried to add the example to the garden, but at least there it doesn’t work: http://wiki.contextgarden.net/Columns
As soon as I use \setupcolors, I get only a single column or the example doesn’t compile at all. Strange.
The garden uses MkIV where \color expects a argument (i.e. \color[<name>]{<argument>}). Below is a example how you can add a colored rule to \startcolumns but the better solution is to switch to MkIV and and use mixedcolumns environment which has a option to change the color of the rule between the columns. \enableregime[utf-8] \mainlanguage[fr] \setupcolors[state=start] % \unexpanded\def\ColumnsRule % {\bgroup % \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax % \color[red]{\vrule width\linewidth}% % \hskip\dimexpr(1.5\bodyfontsize+\linewidth)/2\relax % \egroup} \definemeasure[columndistance][2em] \setupcolumns[distance=\measure{columndistance}] \unexpanded\def\ColumnsRule {\bgroup \hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax \color[red]{\vrule width\linewidth}% \hskip\dimexpr(\measure{columndistance}+\linewidth)/2\relax \egroup} \setupcolumns[rule=\ColumnsRule] \starttext \startcolumns \input tufte \stopcolumns \stoptext Wolfgang
participants (4)
-
Gerard
-
Henning Hraban Ramm
-
Schmitz Thomas A.
-
Wolfgang Schuster