In the MWE below the 'part' title is centred but on one line only and, because it is a long title, the beginning and end are lost off the sides of the page. If it were a 'chapter' title then I could insert '\\' to cause a line break at that point. However this does not seem to work for 'part'. Is there a way of making 'part' titles wrap the same way that 'chapter' titles do? % ---begin--- \define[2]\placePartTitle{\midaligned{#2}} \definehead [Part] [part] \setuphead[Part] [ placehead=yes, style={\tfd}, command=\placePartTitle, ] \starttext \startPart[title={A very long part title that needs to be wrapped manually}] Some body text \stopPart \stoptext %---end--- — Bruce Horrocks Hampshire, UK
Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:
In the MWE below the 'part' title is centred but on one line only and, because it is a long title, the beginning and end are lost off the sides of the page.
If it were a 'chapter' title then I could insert '\\' to cause a line break at that point. However this does not seem to work for 'part'.
Is there a way of making 'part' titles wrap the same way that 'chapter' titles do?
% ---begin--- \define[2]\placePartTitle{\midaligned{#2}}
\definehead [Part] [part] \setuphead[Part] [ placehead=yes, style={\tfd}, command=\placePartTitle, ]
\setuphead [Part] [placehead=yes, style=\tfd, align=middle, number=no] Wolfgang
On Mon, 18 Apr 2022, Wolfgang Schuster via ntg-context wrote:
In the MWE below the 'part' title is centred but on one line only and, because it is a long title, the beginning and end are lost off the sides of
Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46: the page.
If it were a 'chapter' title then I could insert '\\' to cause a line break
at that point. However this does not seem to work for 'part'.
Is there a way of making 'part' titles wrap the same way that 'chapter'
titles do?
% ---begin--- \define[2]\placePartTitle{\midaligned{#2}}
\definehead [Part] [part] \setuphead[Part] [ placehead=yes, style={\tfd}, command=\placePartTitle, ]
\setuphead [Part] [placehead=yes, style=\tfd, align=middle, number=no]
Or use: align={middle,broad}, which has slightly better alignment for titles, IMHO. There is also `alternative=middle`. Aditya
On 18 Apr 2022, at 22:10, Wolfgang Schuster via ntg-context
wrote: Bruce Horrocks via ntg-context schrieb am 18.04.2022 um 22:46:
In the MWE below the 'part' title is centred but on one line only and, because it is a long title, the beginning and end are lost off the sides of the page.
If it were a 'chapter' title then I could insert '\\' to cause a line break at that point. However this does not seem to work for 'part'.
Is there a way of making 'part' titles wrap the same way that 'chapter' titles do?
% ---begin--- \define[2]\placePartTitle{\midaligned{#2}}
\definehead [Part] [part] \setuphead[Part] [ placehead=yes, style={\tfd}, command=\placePartTitle, ]
\setuphead [Part] [placehead=yes, style=\tfd, align=middle, number=no]
Thanks very much for the quick and helpful reply. — Bruce Horrocks Hampshire, UK
participants (3)
-
Aditya Mahajan
-
Bruce Horrocks
-
Wolfgang Schuster