[NTG-context] Chapter cover page
Alex Leray
alexandre at stdin.fr
Thu Feb 23 22:14:57 CET 2023
Hi Bruce, and thanks for your answer.
In the end, I think a combination of `insidesection` and `placehead`
does what I want:
###
\setuphead[interview][
placehead=hidden,
insidesection={\setup{interview:cover}},
]
###
I'll test it harder in the coming days!
Alex
Le 23/02/23 à 14:24, Bruce Horrocks via ntg-context a écrit :
> Hi Alex,
>
> I couldn't get it to work with \tabulate so I switched to TABLE instead. The workaround for the horizontal mode problem is to put the chapter title into row two of the table. Hopefully this works with your actual text. Also I'm not sure where \layoutcolumnwidth is coming from so I just hard-coded a width for now. Lastly there are neater ways (using \setuptable) to define the table but it's just an example...
>
> \define[2]\MyChapter{
> \bTABLE[frame=off]
> \bTR
> \bTD[width=4cm] \structureuservariable{author} \eTD
> \bTD \structureuservariable{bio} \eTD
> \eTR
> \bTR
> \bTD[nc=2] #1 #2 \eTD
> \eTR
> \eTABLE
> }
>
> \definehead[interview][chapter]
> \setuphead[interview][
> page=right,
> command=\MyChapter,
> % insidesection={\page},
> style={\tfa},
> ]
>
> \starttext
> \startinterview[title={My Interview}][
> author={Jane Doe},
> year={2022},
> month={Decembre},
> bio={\input ward}
> ]
>
> \dorecurse{10}{\input ward \crlf}
> \stopinterview
> \stoptext
>
>
>> On 23 Feb 2023, at 10:21, Alex Leray via ntg-context <ntg-context at ntg.nl> wrote:
>>
>> Hello,
>>
>> I'm trying to figure out how to design a chapter page for a custom head section with uservariables defined.
>>
>> I'd like to have the chapter page start on a right page. I'd like this page to feature the title of the chapter (here: an interview) along with some other info like the interviewee name and bio. All in a "fancy" layout.
>>
>> I'm having issue putting it all together. The command parameter allow me to override the content of the title but has some drawbacks (it seems to be stuck in horizontal mode for instance).
>>
>> I'm open to any solution but would find it nice to keep the \startstopinterview structure.
>>
>> Here is my code at the moment:
>>
>> %%%
>>
>> \define[2]\MyChapter{
>> \starttabulate[|p(\layoutcolumnwidth)|p(\layoutcolumnwidth)|]
>> \NC \structureuservariable{author} \NC \structureuservariable{bio} \NR
>> \stoptabulate
>> }
>>
>> \definehead[interview][chapter]
>> \setuphead[interview][
>> page=right,
>> command=\MyChapter,
>> % insidesection={\page},
>> style={\tfa},
>> ]
>>
>>
>> \starttext
>> \startinterview[title={My Interview}][
>> author={Jane Doe},
>> year={2022},
>> month={Decembre},
>> bio={\input ward}
>> ]
>>
>> \dorecurse{10}{\input ward \crlf}
>> \stopinterview
>> \stoptext
>>
>> %%%
>>
>> Many thanks
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context at ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : https://contextgarden.net
>> ___________________________________________________________________________________
>
> â
> Bruce Horrocks
> Hampshire, UK
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
--
Alexandre Leray
+32 487 947 030
Avez-vous pensé à (vous) offrir Médor ?
https://medor.coop/ideescadeau
More information about the ntg-context
mailing list