On 2025-03-14 12:54, Mohammad Hossein Bateni wrote:
This is amazing! Thanks Wolfgang!
--Mohammad
On Fri, Mar 14, 2025 at 12:14 PM Wolfgang Schuster
<wolfgang.schuster.li...@gmail.com> wrote:
Am 14.03.2025 um 15:28 schrieb Mohammad Hossein Bateni:
> Hello,
>
> How can I clip long markings in the header?
>
> See this MNWE, where the two copies of section title collide on
page 3.
>
> ---------------
> \starttext
> \setupbodyfont[20pt]
> \setupheadertexts[section][section]
> \section{One}
> \section{Two}
> \page
> \section{Three}
> \page
> \section{Long Title for Section Four}
> \page
> \section{Five}
> \stoptext
> ------------
>
> How can I clip the title to a fixed length (5cm?) and perhaps
add "..."
> at the end for longer titles?
\setupheader[width=5cm]
Wolfgang
The width option of setupheader and the limitatetext command are both
Procrustean solutions, chopping off without regard to the meaning of the
result. Explicitly setting the text via the marking option of
startsection is generally a better approach (in my opinion, of course).
Even in an automated flow, it should be possible to specify a shorter
alternative whenever a title is specified.
--
Rik
___________________________________________________________________________________
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
___________________________________________________________________________________