1

I created a illustration where I have a image on the left side and a table on the right side.

\documentclass[
    english,
    ruledheaders=section,%Ebene bis zu der die Überschriften mit Linien abgetrennt werden, vgl. DEMO-TUDaPub
    class=report,% Basisdokumentenklasse. Wählt die Korrespondierende KOMA-Script Klasse
    thesis={type=master,department = matgeo},% Dokumententyp Thesis, für Dissertationen siehe die Demo-Datei DEMO-TUDaPhd
    accentcolor=8b,% Auswahl der Akzentfarbe
    custommargins=false,% Ränder werden mithilfe von typearea automatisch berechnet
    marginpar=false,% Kopfzeile und Fußzeile erstrecken sich nicht über die Randnotizspalte
    %BCOR=5mm,%Bindekorrektur, falls notwendig
    parskip=half-,%Absatzkennzeichnung durch Abstand vgl. KOMA-Script
    fontsize=12pt,%Basisschriftgröße laut Corporate Design ist mit 9pt häufig zu klein
    %logofile=example-image, %Falls die Logo Dateien nicht vorliegen
    pdfa=true,
]{tudapub}

\usepackage{floatrow} \usepackage{array}

\newfloatcommand{capbtabbox}{table}[][\FBwidth] \newenvironment{conditions} {\par\vspace{\abovedisplayskip}\noindent\begin{tabular}{>{$}l<{$} @{${}={}$} l}} {\end{tabular}\par\vspace{\belowdisplayskip}} \newcolumntype{C}[1]{>{\centering\let\newline\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{L}[1]{>{\raggedleft\let\newline\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>{\raggedright\let\newline\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document} \begin{figure}[h] \begin{floatrow} \ffigbox{\includegraphics[scale=0.45]{Microreactor.PNG}}{ \caption{Sketch of MIMiX full system. A combination of microreactor and control system.} \label{fig: Mikroreaktor} } \capbtabbox{ \centering %\captionsetup{width=.75\textwidth} \begin{tabular}{\columnwidth}{R{5cm} C{3cm} } \cmidrule[1pt]{1-2} \textbf{Properties}&\textbf{Limits}\ \cmidrule{1-2} \textbf{Pressure [hPa] } & 180 - 1000\ \textbf{Temperatur [\text{°}C]} & 250 - 293\ \textbf{RH [%]} & dry - >93\ \textbf{Accurency <80% RH [%]} & 3\ \textbf{Accurency >80% RH [%]} & 5\ \cmidrule[1pt]{1-2} \end{tabular} \label{tab: ReaktorEigenschaften} }{\caption[Important Limits and parameters of the MIMiX system.]{Important Limits and parameters of \the MIMiX system.}} \end{floatrow} \end{figure} \end{document}

How can I set the caption of the table on the top?

\usepackage{floatrow}
\floatsetup[table]{capposition=top}

is not working? Does someone have any idea?

Cosis94
  • 13
  • 4
  • Please make sure your example is complete, such that others can copy and test the example as is. Here there is no document class. – daleif Nov 30 '21 at 12:47
  • Done! Sorry I am new to LaTex. I used the package "tuda-ci". It is a package specifically for the corporate design of the institute. – Cosis94 Nov 30 '21 at 12:54
  • 2
    Why you use floatrow environment for including images? Does you document class not support more simple \begin{figure}\caption{caption now will be on the top of float}\label:fig:<label name>}\includegraphics[<options, if exist>]{<image file name>}\end{figure}? – Zarko Nov 30 '21 at 13:06
  • Because I am trying to place the image and the table side by side. I found this https://tex.stackexchange.com/questions/6850/table-and-figure-side-by-side-with-independent-captions and implemented it in my script. – Cosis94 Nov 30 '21 at 13:17

1 Answers1

0

I am not sure if you can use the subcaption package instead. If you can use this package, the solution is pretty straightforward. For a caption on top of the table, put it on the top and for in the bottom of the table, put in the bottom. For your case, the code is

\documentclass[
    english,
    ruledheaders=section,%Ebene bis zu der die Überschriften mit Linien abgetrennt werden, vgl. DEMO-TUDaPub
    class=report,% Basisdokumentenklasse. Wählt die Korrespondierende KOMA-Script Klasse
    thesis={type=master,department = matgeo},% Dokumententyp Thesis, für Dissertationen siehe die Demo-Datei DEMO-TUDaPhd
    accentcolor=8b,% Auswahl der Akzentfarbe
    custommargins=false,% Ränder werden mithilfe von typearea automatisch berechnet
    marginpar=false,% Kopfzeile und Fußzeile erstrecken sich nicht über die Randnotizspalte
    %BCOR=5mm,%Bindekorrektur, falls notwendig
    parskip=half-,%Absatzkennzeichnung durch Abstand vgl. KOMA-Script
    fontsize=12pt,%Basisschriftgröße laut Corporate Design ist mit 9pt häufig zu klein
    %logofile=example-image, %Falls die Logo Dateien nicht vorliegen
    pdfa=true,
]{tudapub}

\usepackage{array} \usepackage{booktabs} \usepackage{subcaption}

\newcolumntype{C}[1]{>{\centering\let\newline\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{L}[1]{>{\raggedleft\let\newline\\arraybackslash\hspace{0pt}}m{#1}} \newcolumntype{R}[1]{>{\raggedright\let\newline\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document} \begin{figure}[h] \begin{subfigure}[B]{0.45\linewidth} \includegraphics[width=\textwidth]{Microreactor.png} % added the first result from a search on google for microreactor as the image \caption{Sketch of MIMiX full system. A combination of microreactor and control system.} \label{fig: Mikroreaktor} \end{subfigure} \begin{subtable}[B]{0.45\linewidth} \centering \caption[Important Limits and parameters of the MIMiX system.]{Important Limits and parameters of \the MIMiX system.} \label{tab: ReaktorEigenschaften} \begin{tabular}{\columnwidth}{R{5cm} C{3cm} } \cmidrule[1pt]{1-2} \textbf{Properties}&\textbf{Limits}\ \cmidrule{1-2} \textbf{Pressure [hPa] } & 180 - 1000\ \textbf{Temperatur [C]} & 250 - 293\ \textbf{RH [%]} & dry - >93\ \textbf{Accurency <80% RH [%]} & 3\ \textbf{Accurency >80% RH [%]} & 5\ \cmidrule[1pt]{1-2} \end{tabular} \end{subtable}

\end{figure} \end{document}

output

Imran
  • 3,096