[Tex/LaTex] Column-layout tabular in subfigure

positioningsubfloatstables

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.

What it looks like right now
My MWE:

\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.

\adjustbox{valign=t}{
    \subfloat{

has to be

\adjustbox{valign=t}{%
    \subfloat{%

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 adjustboxes, 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.

% arara: pdflatex

\documentclass{article}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{subcaption}

\begin{document}    
\begin{figure}
    \centering
    \begin{subtable}{.45\linewidth}
        \centering
        \begin{tabular}{ll}
            Line style  & Explanation  \\\midrule
            some text 1 & other text 1 \\
            some text 2 & other text 2 \\
        \end{tabular}\hfil
    \end{subtable}  
    \begin{subtable}{.45\linewidth}
        \centering
        \begin{tabular}{ll}
            Line style  & Explanation  \\\midrule
            some text 1 & other text 1 \\
            some text 2 & other text 2 \\
        \end{tabular}
    \end{subtable}

    \begin{subfigure}{.45\linewidth}
        \centering
        \includegraphics[width=.45\textwidth]{example-image-a}
        \caption{\ang{30} left}
    \end{subfigure}\hfil
    \begin{subfigure}{.45\linewidth}
        \centering
        \includegraphics[width=.45\textwidth]{example-image-b}
        \caption{\ang{30} right}
    \end{subfigure}
    \caption{figure name}\label{fig:label}
\end{figure}
\end{document}

enter image description here

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:

% arara: pdflatex

\documentclass{article}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{subcaption}

\begin{document}    
\begin{figure}
    \centering
    \begin{subfigure}{.45\linewidth}
        \centering
        \begin{tabular}{ll}
            Line style  & Explanation  \\\midrule
            some text 1 & other text 1 \\
            some text 2 & other text 2 \\
        \end{tabular}
        \includegraphics[width=.45\textwidth]{example-image-a}
        \caption{\ang{30} left}
    \end{subfigure}\hfil
    \begin{subfigure}{.45\linewidth}
        \centering
        \begin{tabular}{ll}
            Line style  & Explanation  \\\midrule
            some text 1 & other text 1 \\
            some text 2 & other text 2 \\
        \end{tabular}
        \includegraphics[width=.45\textwidth]{example-image-b}
        \caption{\ang{30} right}
    \end{subfigure}
    \caption{figure name}\label{fig:label}
\end{figure}
\end{document}