I created a custom chapter heading (with help from here), using tabular, like this:
<assign|chapter-numbered-title|<\macro|title>
<no-indent>\
<with|color|gray|<with|font-family|ss|<\with|text-color|grey>
<no-indent>
<\wide-tabular>
<tformat|
<cwith|2|2|1|1|cell-tborder|4ln>|
<cwith|1|1|1|1|cell-bborder|4ln>|
<cwith|2|2|1|1|cell-bborder|4ln>|
<cwith|2|2|1|1|cell-lborder|0ln>|
<cwith|2|2|1|1|cell-rborder|0ln>|
<cwith|2|2|1|1|cell-hyphen|t>|
<cwith|1|1|1|1|cell-halign|r>|
<cwith|1|-1|1|1|cell-lsep|0.0em>|
<cwith|1|-1|1|1|cell-rsep|0.0em>|
<cwith|1|-1|1|1|cell-bsep|1.5em>|
<cwith|1|-1|1|1|cell-tsep|1.5em>|
<table|
<row|<\cell>
<with|font-series|bold|font-family|ss|font-shape|small-caps|<large|
Chapter <with|font-base-size|38| <the-chapter>>>>
</cell>>|
<row|<\cell>
<no-indent><with|font-series|bold|font-shape|small-caps|font-family|ss|<very-large| <with|color|black|<arg|title>>>>
</cell>>>>
</wide-tabular>
</with>>>
</macro>>
However, for long chapter text, the title does not wrap around the next line.
Any way to fix this?
EDIT: The behavior of this macro is strange. When I start a chapter with \chapter
the line does wrap around, however the title is justified and words are hyphenated. This is not desirable for my chapter tiles. Ideally the text should be left-aligned and un-hyphenated. I can prevent words by grouping them (Format > Break > Horizontal
), but this results in large spaces between words.
On the other hand, when I try to switch to left aligned text via Format > Paragraph > Alignment
, that’s when the line-wrapping breaks and the above issue happens. Even stranger, if I try to switch back to justified, the error is not corrected.