如何在边距中设置表格?

如何在边距中设置表格?
\documentclass[12pt]{book}‎‎
\usepackage[top=3.cm,bottom=3cm,left=2.2cm,right=6.2‎cm,marginparwidth=4.5‎cm‎,headsep=10pt,a4paper]{geometry}
‎\usepackage{amsmath,amsfonts,amssymb,amsthm}‎‎
\usepackage{booktabs}
\reversemarginpar‎
\usepackage{marginnote}
\begin{document}
 \marginpar{‎‎‏%
  ‎  ‎\begin{table}[h]‎
‎\centering‎
‎\begin{tabular}{l l l}‎
‎\toprule‎
‎1 & 1 & 1\\‎
‎\midrule‎
 1 & 1 & 0.562 \\‎
 2 & 1 & 0.910 \\‎
 3 & 11 & 0.296 \\‎
‎\bottomrule‎
‎\end{tabular}‎
‎\caption{‎}‎
‎\end{table}‎‎
}
‎‎\end{document}

答案1

您必须放弃该表格的浮动可能性。为了使用标题,请使用\captionoffrom 。caption

\documentclass[12pt]{book}
\usepackage[top=3.cm,bottom=3cm,left=2.2cm,right=6.2cm,marginparwidth=4.5cm,headsep=10pt,a4paper]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{booktabs}
%\reversemarginpar

\usepackage{caption}
\usepackage{marginnote}

\begin{document}
\listoftables
\cleardoublepage
\marginnote{%
\centering
\begin{tabular}{lll}
\toprule
1 & 1 & 1\\
\midrule
1 & 1 & 0.562 \\
2 & 1 & 0.910 \\
3 & 11 & 0.296 \\
\bottomrule
\end{tabular}
\captionof{table}{Sophisticated margin table}
}%

\end{document}

在此处输入图片描述

相关内容