add tag
I would like add a colophon at the of each chapter in my book such that it prints text in an inverted pyramid. I have some code that achieves this but it has a few problems such as breaking up words (of proper nouns etc.) that the publisher does not want to happen. Further, the number of words appearing per each row of the pyramid varies depending on the text that precedes it. I can, at best, show an MWE here because I cannot share the entire source of the book that runs into 100's of pages and probably will make the publisher unhappy. To compile this, you would need to install the Sanskrit 2003 font (from


\newfontfamily\myfont[Script=Devanagari, Scale=1.1]{Sanskrit 2003}


 śrīmatkompellopanāmakakāmeśvarāvadhānināṃ tṛtīyaputreṇa anantalakṣmīgarbhasaṃbhūtena kāśyapasagotreṇa rāmasūryanārāyaṇaśarmaṇā evaṃ
śrīmatparimyupanāmakasatyanārāyaṇaśarmaṇāṃ putreṇa śyāmalāgarbhasaṃbhūtena haritasagotreṇa raviśarmaṇā ca
kulapatīnām ācāryāṇāṃ śrīmuralīdharaśarmaṇāṃ vacanaṃ śirasā dhṛtvā praṇītāyāṃ bālyasakhīsamākhyāyāṃ naiṣadhīyacaritamahākāvyasya saralavyākhyāyāṃ dvādaśaḥ sargaḥ samāptaḥ

श्रीमत्कोम्पेल्लोपनामककामेश्वरावधानिनां तृतीयपुत्रेण अनन्तलक्ष्मीगर्भसंभूतेन काश्यपसगोत्रेण रामसूर्यनारायणशर्मणा % no breaks for these words
श्रीमत्परिम्युपनामकसत्यनारायणशर्मणां पुत्रेण श्यामलागर्भसंभूतेन हरितसगोत्रेण रविशर्मणा % no breaks for these words
च राष्ट्रियसंस्कृतविश्वविद्यालयस्य कुलाधिपतीनां पद्मभूषणबिरुदभाजां
श्रीनीडामङ्गलं गोपालस्वामिमहोदयानाम् % no breaks for these words
एवं कुलपतीनाम् आचार्याणां
श्रीमुरलीधरशर्मणां % no breaks for this word
वचनं शिरसा धृत्वा प्रणीतायां बाल्यसखीसमाख्यायां नैषधीयचरितमहाकाव्यस्य सरलव्याख्यायां अष्टमः सर्गः समाप्तः

Also attached are the output of processing the above code (pyramid-sanskrit) and one page from the book where the pyramid appears, where some of words are hyphenated (marked in red).

Are there any other ways of creating text in the inverse pyramid while following the constraints of not breaking up certain words?

Top Answer
The `shapepar` package will automatically set `\hyphenpenalty` and `\exhyphenpenalty` to 10, which makes hyphenated words very likely. 

I did not find a good place the patch the offending macro, but you can make a copy of `shapepar.sty`, rename it to something like `shapepar_mod.sty` and change line 167 from

\hyphenpenalty10 \exhyphenpenalty10 % optimise


\hyphenpenalty10000 \exhyphenpenalty10000 % optimise

and then load the modified package with `\usepackage{shapepar_mod}`


Caveat: Without hyphenation, short lines with only one word will likely disturb the geometric shape by being too short or too long.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.