Questa è la soluzione più completa che troverai, ma studiala attentamente e vedi se può essere adattata al tuo lavoro.
Soluzione:
Modificate il carattere, il testo e i colori in base alle vostre esigenze.
Questo codice è stato adattato dalla mia risposta alla Matrice SWOT utilizzando TikZ
documentclass[10pt,tikz,border=2mm]{standalone}
usepackage{times}
usepackage{tikz}
usetikzlibrary{matrix}
colorlet{helpful}{lime!70}
colorlet{harmful}{red!30}
colorlet{internal}{yellow!20}
colorlet{external}{cyan!30}
colorlet{S}{helpful!50!internal}
colorlet{W}{harmful!50!internal}
colorlet{O}{helpful!50!external}
colorlet{T}{harmful!50!external}
newcommand{texta}{Helpful\ tiny (to achieve the objective)par}
newcommand{textb}{Harmful\ tiny (to achieve the objective)par}
newcommand{textcn}{Internal origin\ tiny (productslash company attributes)par}
newcommand{textdn}{External origin\ tiny (environmentslash market attributes)par}
newcommand{back}[1]{fontsize{60}{70}selectfont #1}
begin{document}
begin{tikzpicture}[
any/.style={minimum width=3cm,minimum height=3cm,%
text width=2.5cm,align=center,outer sep=0pt},
header/.style={any,minimum height=1cm,fill=black!10},
leftcol/.style={header,rotate=90},
mycolor/.style={fill=#1, text=#1!60!black}
]
matrix (SWOT) [matrix of nodes,nodes={any,anchor=center},%
column sep=-pgflinewidth,%
row sep=-pgflinewidth,%
row 1/.style={nodes=header},%
column 1/.style={nodes=leftcol},
inner sep=0pt]
{
&|[fill=helpful]| {texta} & |[fill=harmful]| {textb} \
|[fill=internal]| {textcn} & |[mycolor=S]| back{S} & |[mycolor=W]| back{W} \
|[fill=external]| {textdn} & |[mycolor=O]| back{O} & |[mycolor=T]| back{T} \
};
node[any, anchor=center] at (SWOT-2-2) {strength 1\ strength 2};
node[any, anchor=center] at (SWOT-2-3) {weakness 1\ weakness 2};
node[any, anchor=center] at (SWOT-3-2) {opportunity 1\ opportunity 2};
node[any, anchor=center] at (SWOT-3-3) {threat 1\ threat 2};
end{tikzpicture}
end{document}
Con una tabella:
documentclass[10pt,table]{article}
usepackage{times}
usepackage{array}
usepackage{graphicx}
usepackage{tikz}
colorlet{helpful}{lime!70}
colorlet{harmful}{red!30}
colorlet{internal}{yellow!20}
colorlet{external}{cyan!30}
colorlet{S}{helpful!50!internal}
colorlet{W}{harmful!50!internal}
colorlet{O}{helpful!50!external}
colorlet{T}{harmful!50!external}
newcommand{texta}{Helpfulpar tiny (to achieve the objective)}
newcommand{textb}{Harmfulpar tiny (to achieve the objective)}
newcommand{textcn}{rotatebox[origin=c]{90}{parbox[t]{3cm}{centering Internal origin\ tiny (productslash company attributes)par}}}
newcommand{textdn}{rotatebox[origin=c]{90}{parbox[b]{3cm}{centering External origin\ tiny (environmentslash market attributes)par}}}
newcommand{texts}{makebox[0pt][c]{parbox[t]{0.2textwidth}{centering strength 1par strength 2}}}
newcommand{textw}{makebox[0pt][c]{parbox[t]{0.2textwidth}{centering weakness 1par weakness 2}}}
newcommand{texto}{makebox[0pt][c]{parbox[t]{0.2textwidth}{centering opportunity 1par opportunity 2}}}
newcommand{textt}{makebox[0pt][c]{parbox[t]{0.2textwidth}{centering threat 1par threat 2}}}
newcommand{back}[1]{tikznode[overlay,text=#1!60!black,font=fontsize{60}{70}selectfont](char) at (0,-0.1) {#1};}
newcommandmycolor[1]{cellcolor{#1}}
newcolumntype{C}[1]{>{centeringarraybackslash}m{#1}}
begin{document}
begin{tabular}{c*{2}{C{0.2textwidth}}}
&cellcolor{helpful} texta & cellcolor{harmful} textb \
cellcolor{internal}textcn & mycolor{S}back{S} texts & mycolor{W}back{W} textw \
cellcolor{external}textdn & mycolor{O}back{O} texto & mycolor{T}back{T} textt
end{tabular}
end{document}
La mia risposta precedente ha bisogno di conoscere le dimensioni della scatola più grande per correggere il codice corretto minimum height
. Harish Kumar offre una soluzione alternativa basata su tabular
che risolve il problema delle dimensioni dei paragrafi.
Qui propongo un'altra soluzione basata su tcbraster
(da tcolorbox
). Utilizza
per adattare automaticamente (due compilazioni) tutte le caselle della stessa riga alle dimensioni corrette. Utilizza anche l'opzione
raster equal height=rowswatermark text
per disegnare i segni di sfondo. Anche se in questo caso non è stata utilizzata, fitting
la libreria tcolorbox può adattare il testo interno al rettangolo corrispondente.
documentclass[10pt]{article}
usepackage{times}
usepackage[most]{tcolorbox}
usepackage{lipsum}
colorlet{helpful}{lime!70}
colorlet{harmful}{red!30}
colorlet{internal}{yellow!20}
colorlet{external}{cyan!30}
colorlet{S}{helpful!50!internal}
colorlet{W}{harmful!50!internal}
colorlet{O}{helpful!50!external}
colorlet{T}{harmful!50!external}
newcommand{texta}{Helpfulpar tiny (to achieve the objective)}
newcommand{textb}{Harmfulpar tiny (to achieve the objective)}
newcommand{textcn}{rotatebox[origin=c]{90}{parbox[t]{3cm}{centering Internal origin\ tiny (productslash company attributes)par}}}
newcommand{textdn}{rotatebox[origin=c]{90}{parbox[b]{3cm}{centering External origin\ tiny (environmentslash market attributes)par}}}
newcommand{texts}{strength 1par strength 2}
newcommand{textw}{weakness 1par weakness 2}
newcommand{texto}{opportunity 1par opportunity 2}
newcommand{textt}{threat 1par threat 2}
tcbset{swotbox/.style={size=normal, boxrule=0pt,
colback=#1, watermark text=#1, width=.5linewidth-5mm},
header/.style={size=small, boxrule=0pt, width=.5linewidth-5mm, colback=#1, valign=center, halign=center},
firstcol/.style={header=#1, width=1cm}
}
begin{document}
begin{tcbitemize}[raster columns=3, raster rows=3, enhanced, sharp corners, raster equal height=rows, raster force size=false, raster column skip=0pt, raster row skip = 0pt]
%Empty corner and two headers
tcbitem[blankest, width=1cm]
tcbitem[header = helpful]
texta
tcbitem[header = harmful]
textb
%First row
tcbitem[firstcol = internal]
textcn
tcbitem[swotbox = S]
lipsum[2]
tcbitem[swotbox = W]
lipsum[2]
%Second row
tcbitem[firstcol = external]
textcn
tcbitem[swotbox=O]
lipsum[2]
tcbitem[swotbox=T]
lipsum[2]
end{tcbitemize}
end{document}
Se scorri puoi trovare le recensioni di altri amministratori, puoi anche mostrare la tua se lo desideri.