表格侧面的标题

表格侧面的标题

floatrow我尝试将该包与来自(的接受答案中的方法一起使用图侧的标题) 将表格标题放在表格的右上角。但是,到目前为止,无论我尝试什么,都没有奏效。我使用这个float包。虽然不经常使用,但这就是为什么我不想或不能使用这个sidecap看起来实际上简单得多的包。我很快尝试了这种minipage方法,似乎有效,但不确定是否应该使用它。这是我用来尝试将标题放在右上方的简单表格:

\documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}

\usepackage{tabu}
\usepackage{booktabs}

\begin{document}

\begin{table}

\begin{tabu} to \textwidth {X[L] X[L]}

\toprule

AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\

\end{tabu}

\caption{This is the caption This is the caption This is the caption This is the caption This is the caption This is the
caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the
caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the
caption}

\end{table}

\end{document}

有人能帮忙解决这个floatrow方法吗?

答案1

由于您使用了一个KOMA-Script类,因此您可以使用它的captionbeside环境(根据需要调整长度):

\documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}
\usepackage{tabu}
\usepackage{booktabs}

\begin{document}

\begin{table}
\begin{captionbeside}
{This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption}
[r][\linewidth][0em]
\raisebox{0.8\totalheight}{%
\begin{tabu} to .4\textwidth {X[L] X[L]}
\toprule
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
AAAAAA & BBBBBB \\
\bottomrule
\end{tabu}%
}
\end{captionbeside}
\end{table}

\end{document}

在此处输入图片描述

相关内容