3

I am trying to recreate the following table in a more simple format in my latex document. However the more I work on it the more messy it gets. I cant really understand how to properly align every cell when i use \multirow and \multicolumn

Matrix

This is what i have at the moment. I do like the look of my table better then the design in the image but the layout is unreadable.

\begin{table}[h]
\centering
\begin{tabular}{l||c c c c c c c}
 Variables & \multicolumn{7}{c}{Values} \\
 \hline \hline

Approach & \multicolumn{2}{c}{\textbf{\textit{Qualitative}}} \multicolumn{2}{c}{Quantitative} & \multicolumn{3}{c}{ }  \\
 \hline

 Artifact Focus & \multicolumn{2}{c}{\textbf{\textit{Technical}}} & \multicolumn{2}{c}{Organizational} & \multicolumn{3}{c}{Strategic} \\
 \hline

 Artifact Type & \multicolumn{1}{c}{Construct} & \multicolumn{1}{c}{Model} & \multicolumn{2}{c}{\textbf{\textit{Method}}} & \multicolumn{2}{c}{Instantiation} & \multicolumn{2}{c}{Method} \\
 \hline

Epistemology & \multicolumn{3}{c}{\textbf{\textit{Positivism}}} & \multicolumn{4}{c}{Interpretivism}  \\
\hline

Function & \multicolumn{2}{c}{\textbf{\textit{Knowledge}}} & \multicolumn{2}{c}{Control} & \multicolumn{2}{c}{Development} & \multicolumn{1}{c}{Legitimization} \\
\hline

\multirow{2}{*}{Method} & Action research & \textbf{\textit{Case study}} & Field experiment \\  Formal proof & Controlled experiment & Prototype & Survey \\
\hline

 Object & \multicolumn{3}{c}{\textbf{\textit{Artifact}}} & \multicolumn{4}{c}{Artifact construction}  \\
\hline

Ontology & \multicolumn{3}{c}{\textbf{\textit{Realism}}} & \multicolumn{4}{c}{Nominalism}  \\
\hline

Perspective & \multicolumn{2}{c}{Economic} & \multicolumn{2}{c}{Deployment} & \multicolumn{2}{c}{\textbf{\textit{Engineering}}} & \multicolumn{1}{c}{Epistemological} \\
\hline

Position & \multicolumn{3}{c}{Internally} & \multicolumn{4}{c}{\textbf{\textit{Externally}}} \\
 \hline

Reference Point & \multicolumn{2}{c}{Artifact against research gap} & \multicolumn{2}{c}{\textbf{\textit{Artifact against real world}}} & \multicolumn{3}{c}{Research gap against real world} \\
\hline

Time & \multicolumn{3}{c}{Ex Ante} & \multicolumn{4}{c}{\textbf{\textit{Ex Post}}}
 \hline 

\end{tabular}
\caption{Evaluation configuration}
\label{tab:dsr}
\end{table}
  • 2
    Welcome to TeX.SX! The shown table is a bad example of a table and should not be reproduced at all ;-) – user31729 Mar 24 '15 at 13:58
  • 2
    I fully agree with @SoundsOfSilence: The table you're showing is just awful. How on earth will you assure that your readers will interpret the jumble of buzzwords consistently -- let alone correctly? – Mico Mar 24 '15 at 14:23
  • 1
    do the alignments on the right have any meaning at all? I struggle to guess the meaning of the table but I think it's an enumerated list of values for each variable, and if so it would be much better to just list the values in a single paragraph. – David Carlisle Mar 24 '15 at 15:00
4

The main point of this table is that the fixed width of the lines is cut to the pieces of the equidistant width. Each line has various number of such pieces separated by the vertical bar.

We can create the macro \l to do this work. No table/tabular environment is needed. For example:

\def\tstrut{\vrule height12pt depth5pt width0pt}
\def\l#1{\hbox to15cm\bgroup \tstrut\vrule \lA#1||}
\def\lA#1|{\ifx|#1|\egroup\hrule \else \hfil\lB{#1}\hfil\vrule \expandafter\lA\fi}
\def\lB#1{\hbox to0pt{\hss\ignorespaces#1\unskip\hss}}

\vbox{\hrule
   \l{ Qualitative | Quantitative }
   \l{ Technical | Organizational | Strategic }
   \l{ Construct | Model | Method | Instantiation | Theory }
   \l{ Positivism | Interpretivism }
   \l{ Knowledge function | Control function | Development function | Legitimization function }
   \l{ Action reserach | Case study | Field experiment | Formal proofs }
}

\bye

gives the result:

tabule

Edit: As a response to your comment I can show you how to create whole table including span-row item in the left column.

But, because I don't support LaTeX, my solution is not in LaTeX. My code below is working in plain TeX with the OPmac macro package (used only for color management and font resizing here). You can be inspired by the code and replace color management to LaTeX-like form. The \hbox/\vbox arithmetic is applicable in both LaTeX / plain TeX. I hope that my code shows that the knowledges about \hbox/\vbox will surely pay.

\input opmac
\def\Grey{\setcmykcolor{0 0 0 .8}}
\input chelvet
\typosize[8.5/11]
\rulewidth=.8pt

\def\tstrut{\vrule height12pt depth5pt width0pt}
\def\doublestrut{\def\tstrut{\vrule height20pt depth14.8pt width0pt}}
\def\cbox#1#2#3#4{\hbox{\rlap{#2\tstrut\vrule width#1}\hbox to#1{\hfil#3#4\hfil}}}
\def\l#1{\hbox to13cm\bgroup \tstrut\vrule \lA#1||}
\def\lA#1|{\ifx|#1|\egroup\hrule \else \hfil\lB{#1}\hfil\vrule \expandafter\lA\fi}
\def\lB#1{\hbox to0pt{\hss\ignorespaces#1\unskip\hss}}
\def\c#1{\cbox{2.2cm}\Grey\White{#1}}

\hbox{\let\Grey=\Black    \c{Variable}\kern1mm \cbox{13cm}\Black\White{Value}}
\nointerlineskip \kern1mm
\hbox{%
\vtop{\lineskip=.8pt \kern0pt
   \c{Approach}
   \c{Artifact Focus}
   \c{Artifact Type}
   \c{Epistemology}
   \c{Function}
   {\doublestrut\c{Method}}
   \c{Object}
}\kern1mm
\vtop{\hrule
   \l{ Qualitative | Quantitative }
   \l{ Technical | Organizational | Strategic }
   \l{ Construct | Model | Method | Instantiation | Theory }
   \l{ Positivism | Interpretivism }
   \l{ Knowledge function | Control function | Development function | Legitimization function }
   \l{ Action reserach | Case study | Field experiment | Formal proofs }
   \l{ Controlled experiment | Prototype | Survey }
   \l{ Artifact | Artifact construction }
}%
}
\bye

The result:

tabule2

  • The problem is that in my document I need the Method to span 2 rows (Like it does in the example). So to the left of your example i would have Method on row 7. Then Action research Case study would be on row 7 and Field experiment and Formal proofs would be on line 8. Sort of the same way it is done in the picture. – user3139545 Mar 25 '15 at 11:39

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.