* [NTG-context] Indentation in headings
@ 2024-09-14 6:59 Kirill Davidov
2024-09-14 7:41 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Kirill Davidov @ 2024-09-14 6:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
Greetings,
As per Russian GOST standards, numbered section headings are flush left
and start with the paragraph indent. Is there a proper way to indent a
section heading? The code simulates what I want visually, but it
unfortunately causes the heading to poke out into the margins. That can
be troublesome if the title is long enough.
Example code to tinker with:
\setupindenting[yes, 2.5em, first]
\setuphead[section][
style=\bf,
align=flushleft,
distance=1em,
indentnext=yes,
]
\showframe
\startdocument
\startsection[title=Foo]
\input dijkstra
\stopsection
\startsection[title=Very long section title that makes you question the
author's writing capabilities]
\input dijkstra
\stopsection
\setuphead[section][
style=\bf,
align=flushleft,
distance=1em,
indentnext=yes,
before=\blank[2*big]\indentation,
]
\startsection[title=Foo]
\input dijkstra
\stopsection
\startsection[title=Very long section title that makes you question the
author's writing capabilities]
\input dijkstra
\stopsection
\stopdocument
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: Indentation in headings
2024-09-14 6:59 [NTG-context] Indentation in headings Kirill Davidov
@ 2024-09-14 7:41 ` Wolfgang Schuster
2024-09-14 7:47 ` Kirill Davidov
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2024-09-14 7:41 UTC (permalink / raw)
To: mailing list for ConTeXt users, Kirill Davidov
Kirill Davidov schrieb am 14.09.2024 um 08:59:
> Greetings,
>
> As per Russian GOST standards, numbered section headings are flush left
> and start with the paragraph indent. Is there a proper way to indent a
> section heading? The code simulates what I want visually, but it
> unfortunately causes the heading to poke out into the margins. That can
> be troublesome if the title is long enough.
>
> Example code to tinker with:
>
> [...]
You have to use the narrow environment and apply it with the beforehead
and afterhead command and in addition enable the aligntitle option.
%%%% begin example
\setupindenting
[yes, 2.5em, first]
\setuphead
[section]
[
align=flushleft,
beforehead={\startnarrow[left=\parindent][left]},
afterhead=\stopnarrow,
aligntitle=yes,
indentnext=yes,
]
\showframe
\startdocument
\startsection[title=Very long section title that makes you question the
author's writing capabilities]
\input dijkstra
\stopsection
\stopdocument
%%%% end example
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* [NTG-context] Re: Indentation in headings
2024-09-14 7:41 ` [NTG-context] " Wolfgang Schuster
@ 2024-09-14 7:47 ` Kirill Davidov
0 siblings, 0 replies; 3+ messages in thread
From: Kirill Davidov @ 2024-09-14 7:47 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 9/14/24 12:41, Wolfgang Schuster wrote:
> You have to use the narrow environment and apply it with the
> beforehead and afterhead command and in addition enable the aligntitle
> option.
>
> Wolfgang
Yeah, that does seem to work. Thanks!
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-14 7:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-14 6:59 [NTG-context] Indentation in headings Kirill Davidov
2024-09-14 7:41 ` [NTG-context] " Wolfgang Schuster
2024-09-14 7:47 ` Kirill Davidov
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).