3
\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}
2
  • Why this code has error?
    – iman
    Apr 29, 2014 at 16:23
  • There are a lot of strange characters in your MWE. And most probably a floating table will cause an error in the margin!
    – user31729
    Apr 29, 2014 at 16:45

1 Answer 1

3

You have to drop the floating possibility of that table. In order to use the caption, \captionof from caption is used.

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

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .