# Parshape WITHOUT justified text

My thesis office requires an inverted pyramid for all chapter titles. Here is the code I am using to produce the result:

\newcommand{\invpyr}[1]{
\vbox{
\hsize=4.5in
\parindent=0pt
\emergencystretch=1in
\parshape 6
0.00in 4.50in
0.25in 4.00in
0.50in 3.50in
0.75in 3.00in
1.00in 2.50in
1.25in 2.00in
\leftskip=0pt plus 1fil
\rightskip=0pt plus -1fil
\parfillskip=0pt plus 2fil
#1\par
}
}


This successfully makes an inverted pyramid, but it also stretches the spacing between the words to "fill" each line of the pyramid. I need the spacing to be the same as the rest of the document. In other words, if the top line of the pyramid is 4.5" of available space, I might end up using 4" because the spaces between the words are a normal space.

• Maybe add the directive \raggedright, or \RaggedRight to allow hyphenation (requires loading ragged2e). – Bernard Aug 24 '17 at 1:59
• Add some positive stretch to \rightskip instead of plus -1fil which I'm not sure why you have. (Just remove the - sign in \rightskip, and maybe change \leftskip too if you're not happy with the results.) – ShreevatsaR Aug 24 '17 at 2:05
• @tomsrobots Please post a full (and minimal) working example -- something starting with \documentclass and ending with \end{document}, and illustrating only the title you have and get, and describe what you want instead. – ShreevatsaR Aug 24 '17 at 2:45
• Are you sure you don't just need a centered title? – John Kormylo Aug 24 '17 at 4:12
• Is parshape really necessary here? Presumably you mean triangle (2D) rather than pyramid (3D)? You can use TikZ. Just draw an inverted triangle and insert the text in the shape. – Ross Aug 24 '17 at 4:14

\chapter[This is a really long title that needs to be wrapped as an inverted pyramid]{This is a really long title that \\ needs to be wrapped as an \\ inverted pyramid}