LaTeX forum ⇒ Page LayoutPage layout with multiple text boxes that are not rectangular

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Posts: 1
Joined: Fri Jun 09, 2017 9:07 pm

Page layout with multiple text boxes that are not rectangular

Postby whitespace » Fri Jun 09, 2017 9:26 pm

Hi there,
I was wondering how I would create a page layout like the one in the attached image. I want to have multiple colored text boxes which are not rectangular.
The normal text goes in the white space and floats around the boxes. The text inside the boxes should be layouted automatcally (like in a minipage), but as in the image it should be possible to have text frames which have different widths.
I hope it is described well enough what I want ;)

page.png (1.46 KiB) Viewed 216 times


Posts: 123
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Jun 12, 2017 9:52 pm

let me put it this way: if there was an official way of doing what you want, a package like showframe would have support for it---but I don't see it.
Of course, you could fiddle around with \parshape, like
  1. \documentclass{scrartcl}
  2. \usepackage[english]{babel}
  3. \usepackage[T1]{fontenc}
  4. \usepackage{blindtext}
  5. \usepackage{wallpaper}
  6. \usepackage[left=1.6cm, top=2.54cm, bottom=8.35cm, right=1.6cm, ignoreheadfoot]{geometry}
  7. \usepackage{showframe}
  8. \newlength\ia
  9. \newlength\ib
  10. \newlength\ic
  11. \newlength\id
  12. \newlength\la
  13. \newlength\lb
  14. \newlength\lc
  15. \newlength\ld
  16. \AtBeginDocument{%
  17. \setlength\ia{378.422pt}% indent first area
  18. \setlength\la{\linewidth}%
  19. \addtolength\la{-\ia}% text length first area
  20. \setlength\ib{90.2pt}% indent second area
  21. \setlength\ic{\ib}% indent third area
  22. \setlength\id{0pt}% indent fourth area
  23. \setlength\lb{\linewidth}%
  24. \addtolength\lb{-\ib}% 2nd text length
  25. \setlength\lc{300pt}%
  26. \setlength\ld{\lc}% 4th text length
  27. \addtolength\lc{-\ic}% 3rd text length
  28. \parshape=23 \ia \la \ia \la \ia \la \ia \la \ia \la \ia \la \ia \la \ia \la \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ib \lb \ic \lc \ic \lc \ic \lc \ic \lc \id \ld
  29. }
  30. \CenterWallPaper{1}{page}
  31. \begin{document}
  32. \noindent\blindtext[3]
  34. But look what happens, if you introduce a paragraph break (the empty line in the code just above this text)\ldots
  35. \end{document}

but this approach would only work within a single paragraph: any paragraph break would also break the \parshape command, as demonstrated above.

If you wish to pursue this further, you'd have to decide between `redefining \par'---IMHO not a good idea to begin with---and `reestablishing the wanted layout after a possible paragraph break' (where, say, \everypar might come in handy).

What's more, you'd have to take care about page breaks, too, otherwise the \parshape's current instruction would carry over to the beginning of the next page...

If you really want a page layout like this, you're probably better off using a DTP program.



Return to “Page Layout”

Who is online

Users browsing this forum: No registered users and 1 guest