3

I am trying to write the following "gothic" table but I have many troubles with equally distributed spacing and size of the text.

I try the following with tabular:

    \begin{table}
        \begin{center}
            \begin{tabular*}{\textwidth}{p{0.2\textwidth}p{0.2\textwidth}p{0.2\textwidth}p{0.2\textwidth}p{0.2\textwidth}}
                \hline \hline 
                \rule[-1ex]{0pt}{4ex} \multirow{6}{*}{\includegraphics[width=20mm]{./Muscles/biceps.jpg}} & \bf{Origin} & \multicolumn{3}{l}{Short head: tip of coracoid process of scapula; Long head: supraglenoid tubercle of scapula}\\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Insertion} & \multicolumn{3}{l}{Tuberosity of radius and fascia of forearm via bicipital aponeurosis} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Action} & \multicolumn{3}{l}{Supinates forearm and, when it is supine, flexes forearm} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Innervation} & \multicolumn{3}{l}{Musculocutaneous nerve (C5 and C6 ) (C5, C6)} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & $F^{max}_{iso}$ & $\alpha$ & $l^{CE}_{opt}$ & $l^{T}_{sclack}$ \\
                \rule[-1ex]{0pt}{4ex} & [N] & [deg] & [m] & [m] \\
                \hline \hline
            \end{tabular*}
            \caption{Threshold and saturation values for the experimental subject.}
            \label{tabpar2}
        \end{center}
    \end{table}

With this code I obtain the following, where the error is that the line doesn't break at the end: result w/ tabular

On the other hand, if I try the following code, the line breaks and the last columns are wqually distributed, but multicolumn does not work:

    \begin{table}
        \begin{center}
            \begin{tabularx}{\textwidth}{clXXX}
                \hline \hline 
                \rule[-1ex]{0pt}{4ex} \multirow{6}{*}{\includegraphics[width=20mm]{./Muscles/biceps.jpg}} & \bf{Origin} & \multicolumn{3}{X}{Short head: tip of coracoid process of scapula; Long head: supraglenoid tubercle of scapula}\\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Insertion} & \multicolumn{3}{X}{Tuberosity of radius and fascia of forearm via bicipital aponeurosis} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Action} & \multicolumn{3}{X}{Supinates forearm and, when it is supine, flexes forearm} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & \bf{Innervation} & \multicolumn{3}{X}{Musculocutaneous nerve (C5 and C6 ) (C5, C6)} \\
                \cline{2-5} \rule[-1ex]{0pt}{4ex} & $F^{max}_{iso}$ & $\alpha$ & $l^{CE}_{opt}$ & $l^{T}_{sclack}$ \\
                \rule[-1ex]{0pt}{4ex} & [N] & [deg] & [m] & [m] \\
                \hline \hline
            \end{tabularx}
            \caption{Threshold and saturation values for the experimental subject.}
            \label{tabpar2}
        \end{center}
    \end{table}

And this is the result: Result w/ tabular X

Is there any solution to fix this????

Thanks a lot

2

The trick is to basically use

\multicolumn{3}{>{\hsize=3\hsize}X}

with a small adjustment. I'd define a new environment for this kind of table, with the image data as argument. The image itself is placed by a fixed \muscleimage command in order to avoid complicated code as much as possible.

\documentclass{article}
\usepackage[demo]{graphicx} % demo is just for the example
\usepackage{tabularx,booktabs,amsmath,adjustbox}

\newcommand{\muscleimage}{}
\newenvironment{muscle}[2][]
 {%
  \renewcommand{\muscleimage}{%
    \adjustbox{valign=t,set depth=0pt}{\includegraphics[#1]{#2}}%
  }%
  \tabularx{\textwidth}{clXXX}
 }
 {%
  \endtabularx
 }
\newcommand{\fulltable}[1]{%
  \multicolumn{3}{>{\hsize=\dimexpr3\hsize+4\tabcolsep\raggedright\arraybackslash}X}{#1}%
}

\begin{document}

\begin{table}
\centering
\begin{muscle}[height=40mm,width=20mm]{./Muscles/biceps.jpg}
\toprule
\muscleimage
& \textbf{Origin}
& \fulltable{
    Short head: tip of coracoid process of scapula; Long head: supraglenoid tubercle of scapula
  } \\
\cmidrule{2-5}
& \textbf{Insertion}
& \fulltable{
    Tuberosity of radius and fascia of forearm via bicipital aponeurosis
  } \\
\cmidrule{2-5}
& \textbf{Action}
& \fulltable{
    Supinates forearm and, when it is supine, flexes forearm
  } \\
\cmidrule{2-5}
& \textbf{Innervation}
& \fulltable{
    Musculocutaneous nerve (C5 and C6 ) (C5, C6)
  } \\
\cmidrule{2-5}
& $F^{\textup{max}}_{\textup{iso}}$
& $\alpha$ & $l^{\textup{CE}}_{\textup{opt}}$
& $l^{T}_{\textup{sclack}}$ \\
& [N] & [deg] & [m] & [m] \\
\bottomrule
\end{muscle}
\caption{Threshold and saturation values for the experimental subject.}
\label{tabpar2}
\end{table}

\end{document}

enter image description here

2

Here is a solution with tabularx and booktabs. I made the last threecolumns X columns and defined a new Y column type, that behaves as X, but thrice as wide, for use in the multicolumn{3}. No need for invisible vertical rules: they're replaced in the preamble with ad hoc values of \aboverulesep and \belowrulesep. The multirow command may require another adjustment to be vertically centred, depending on the real image.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe, nomarginpar]{geometry}
\usepackage{multirow}
\usepackage{mathtools}
\usepackage{array, caption, tabularx, booktabs}
\usepackage[demo]{graphicx}

\setlength{\aboverulesep}{1ex}
\setlength{\belowrulesep}{1.5ex}
\newcolumntype{Y}{{>{\hsize=3\hsize}X}}

\begin{document}
\begin{table}
    \centering
        \begin{tabularx}{\linewidth}{ll*{3}{X}}
            \toprule\midrule
            \multirow{6}{*}[-5.25ex]{\includegraphics[width=20mm]{./Muscles/biceps.jpg}} & \bf{Origin} & \multicolumn{3}{Y}{Short head: tip of coracoid process of scapula; Long head: supraglenoid tubercle of scapula}\\
            \cmidrule{2-5} & \bf{Insertion} & \multicolumn{3}{Y}{Tuberosity of radius and fascia of forearm via bicipital aponeurosis} \\
            \cmidrule{2-5} & \bf{Action} & \multicolumn{3}{Y}{Supinates forearm and, when it is supine, flexes forearm} \\
            \cmidrule{2-5} & \bf{Innervation} & \multicolumn{3}{Y}{Musculocutaneous nerve (C5 and C6 ) (C5, C6)} \\
            \cmidrule{2-5}& $F^{\max}_\mathrm{iso}$ & $\alpha$ & $l^{CE}_\mathrm{opt}$ & $l^{T}_\mathrm{sclack}$ \\
    \addlinespace[1.5ex]
             & [N] & [deg] & [m] & [m] \\
            \midrule \bottomrule
        \end{tabularx}
        \caption{Threshold and saturation values for the experimental subject.}
        \label{tabpar2}
\end{table}

\end{document} 

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.