我正在使用该floatrow
包进行浮动和标题设计。我喜欢将标题放在图形/表格旁边;但是,当我将它们垂直放置在顶部时,我认为如果标题(包括标签)低几个点,效果会更好。有什么建议可以实现这一点吗?我查看了文档floatrow
,没有找到明显的解决方案。该\floatcapbesidemargins
选项设置左/右边距。添加vspace
floatbox 的第一个参数不会起作用(编辑,因为表格会突出到我绘制的顶部\rule
),所以也许暂时重新定义caption
会更明智?
\documentclass[11pt]{scrartcl}
\usepackage{floatrow}
\usepackage{booktabs}
\begin{document}
\rule{\linewidth}{0.4pt}
\floatbox[\capbeside\thisfloatsetup{capbesideposition={left,top},capbesidesep=columnsep}]{table}
{\caption{I would like this caption, including the label, to be slightly lower. Say a few pts}\label{test}}%
{\begin{tabular}{ll}\toprule
column 1a & column 2a \\
column 1b & column 2b \\
column 1c & column 2c\\\bottomrule
\end{tabular}}
\rule{\linewidth}{0.4pt}
\end{document}
答案1
你可以欺骗乳胶,用可选参数让它相信比实际上要低,\raisebox
并在表格前添加 \vertical 间距来补偿:
\documentclass[11pt]{scrartcl}
\usepackage{floatrow}
\usepackage{booktabs}
\begin{document}
\noindent\hrulefill
\vskip 1ex
\floatbox[\capbeside\thisfloatsetup{capbesideposition={left,top},capbesidesep=columnsep}]{table}
{\caption{I would like this caption, including the label, to be slightly lower. Say a few pts}\label{test}}%
{\raisebox{0pt}[0.8\height]{\begin{tabular}{ll}\toprule
column 1a & column 2a \\
column 1b & column 2b \\
column 1c & column 2c\\\bottomrule
\end{tabular}}}
\noindent\hrulefill
\end{document}
答案2
答案3
您可以通过以下技巧获得与@Bernard 答案(+1)类似的结果:
\documentclass[11pt]{scrartcl}
\usepackage{floatrow}
\usepackage{booktabs}
\usepackage{lipsum}
\begin{document}
\lipsum[1]{1-2]
\noindent\rule{\linewidth}{1pt}
\floatbox[\capbeside\thisfloatsetup{capbesideposition={left,top},capbesidesep=columnsep}]{table}
{
\caption{\protect\rule{0pt}{2.8ex}
I would like this caption, including the label, to be slightly lower. Say a few pts}
\label{test}}%
{
\begin{tabular}{ll}\toprule
column 1a & column 2a \\
column 1b & column 2b \\
column 1c & column 2c \\\bottomrule
\end{tabular}
}
\lipsum[1]{3-4]
\end{document}
编辑:\protect\rule{0pt}{2.8ex}
解决方案现已重写。通过在标题前插入文本来删除标题。
我想知道,浮动框上方和下方的规则的目的是什么。它们对浮动框上方和下方的空间有很大的影响。