1

What I want is this enter image description here

This is my code

\documentclass{article}
\usepackage{nicematrix}
\begin{document}


\begin{NiceTabular}{lccccc}[hvlines,cell-space-limits=3pt]
\Block{4-1}{Expressiveness} & \Block{1-5}{Modality} \\
               & P & O & A \\
               & \Block{1-5}{Expressive\\ Symbols} \\
               &  P & O & A \\           
\Block{6-1}{Replication} & \Block{1-5}{Placeholders} \\
               &  P & O & A & S & F\\
               & \Block{1-5}{Stacking} \\
               &  P & O & A \\
               & \Block{1-5}{Affixing} \\
               &  P & O \\
\Block{8-1}{Narration} & \Block{1-5}{Storyline Foundation} \\
               &  1 & 2 & 3\\
               & \Block{1-5}{Block Formation} \\
               &  (1 , 1) & (1 , 2) & (2 , 1) \\
               & \Block{1-5}{Group Composition} \\
               &  P & O \\  
               & \Block{1-5}{Frame Fixation} \\
               &  P & O & A & Grouped P & Grouped O\\
\Block{8-1}{Connection} & \Block{1-5}{Progression} \\
               &  P & O & A \\
               & \Block{1-5}{Transition} \\
               &  P & O & A \\
               & \Block{1-5}{Aggregation} \\
               &  P & O & A \\  
               & \Block{1-5}{Execution} \\
               &  P & O & A \\  
\end{NiceTabular}\newline\newline\newline


\end{document}

I'm trying to fix this Table, so far looks like this; kindly recognize the many empty cells, which shouldn't be there:

enter image description here

0

1 Answer 1

3
\documentclass{article}
\usepackage{nicematrix}

\begin{document}

\begin{NiceTabular}{lw{c}{5cm}}[hvlines,cell-space-limits=3pt]
\Block{4-1}{Expressiveness} & Modality \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\
               & Expressive Symbols \\
               &  \omit\hfil P\hfil\vrule\hfil  O\hfil\vrule\hfil A\hfil \\           
\Block{6-1}{Replication} & Placeholders \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil\vrule\hfil S\hfil\vrule\hfil F\hfil \\
               &  Stacking \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\
               &  Affixing \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil \\
\Block{8-1}{Narration} & Storyline Foundation \\
               &  \omit\hfil 1\hfil\vrule\hfil 2\hfil\vrule\hfil 3\hfil \\
               &  Block Formation \\
               &  \omit\hfil (1 , 1)\hfil\vrule\hfil (1 , 2)\hfil\vrule\hfil (2 , 1)\hfil \\
               &  Group Composition \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil \\  
               &  Frame Fixation \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil\vrule\hfil Grouped P\hfil\vrule\hfil Grouped O\hfil \\
\Block{8-1}{Connection} & Progression \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\
               &  Transition \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\
               &  Aggregation \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\  
               &  Execution \\
               &  \omit\hfil P\hfil\vrule\hfil O\hfil\vrule\hfil A\hfil \\  
\end{NiceTabular}

\end{document}

Output of the above code

You can also define an auxiliary command \Divide for legibility.

\documentclass{article}
\usepackage{nicematrix}

\ExplSyntaxOn
\NewExpandableDocumentCommand { \Divide } { m }
  { \omit \hfil \clist_use:nn { #1 } { \hfil \vline \hfil } \hfil }
\ExplSyntaxOff

\begin{document}

\begin{NiceTabular}{lw{c}{5cm}}[hvlines,cell-space-limits=3pt]
\Block{4-1}{Expressiveness} & Modality \\
               &  \Divide{P,O,A} \\
               & Expressive Symbols \\
               &  \Divide{P,O,A} \\           
\Block{6-1}{Replication} & Placeholders \\
               &  \Divide{P,O,A,S,F} \\
               &  Stacking \\
               &  \Divide{P,O,A} \\
               &  Affixing \\
               &  \Divide{P,O} \\
\Block{8-1}{Narration} & Storyline Foundation \\
               &  \Divide{1,2,3} \\
               &  Block Formation \\
               &  \Divide{{(1 , 1)},{(1 , 2)},{(2 , 1)}} \\
               &  Group Composition \\
               &  \Divide{P,O} \\  
               &  Frame Fixation \\
               &  \Divide{P,O,A,Grouped P,Grouped O} \\
\Block{8-1}{Connection} & Progression \\
               &  \Divide{P,O,A} \\
               &  Transition \\
               &  \Divide{P,O,A} \\
               &  Aggregation \\
               &  \Divide{P,O,A} \\  
               &  Execution \\
               &  \Divide{P,O,A} \\  
\end{NiceTabular}

\end{document}
3
  • 1
    You Dr., literally helped me on many tables, Thank you Jedi Master of Latex
    – zEn feeLo
    Commented Jul 28, 2023 at 7:11
  • just noticed, the " , " inside (1 , 1) creates a conflict with your code
    – zEn feeLo
    Commented Jul 28, 2023 at 7:16
  • 2
    Right: I've corrected. Commented Jul 28, 2023 at 7:19

Not the answer you're looking for? Browse other questions tagged .