3

I am in the middle of writing my thesis, and have to put together a SWOT analysis. I want it to be a 2x2 table, that looks like this:

Supposed to look like this

Instead, the table is 1 column which I can't seem to fix. I have specifically stated: raster columns=2, which is what I've done in the picture above. Can someone help?

This is what it looks like now: This is what it looks like now

I have pasted my code below:

\begin{tcboxedraster}[raster columns=2, raster equal height=rows,
size=small,colframe=swotW!80!black,colback=white,colbacktitle=swotS!80!black,
title={Box \# \thetcbrasternum}]
{colframe=swotW!80!black,colback=white,fonttitle=\bfseries,title=SWOT model 
for Bavarian Nordic}

\begin{tcolorbox}[equal height group=1, size=fbox, colframe=swotS!80!black, 
title=\large{\textsc{styrker}}]
\begin{enumerate} 
\item \small{Stærkt relationelt bånd til amerikansk \\ regering og andre 
instanser}
\item \small{Diversificeret præparatportefølje}
\item \small{Teknologisk platform som fundament \\ for overbevisende 
kliniske resultater} 
\item \small{Synergietablering mellem portefølje \\ og demografisk 
udvikling}
\end{enumerate}
\end{tcolorbox}


\begin{tcolorbox}[equal height group=1, size=fbox, colframe=swotW!80!black, title=\large{\textsc{svagheder}}] 
\begin{enumerate}
\item \small{PROSTVACs kommercielle succes i \\ BMS' hænder}
\item \small{Manglende likviditet fører til afhængig- \\ hed af sponsorer}
\item \small{Svagt fundament for kommercialisering af\\  RSV}
\end{enumerate}

\end{tcolorbox}
\begin{tcolorbox}[equal height group=2, size=fbox, colframe=swotO!80!black, 
title=\large{\textsc{muligheder}}] 
\begin{enumerate}
\item \small{Geopolitisk klimaeskalering}
\item \small{Ældrende befolkning}
\item \small{Monopol-lignende status for tredje- \\generations koppevaccine i USA}
\item \small{Europæisk transition til tredje- \\ generations koppevaccine}
\end{enumerate}
\end{tcolorbox}

\begin{tcolorbox}[title=\large{\textsc{trusler}}]
\begin{enumerate}
\item \small{Biosimilars i takt med patentudløb}
\item \small{Fluktuerende US-dollar}
\item \small{Intensivering af utilfredshed med pris- \\niveau i USA}
\item \small{Ophøring af Obamacare grundet \\ sundhedspolitisk reform under Trump \\ der kan skabe flere forsikringsløse}
\end{enumerate}
\end{tcolorbox}

\end{tcboxedraster}
  • 2
    Don't leave empty lines between tcolorboxes, they start a new paragraph. If you want a blank line between them, place % as the first character. – Ignasi May 9 '17 at 15:25
  • @Ignasi: Please write an answer in order to kick this from the unanswered list ;-) – user31729 May 12 '17 at 14:43
2

Even inside a tcbraster or tcboxedrater, empty lines between tcolorboxes start a new paragraph. This is the reason for one column result in posted code.

If you don't want to suppress all space between tcolorboxes, use a % to comment the empty lines:

\begin{tcolorbox}
...
\end{tcolorbox}
%
\begin{tcolorbox}
...
\end{tcolorbox}

Your after completion and correction:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[most]{tcolorbox}
\usepackage{lmodern}

\colorlet{swotS}{red}
\colorlet{swotW}{blue}
\colorlet{swotO}{green}

\begin{document}

\begin{tcboxedraster}[raster columns=2, raster equal height=rows,
size=small,colframe=swotW!80!black,colback=white,colbacktitle=swotS!80!black,
title={Box \# \thetcbrasternum}]
{colframe=swotW!80!black,colback=white,fonttitle=\bfseries,title=SWOT model 
for Bavarian Nordic}

\begin{tcolorbox}[equal height group=1, size=fbox, colframe=swotS!80!black, 
title=\large{\textsc{styrker}}]
\begin{enumerate} 
\item \small{Stærkt relationelt bånd til amerikansk \\ regering og andre 
instanser}
\item \small{Diversificeret præparatportefølje}
\item \small{Teknologisk platform som fundament \\ for overbevisende 
kliniske resultater} 
\item \small{Synergietablering mellem portefølje \\ og demografisk 
udvikling}
\end{enumerate}
\end{tcolorbox}
%
\begin{tcolorbox}[equal height group=1, size=fbox, colframe=swotW!80!black, title=\large{\textsc{svagheder}}] 
\begin{enumerate}
\item \small{PROSTVACs kommercielle succes i \\ BMS' hænder}
\item \small{Manglende likviditet fører til afhængig- \\ hed af sponsorer}
\item \small{Svagt fundament for kommercialisering af\\  RSV}
\end{enumerate}
\end{tcolorbox}
%
\begin{tcolorbox}[equal height group=2, size=fbox, colframe=swotO!80!black, 
title=\large{\textsc{muligheder}}] 
\begin{enumerate}
\item \small{Geopolitisk klimaeskalering}
\item \small{Ældrende befolkning}
\item \small{Monopol-lignende status for tredje- \\generations koppevaccine i USA}
\item \small{Europæisk transition til tredje- \\ generations koppevaccine}
\end{enumerate}
\end{tcolorbox}
%
\begin{tcolorbox}[equal height group=2, title=\large{\textsc{trusler}}]
\begin{enumerate}
\item \small{Biosimilars i takt med patentudløb}
\item \small{Fluktuerende US-dollar}
\item \small{Intensivering af utilfredshed med pris- \\niveau i USA}
\item \small{Ophøring af Obamacare grundet \\ sundhedspolitisk reform under Trump \\ der kan skabe flere forsikringsløse}
\end{enumerate}
\end{tcolorbox}

\end{tcboxedraster}
\end{document}

The result:

enter image description here

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.