我对表格放置有疑问。我希望表格锚定在文本中出现的位置(即“here”、“h”),并且列应该简单地环绕它。表格应该跨越两列。在下面的代码中,这并没有发生。表格被附加在所有文本的末尾 - 这不是我想要的。谢谢。
\documentclass[a4,12pt]{article}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{blindtext}
\begin{document}
\begin{multicols}{2}
\blindtext
\begin{table*}[h!]
\small
\centering
\begin{tabular}{@{} l c c @{}}
\toprule
Characteristic & \multicolumn{2}{c}{Result}\\
\cmidrule{2-3}
& Seaweed isolate & Coral isolate \\
\midrule
Cell shape & Rod & Rod\\
Gram stain & $-$ & $-$\\
Oxidase & $+$ & $-$\\
Catalase & $+$ & $-$\\
Anaerobic & Growth (weak) & No growth\\
Motility & $+$ & $-$ or ? \\
Indole production & $+$ & $-$ or ? \\
Hugh \& Leifsons & ? & ? \\
MSA \\
\hspace*{0.5cm}Growth & $+$ & $-$ \\
\hspace*{0.5cm}Mannitol utilisation & $+$ & ? \\
%Growth in absence of salt & & \\ (Didn't get time to do this one.)
Colony pigmentation & White & White \\
Colony texture & Smooth, creamy & Waxy, pellet-like \\
Colony edges & Entire & Entire \\
Colony shape & Round & Round \\
Colony elevation & Flat & Buldge\\
Medium modifications & Cracked patterns & Clear halo, pits, liquification\\
\bottomrule
\end{tabular}
\end{table*}
\blindtext
\blindtext
\end{multicols}
\end{document}
答案1
table*
没有h
位置,没有意义。只允许使用t
和。p
您可以使用:
% \usepackage{float}
\begin{multicols}{2}
...
\end{multicols}
\begin{table}[H]
...
\end{table}
\begin{multicols}{2}
...
\end{multicols}