0

I have been struggling with rewriting MS Word table which consists of 4 figures (Fig 2 - 5) into LaTeX environment (I need label all of the 4 figures because of references) - last part of the document I can't "solve".

Is it possible to do something like that

enter image description here

I haven't succeeded so far.

Or is it better to make 4 separate pictures and put them into the table (while removing the figures labels and label them all inside of LaTeX table instead?

Thanks!

4
  • Could you please show what you've tried so far to achive the desired output?
    – leandriis
    Mar 15 '20 at 18:36
  • Should the whole table also get a caption?
    – leandriis
    Mar 15 '20 at 18:37
  • Do you also want to reference the sub-parts of the images? e.g. something like "see figure 1b)"?
    – leandriis
    Mar 15 '20 at 18:49
  • @leandriis yes, the whole table should also get a caption as a "Table 1. Summary of nanomechanical experiments", while the pictures inside should be referred as pictures "Figure 2, Figure 3, ... , Figure 5". Yes, if it's possible, then it should be referenced as 2a) , 2b), etc. but this is not a condition. Well, to be honest, it's not much, mostly nothing. Not that I haven't tried, but I had also issues with the row alignment. I'm not an advanced LaTeX user, mostly writing "raw" articles / texts.
    – Josh E.
    Mar 15 '20 at 19:56
2

The following might get you started:

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{array}
\usepackage{caption}
\usepackage[export]{adjustbox}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize\bfseries}
\newlength{\imagewidth}
\setlength{\imagewidth}{5cm}
\newlength{\equationwidth}
\setlength{\equationwidth}{\textwidth-\imagewidth-4\tabcolsep}
\begin{document}

\begin{table}
\centering
\abovedisplayskip=0pt
\belowdisplayskip=0pt
\caption{summary of...}\label{table}
\begin{tabular}{ >{\centering\arraybackslash}p{\imagewidth} p{\equationwidth}}
\toprule
\thead{text here} & \begin{tabular}{@{}p{0.9\equationwidth}r@{}} \thead{text} &\thead{eq.}\end{tabular}\\
\midrule
  \includegraphics[width=\imagewidth,valign=t]{example-image}%
  \captionof{figure}{some image caption}%
  \label{image} &
  \begin{tabular}[t]{@{}p{\equationwidth}@{}}%
      {\begin{flalign} 
        E' = ...&& \label{continuity_1}
      \end{flalign}}
      \\ \midrule
      {\begin{flalign} 
        E = ...&& \label{continuity_2}
      \end{flalign}} 
      \\ \midrule
      {\begin{flalign} 
        H = ...&& \label{continuity_3}
      \end{flalign}} 
  \end{tabular}\\
\midrule
\end{tabular}
\end{table}

See table \ref{table} See figure \ref{image}
\end{document}

Here is an updated version with the rotated text:

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{array}
\usepackage{caption}
\usepackage[export]{adjustbox}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize\bfseries}
\newlength{\imagewidth}
\setlength{\imagewidth}{5cm}
\newlength{\equationwidth}
\setlength{\equationwidth}{\textwidth-\imagewidth-6\tabcolsep-2ex}
\usepackage{rotating}
\usepackage{multirow}
\begin{document}

\begin{table}
\centering
\abovedisplayskip=0pt
\belowdisplayskip=0pt
\caption{summary of...}\label{table}
\begin{tabular}{p{2ex} >{\centering\arraybackslash}p{\imagewidth} p{\equationwidth}}
\toprule
&\thead{text here} & \begin{tabular}{@{}p{0.9\equationwidth}r@{}} \thead{text} &\thead{eq.}\end{tabular}\\
\midrule
\parbox[t]{2mm}{\multirow{10}{*}{\rotatebox[origin=c]{90}{some rotated text}}}
&  \includegraphics[width=\imagewidth,valign=t]{example-image}%
  \captionof{figure}{some image caption}%
  \label{image} &
  \begin{tabular}[t]{@{}p{\equationwidth}@{}}%
      {\begin{flalign} 
        E' = ...&& \label{continuity_1}
      \end{flalign}}
      \\ \midrule
      {\begin{flalign} 
        E = ...&& \label{continuity_2}
      \end{flalign}} 
      \\ \midrule
      {\begin{flalign} 
        H = ...&& \label{continuity_3}
      \end{flalign}} 
  \end{tabular}\\
\midrule
\end{tabular}
\end{table}

See table \ref{table} See figure \ref{image}
\end{document}
8
  • Thank You! I'm going to try it right now and let you know :)
    – Josh E.
    Mar 15 '20 at 20:23
  • Thank you! I think I got it (github.com/JKhay/LaTeX/blob/master/Table%201). One last question: how do I manage to get the vertical text into the table: "Mechanical properties" , "Adhesion", "Tribological properties".
    – Josh E.
    Mar 15 '20 at 21:54
  • @JoshE.: Oh, I overlooked the rotated text. I'll add an update
    – leandriis
    Mar 15 '20 at 21:57
  • 1
    Update added. I just had a look at your code. Good job. One thing I however noticed is that the resulting table is quite likely too large to fit into the page. If you get a warning message such as "Float too large for page by ..." you will have to do some adjustments. either decrease the image size or switch to longtable in order to allos for a pagebreak.
    – leandriis
    Mar 15 '20 at 22:07
  • Thanks. However, the text is crossing the Figure 1 description. Is it possible to put it next to it (left side). I tried changing the \parbox dimension (not that I know much about it), but it didn't work. Apparently, I can't leave the tabular space with the paradox. Instead of creating a new column, is it possible to put a "text box" on a page which position is defined by coordinates (A4 dimensions)? I know the table is slightly larger than the page :) I will adjust it at the very end :-). I changed the dimension due to better img visibility. I have updated GitHub code.
    – Josh E.
    Mar 16 '20 at 7:42

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.