我想用 latex 包装两个表格。我的代码如下:
\usepackage{caption}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{lipsum}
\usepackage{floatrow}
\begin{wraptable}{l}
\begin{table}{H}
\begin{tabular}{|c|c|}
\hline
Topology - Distance function & ARI \\ \hline
Hextop - dist & 0 \\
Hextop - mandist & 0 \\
Randtop - dist & 0 \\
Randtop - mandist & 0 \\ \hline
\end{tabular}
\begin{tabular}{|c|c|}
\hline
Topology - Distance function & ARI \\ \hline
Hextop - dist & 0 \\
Hextop - mandist & 0 \\
Randtop - dist & 0 \\
Randtop - mandist & 0 \\ \hline
\end{tabular}
\caption{Comparison of ARI score for grid 10 x 10 and 70 maximal number of epochs (left) and grid 61 x 61 and 10 maximal number of epochs (right)}
\end{table}
\end{wraptable}
结果是:
如您所见,它的包装正确,但是页面左侧有符号table[H]
,表格中没有标题。我不知道如何改进它,我尝试在不使用的情况下构建此表格,\begin{table}
但我不知道该怎么做。我可以请你帮忙吗?
答案1
我认为您想要的是环境tabular
中两个相邻的table
。因此,只需删除wraptable
,然后更正table
语法即可。
\documentclass{article}
\usepackage{caption}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{floatrow}
\begin{document}
\begin{table}[H]
\begin{tabular}{|c|c|}
\hline
Topology - Distance function & ARI \\ \hline
Hextop - dist & 0 \\
Hextop - mandist & 0 \\
Randtop - dist & 0 \\
Randtop - mandist & 0 \\ \hline
\end{tabular}
\begin{tabular}{|c|c|}
\hline
Topology - Distance function & ARI \\ \hline
Hextop - dist & 0 \\
Hextop - mandist & 0 \\
Randtop - dist & 0 \\
Randtop - mandist & 0 \\ \hline
\end{tabular}
\caption{Comparison of ARI score for grid 10 x 10 and 70 maximal number of epochs (left) and grid 61 x 61 and 10 maximal number of epochs (right)}
\end{table}
\end{document}