I want a table over each column in my figure that contains subfigures in a column-layout.
I have tried different combinations of minipage and adjustbox, but have not managed to find a solution.
The two tables should be next to each other, thus not having a y-offset.
\documentclass{article}
\usepackage[abs]{overpic}
\usepackage{graphicx}
\usepackage{subfig}
\usepackage{siunitx}
\usepackage{adjustbox}
\usepackage{tikz}
\begin{document}
\begin{figure}
\begin{minipage}[c]{\textwidth}
\adjustbox{valign=t}{
\subfloat{
\begin{tabular}{ll}
Line style & Explanation \\
\hline
some text 1 & other text 1 \\
some text 2 & other text 2 \\
\end{tabular}
} \qquad
} \qquad
\adjustbox{valign=t,center}{
\subfloat{
\begin{tabular}{ll}
Line style & Explanation \\
\hline
some text 1 & other text 1 \\
some text 2 & other text 2 \\
\end{tabular}
} \qquad
}
\end{minipage} \qquad
\subfloat[\SI{30}{\degree} left]{\includegraphics[width=0.5\textwidth]{example-image-a}}\qquad
\subfloat[\SI{30}{\degree} right]{\includegraphics[width=0.5\textwidth]{example-image-a}}\qquad
\caption{figure name}
\label{fig:label}
\end{figure}
\end{document}
\end{document}
Best Answer
You are inserting several unwanted spaces and newlines. Don't use blank lines if you do not want new paragraphs to start.
has to be
because both lines introduce a spurious white space. It helps a lot if you load the package
lua-visual-debug
and compile with LuaLaTeX. You will see that your example is having many problems talking about margins and exaggerated boxes.As I do not know, what you want to obtain by those
adjustbox
es, I took the liberty to rewrite your code as I would have written it. I hope, I got your right. Please note that there is just one blank line which is actually needed. You may want to change the width of those subfigures and tables. Instead of\hfil
you can use\hfill
if you want to push the boxes to the most outer position.As you do not use any caption for your tables, you can also just put them in the same
subfigure
as your image which will result in much shorter code: