13

In many old books, the final paragraphs of chapters end in an inverted pyramid shape, like this:

enter image description here

I think this is beautiful, so I would like to imitate this for my book. I've found the code for a triangle in this post how to create a triangle with text

\documentclass{article}
\usepackage{microtype,shapepar}

\def\triangleupshape{%
{0}%
{0}b{0}\\%
{8.66}t{-5}{10}\\%
{17.32}t{-10}{20}\\%
{17.32}e{0}%
}    

\begin{document}
\shapepar{\triangleupshape}A ipsum dolor sit amet, consectetuer    adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. \par
\end{document}

Which results in this:

up triangle

But I'd like it to be inverted and the first part of the paragraph need to be full line width. Only the last few lines should end in an inverted pyramid like in the example above.

Is there a way to do this? Thanks in advance for your help.

  • I would not recommend this unless the book is only a piece of art, because it would worse readability. – Schweinebacke Nov 8 '17 at 11:44
  • 1
    @Schweinebacke How can you look at that original image and not declare it a work of art? – Steven B. Segletes Nov 8 '17 at 12:40
  • Related: tex.stackexchange.com/q/19833 (though the poor O.P. was forced to use this in section titles of a thesis!). – Thérèse Nov 9 '17 at 21:33
15

Adjust dimensions to your taste:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{shapepar}
\usepackage{lipsum}
\usepackage{lmodern}
\usepackage{blindtext}
\usepackage{graphicx,stackengine}
\def\asterism{$\vcenter{\hbox{\scalebox{0.7}{\stackon[-0.5pt]{\bfseries*}{\bfseries*~*}}}}$}
\newcommand\myshape{% 
{7}             %line center at x=7
{0}  b{0}\\     % text starts at (0,0)
{0}  t{0}{14}\\ % Line at y=0 starts at x=0 with length 14
{10} t{0}{14}\\ % Line at y=10 starts at x=0 with length 14
{15} t{7}{0}\\  % Line at y=15 starts at x=7 with length 0
{15} e{7}       % text ends at (7,15)
}

\begin{document}
\shapepar{\myshape} \blindtext \blindtext \blindtext \blindtext (\asterism)
\end{document}

enter image description here

  • Sholdn't your x=8 comment be x=7? – Steven B. Segletes Nov 8 '17 at 12:39
  • 2
    Add this to your preamble, \usepackage{stackengine} \def\asterism{$\vcenter{\hbox{\scalebox{0.7}{\stackon[-0.5pt]{\bfseries*}{\bfseries*~*}}}}$} and specify your text as \shapepar{\myshape} \blindtext \blindtext \blindtext \blindtext (\asterism) and I guarantee you will get more upvotes. – Steven B. Segletes Nov 8 '17 at 12:47
  • @StevenB.Segletes Please, feel free to edit my code. The code in your comment shows an error that I don't understand. I'm sure you will do it faster than me. – Ignasi Nov 8 '17 at 16:27
  • Done! Copy/paste from comments frequently injects junk tokens...plus I forgot to mention graphicx. – Steven B. Segletes Nov 8 '17 at 17:07
  • Your solution looks fantastic, thanks! The only thing is, the entire text sample appears on a new page. So \blindtext\blindtext\blindtext\blindtext\blindtext\blindtext [newline][newline] \shapepar{\myshape}\blindtext\blindtext\blindtext\blindtext\blindtext\blindtext is not a continuous text consisting of two paragraphs, but one paragraph, new page and then the paragraph containing the inverted pyramid. I'd like it to be without a new page, so the last paragraph of an entire chapter could be in this shape. Is that possible too? Thanks in advance for an answer. – L.A. Rabida Nov 8 '17 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.