* Chapter number and titles in separate lines with grid layout
@ 2023-02-15 13:44 Alex Leray via ntg-context
2023-02-15 18:10 ` Rik Kabel via ntg-context
2023-02-15 18:11 ` Rik Kabel via ntg-context
0 siblings, 2 replies; 4+ messages in thread
From: Alex Leray via ntg-context @ 2023-02-15 13:44 UTC (permalink / raw)
To: Alex Leray via ntg-context; +Cc: Alex Leray
Hello again,
I'm having another issue: I'd like Chapter/Section number and titles in
separate lines but with grid alignement. I followed that advice:
https://wiki.contextgarden.net/Titles#Chapter_number_and_titles_in_separate_lines
I'm having an issue though: I can't get rid of the space above the
(framed) title and align the section number with the first line (it's on
the second line)
Any idea? Many thanks.
###
\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
###
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number and titles in separate lines with grid layout
2023-02-15 13:44 Chapter number and titles in separate lines with grid layout Alex Leray via ntg-context
@ 2023-02-15 18:10 ` Rik Kabel via ntg-context
2023-02-15 18:11 ` Rik Kabel via ntg-context
1 sibling, 0 replies; 4+ messages in thread
From: Rik Kabel via ntg-context @ 2023-02-15 18:10 UTC (permalink / raw)
To: ntg-context; +Cc: Rik Kabel
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 ?
--
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number and titles in separate lines with grid layout
2023-02-15 13:44 Chapter number and titles in separate lines with grid layout Alex Leray via ntg-context
2023-02-15 18:10 ` Rik Kabel via ntg-context
@ 2023-02-15 18:11 ` Rik Kabel via ntg-context
2023-02-15 22:19 ` Alex Leray via ntg-context
1 sibling, 1 reply; 4+ messages in thread
From: Rik Kabel via ntg-context @ 2023-02-15 18:11 UTC (permalink / raw)
To: ntg-context; +Cc: Rik Kabel
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 ?
--
Rik
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Chapter number and titles in separate lines with grid layout
2023-02-15 18:11 ` Rik Kabel via ntg-context
@ 2023-02-15 22:19 ` Alex Leray via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Alex Leray via ntg-context @ 2023-02-15 22:19 UTC (permalink / raw)
To: ntg-context; +Cc: Alex Leray
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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-15 22:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 13:44 Chapter number and titles in separate lines with grid layout Alex Leray via ntg-context
2023-02-15 18:10 ` Rik Kabel via ntg-context
2023-02-15 18:11 ` Rik Kabel via ntg-context
2023-02-15 22:19 ` Alex Leray via ntg-context
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).