1

I have been struggling with \multirow and \multicol to try to fit the title of the first of the columns "Characteristics of organisational processes". For the moment, the best I accomplished (Case A) was reducing the font size (the rest is footnotesize):

\documentclass[a4paper,12pt, oneside]{report}

\usepackage{longtable}
\usepackage{multirow}

% Subscripts - defining new command
\newcommand{\textunderscript}[1]{$_{\textup{#1}}$}

\begin{document}
 ....

 %Case A


 \begin{longtable}{|p{3cm}||p{3.4cm}|p{3.4cm}|p{3.4cm}|}
 \hline \hline
 \multirow{2}{3cm}{\tiny{Characteristics of organisational processes}} & \multicolumn{3}{c|}{Degree of \textit{organicity}} \\ \cline{2-4}
& \textsl{d\textunderscript{1}}: High & \textsl{d\textunderscript{2}}:  Intermediate & \textsl{d\textunderscript{3}}: Low \\ \hline \hline \hline

...

\end{longtable}

 % Case B

\begin{longtable}{|p{3cm}||p{3.4cm}|p{3.4cm}|p{3.4cm}|}
\hline \hline
\multirow{2}{3cm}{Characteristics of organisational processes} & \multicolumn{3}{c|}{Degree of \textit{organicity}} \\ \cline{2-4}
 & \textsl{d\textunderscript{1}}: High & \textsl{d\textunderscript{2}}:    Intermediate & \textsl{d\textunderscript{3}}: Low \\ \hline \hline \hline

 ...

 \end{longtable}

 ...

 \end{document}

enter image description here

However, I would like to be able to fit with the same size as the rest of the table (Case B):

enter image description here

Nevertheless, I have not been able to either use the "p" type in this cell, or to extend it so it can fit by merging and extra row. Any ideas on how would it be possible to achieve this?

Thank you very much!

  • 1
    please, extend your code snippet to complete small document! – Zarko Jul 21 '17 at 16:12
  • Like where does \textunderscript come from? – John Kormylo Jul 21 '17 at 16:14
  • Thanks @Zarko, @John-kormylo! I have just updated the snippet with a proper MWE showing both cases, apologies for forgetting to do this! – drozas Jul 21 '17 at 16:26
3

I expected the extra space to be evenly divided between the first two rows.

\documentclass[a4paper,12pt, oneside]{report}

\usepackage{multirow}
\usepackage{longtable}

% Subscripts - defining new command
\newcommand{\textunderscript}[1]{$_{\textup{#1}}$}

\begin{document}

\begin{longtable}{|p{3cm}||p{3.4cm}|p{3.4cm}|p{3.4cm}|}
\hline \hline
\def\arraystrecth{1.5}
\multirow{2}{3cm}[\normalbaselineskip]{Characteristics of organisational processes} & \multicolumn{3}{c|}{Degree of \textit{organicity}} \\ \cline{2-4}
\strut & \textsl{d\textunderscript{1}}: High & \textsl{d\textunderscript{2}}:  Intermediate & \textsl{d\textunderscript{3}}: Low \\ \hline \hline \hline
\def\arraystrecth{1}
\end{longtable}

\end{document}

demo


This solution uses custom struts to make the first two rows taller. Note: you cannot put the struts in front of \multicolumn, only inside. Note the (somewhat fudged) fixup for \multirow.

\documentclass[a4paper,12pt, oneside]{report}

\usepackage{multirow}
\usepackage{longtable}

% Subscripts - defining new command
\newcommand{\textunderscript}[1]{$_{\textup{#1}}$}

\def\mystrut{\rule[-1.5\dp\strutbox]{0pt}{1.5\normalbaselineskip}}%

\begin{document}

\begin{longtable}{|p{3cm}||p{3.4cm}|p{3.4cm}|p{3.4cm}|}
\hline \hline
\multirow{2}{3cm}[\dp\strutbox]{Characteristics of organisational processes} & \multicolumn{3}{c|}{\mystrut Degree of \textit{organicity}} \\ \cline{2-4}
\mystrut & \textsl{d\textunderscript{1}}: High & \textsl{d\textunderscript{2}}:  Intermediate & \textsl{d\textunderscript{3}}: Low \\ \hline \hline \hline
\end{longtable}

\end{document}

demo 2

  • Thank you so much @john-kormylo! That made the trick! :-) – drozas Jul 21 '17 at 16:34
2

I suggest using \makecell to control the line breaks in the first cell. In addition, the package allows to define vertical spacing to add at top and bottom of cells.

Further, as your table is nearly text-wide, I replaced longtable with tabularx, and loaded ltablex which extends the functionalities of longtable to tabularx (which inherits longtable syntax).

Last point, double rules with hhline will intersect more neatly.

\documentclass{article}
\usepackage[showframe]{geometry} 

\usepackage{booktabs}
\usepackage{ragged2e, setspace}
\usepackage{multirow, hhline, longtable, makecell}
\setcellgapes{3pt}
\usepackage{ltablex}
\keepXColumns

\begin{document}

\makegapedcells\setlength\tabcolsep{4pt}
\begin{tabularx}{\linewidth}{|>{\RaggedRight}X||*{3}{>{\RaggedRight}p{3.5cm}|}}
\caption{Summary of main characteristics of categories according to different degrees of \textit{organicity} identified in the organisational processes of the Drupal community}
\label{tab:layers-summary}\\
\hhline{=:t:=:=:=}
\multirow{2}{=}{\makecell[lc]{Characteristics\\[-0.5ex] of organisational\\[-0.5ex] processes}} & \multicolumn{3}{c|}{Degree of \textit{organicity}} \\ \cline{2-4}
& \textsl{d\textsubscript{1}}: High & \textsl{d\textsubscript{2}}: Intermediate & \textsl{d\textsubscript{3}}: Low \\
\hhline{:=::=:=:=:}
\endfirsthead
\hhline{=:t:=:=:=}
\multirow{2}{=}{\makecell[lc]{Characteristics\\[-0.5ex] of organisational\\[-0.5ex] processes}} & \multicolumn{3}{c|}{Degree of \textit{organicity}} \\ \cline{2-4}
& \textsl{d\textsubscript{1}}: High & \textsl{d\textsubscript{2}}: Intermediate & \textsl{d\textsubscript{3}}: Low \\
\hhline{:=::=:=:=:}
\endhead
Amount of explicit & Based on implicit & Intermediate amount & Large amount of explicit \\
\end{tabularx}

\end{document} 

enter image description here

0

Slightly modified nice Bernard' answer:

\documentclass{article}
\usepackage[showframe]{geometry}

\usepackage{ragged2e, setspace}
\usepackage{booktabs, hhline, makecell, multirow, ltablex, longtable}
\setcellgapes{4pt}
\keepXColumns

\begin{document}

\makegapedcells
\begin{tabularx}{\linewidth}{|>{\RaggedRight}X||
                         *{3}{>{\RaggedRight}p{3.5cm}|}}
\caption[Summary of main characteristics of categories according to \textit{organicity}]
        {Summary of main characteristics of categories according to different degrees of \textit{organicity} identified in the organisational processes of the Drupal community}
\label{tab:layers-summary}\\
\hhline{=:t:=:=:=}
\multirow{2}{=}{\linespread{0.8}\selectfont % changed
                Characteristics of organisational processes}
    &   \multicolumn{3}{c|}{Degree of \textit{organicity}} \\
    \cline{2-4}
    &   $d_1$: High
        &   $d_2$: Intermediate
            &   $d_3$: Low                                  \\
\hhline{:=::=:=:=:}
    \endfirsthead
%%%%
\caption{Summary of main characteristics of categories according to \textit{organicity}
         (cont.)}% added
\label{tab:layers-summary}                                  \\
\hhline{=:t:=:=:=}
\multirow{2}{=}{\linespread{0.8}\selectfont
                Characteristics of organisational processes}
    &   \multicolumn{3}{c|}{Degree of \textit{organicity}}  \\
    \cline{2-4}
    &   $d_1$: High
        &   $d_2$: Intermediate
            &   $d_3$: Low            \\
\multirow{2}{=}{\linespread{0.8}\selectfont % changed
                Characteristics of organisational processes}
    &   \multicolumn{3}{c|}{Degree of \textit{organicity}} \\
    \cline{2-4}
    &   $d_1$: High % changed
        &   $d_2$: Intermediate
            &   $d_3$: Low                                  \\
\hhline{:=::=:=:=:}
    \endhead
%%%%
\hhline{-:t:-:-:-}
\multicolumn{4}{r}{\footnotesize\itshape
                    continue on the next page}
    \endfoot
\hhline{:=::=:=:=:}
    \endlastfoot
%%%%
Amount of explicit
    &   Based on implicit
        &   Intermediate amount
            &   Large amount of explicit                    \\
... &...&...& ...
\end{tabularx}

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.