[NTG-context] Chapter number and titles in separate lines with grid layout

Alex Leray alexandre at stdin.fr
Wed Feb 15 23:19:40 CET 2023


I somehow found a way. It doesn't work on my minimal example but it does 
in my real doc. I tested a lot of thing but I think it was thanks to the 
offset=none parameters

For the record:

###

\define[2]\MySection{
     \framed[
         location=top,
         strut=no,
         offset=none,
         frame=none,
         width=broad,
         height=fit,
         align=middle]{#1.\\#2}}

\setuphead[section][
     conversion=Romannumerals,
     style={\bf\kerncharacters[0.075]\WORDS},
     align=middle,
     command=\MySection,
]

###

Thanks!

Le 15/02/23 à 19:11, Rik Kabel via ntg-context a écrit :
> 
> On 2023-02-15 08:44, Alex Leray via ntg-context wrote:
>>
>> \showframe
>> \showlayout
>> \showgrid
>>
>> \setuplayout[
>>     grid=yes,
>> ]
>>
>> \define[2]\MySection{\framed[
>>     location=keep,
>>     frame=on,
>>     width=broad,
>>     % height=22pt,
>>     align=middle
>> ]{{#1.\\#2}}}
>>
>> \setuphead[section][
>>     strut=no,
>>     conversion=Romannumerals,
>>     style={\bf\WORDS},
>>     align=middle,
>>     command=\MySection,
>> ]
>>
>> \starttext
>> \startsection[title={First section}]
>> this is the text
>> \stopsection
>> \stoptext
> 
> 
> Have you tried it with \framedtext in the place of \framed ?
> 

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