6

I am trying to add a SWOT analysis to my document and would like to have it set out in a 2x2 grid, where each grid space takes up 1/4 of the page regardless of the content. Is this possible with LaTeX?

  • 1
    Could you add a MWE or a drawing of what you're trying to accomplish? It's hard to figure it out from just your question. – Ryan Jan 23 '15 at 8:31
7

There are many, many ways to achieve this. One possibility is tcolorbox using its raster library. The basic format is written quite easily.

  • Every \tcbitem inside the tcbitemize environment fills one quarter of the page.

  • The raster height can be set to a smaller value than \textheight, if not the whole page should be filled.

Without too much decorations, this gives:

\documentclass[a4paper]{article}
\usepackage{geometry}
\usepackage[many]{tcolorbox}
\usepackage{lipsum}

\begin{document}

\begin{tcbitemize}[raster height=\textheight,enhanced,sharp corners,
  colback=yellow!10,colframe=yellow!50!black]
\tcbitem
  \lipsum[2]
\tcbitem
  \lipsum[3]
\tcbitem
  \lipsum[4]
\tcbitem
  \lipsum[5]
\end{tcbitemize}

\end{document}

enter image description here

As a next step, the four boxes can be decorated. I try to mimic some classic SWOT pictures with the next example. The optional parameter of \tcbitem can take any formating option of a tcolorbox.

\documentclass[a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage[many]{tcolorbox}
\usepackage{lipsum,lmodern}

\tcbset{letter/.style={overlay={\node[text=white,opacity=50] at (interior) {\fontsize{7cm}{7cm}\sffamily\bfseries #1};}}}

\begin{document}

\begin{tcbitemize}[raster height=\textheight,
  raster equal skip=0pt,
  enhanced,sharp corners,
  boxrule=0pt,frame hidden]
\tcbitem[letter=S,colback=red!30]
  \lipsum[2]
\tcbitem[letter=W,colback=yellow!30]
  \lipsum[3]
\tcbitem[letter=O,colback=blue!30]
  \lipsum[4]
\tcbitem[letter=T,colback=green!30]
  \lipsum[5]
\end{tcbitemize}
\end{document}

enter image description here

Remark: Be sure to update tcolorbox to its latest version since I used some quite new features.

|improve this answer|||||
  • 1
    Nice and +1. Always adding new features and I miss them some times. Good work. I hope very soon tcolorbox too, will become a swiss army knife. :) – user11232 Jan 23 '15 at 9:54
  • You sir, are awesome :) – LEGEND383 Jan 23 '15 at 11:32

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.