1

How can I display the table caption at the left side?

Thank you, enter image description here

  • 3
    Have you tried the sidecap package? – Mike Renfro Oct 1 '17 at 18:17
  • Alternatively, you can put the caption inside a minipage. – John Kormylo Oct 1 '17 at 22:12
1

You can use minipage environments to place content side-by-side. The \caption can be in a different minipage as the tabular environment. Using the optional argument of minipage you then can align both at the top. For this to work well I recommend to set the \abovecaptionskip locally to zero to avoid some unwanted space above the caption. Also the tabular minipage should start with \vspace*{0pt} to have an zero-height line there for the alignment.

Here an example code with minipages and then a second way using the adjustbox package.

\documentclass{article}
\usepackage{adjustbox}
\usepackage{booktabs}
\usepackage{lipsum}

\begin{document}
\lipsum

\begin{table}

\begin{minipage}[t]{.2\textwidth}
    \setlength{\abovecaptionskip}{0pt}%
    \caption{The caption text over multiple lines}%
\end{minipage}\hfill
\begin{minipage}[t]{.75\textwidth}\vspace*{0pt}%
    \begin{tabular}{lll}\toprule
        bla & blu & lbll \\
        \midrule
        bla & djfgkdjf jkdfg  dfkgjd kjgkd fkgjdkfgj kdjfgkj & lbll \\
        bla & blu & lbll \\
        bla & blu & lbll \\
        \bottomrule
    \end{tabular}
\end{minipage}


\end{table}

\lipsum


\begin{table}

\begin{adjustbox}{minipage=[t]{.2\textwidth},valign=t}
    \setlength{\abovecaptionskip}{0pt}%
    \caption{The caption text over multiple lines}%
\end{adjustbox}\hfill
\begin{adjustbox}{minipage=.75\textwidth,valign=t}
    \begin{tabular}{lll}\toprule
        bla & blu & lbll \\
        \midrule
        bla & djfgkdjf jkdfg  dfkgjd kjgkd fkgjdkfgj kdjfgkj & lbll \\
        bla & blu & lbll \\
        bla & blu & lbll \\
        \bottomrule
    \end{tabular}
\end{adjustbox}

\end{table}

\lipsum


\end{document}

Both figures look like this.

Result

Note that you can adjust the widths by changing .2\textwidth and .75\textwidth. Both should add up to less then 1.0\textwidth and there should not be a line break between the minipages so that both build a single line.

1

with use of package sidecup:

\documentclass{article}
\usepackage[leftcaption]{sidecap} % <-- added
\usepackage{booktabs}
\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{SCtable}[][ht]
\caption{The caption text over multiple lines on outer side of table}%
\label{tab:side}
    \begin{tabular}{lll}\toprule
        bla & blu & lbll \\
        \midrule
        bla & djfgkdjf jkdfg  dfkgjd kjgkd fkgjdkfgj kdjfgkj & lbll \\
        bla & blu & lbll \\
        bla & blu & lbll \\
        \bottomrule
    \end{tabular}
\end{SCtable}
\lipsum[2]
\begin{table}[ht]
\caption{The caption text over multiple lines on the top of table}%
\label{tab:top}
\centering
    \begin{tabular}{lll}\toprule
        bla & blu & lbll \\
        \midrule
        bla & djfgkdjf jkdfg  dfkgjd kjgkd fkgjdkfgj kdjfgkj & lbll \\
        bla & blu & lbll \\
        bla & blu & lbll \\
        \bottomrule
    \end{tabular}
\end{table}
\lipsum[3]
\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.