标题在桌子外面? [英] Caption outside table?

查看:96
本文介绍了标题在桌子外面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向乳胶中的表添加标题,但是会引发此错误!LaTeX错误:\ caption位于float之外." 从错误中我猜到ti的意思是它在桌子外面,但是我已经清楚地放在里面了.

I'm trying to add a caption to a table in latex, however it throws this error "! LaTeX Error: \caption outside float." From the error I am guessing ti means that it is outside the table, but I have clearly put it inside.

\begin{tabular}{|c|c|c|c|c|c|}
\caption{Table1}
Potentiometer & Resistance  & \multicolumn{2}{c}{Calculated V\textsubscript{32}} & \multicolumn{2}{c|}{Measured V\textsubscript{32}}\\ \cline{3-6}
Position & R\textsubscript{34} & Amplitude & Phase & Amplitude & Phase\\ \hline \hline
1 & 303.8 & & 2.73 & 28.2 & 2.51\\
2 & 1.141k & & 1.81 & 28.2 & 1.63\\
3 & 3.453k & & 0.79 & 28.2 & 0.5\\
4 & 5.33k & & 0.53 & 28.2 & 0.38\\
5 & 7.45k & & 0.38 & 28.2 & 0.25\\
6 & 9.54k & & 0.30 & 28.2 & 0.13\\
7 & 10.84k & & 0.27 & 28.2 & 0.13\\
\hline
\end{tabular}

推荐答案

表格环境不带标题.您需要执行以下操作:

The tabular environment won't take a caption. You need to do something like this:

\begin{table}
\begin{tabular}{|c|c|c|c|c|c|}
Potentiometer & Resistance  & \multicolumn{2}{c}{Calculated V\textsubscript{32}} & \multicolumn{2}{c|}{Measured V\textsubscript{32}}\\ \cline{3-6}
Position & R\textsubscript{34} & Amplitude & Phase & Amplitude & Phase\\ \hline \hline
1 & 303.8 & & 2.73 & 28.2 & 2.51\\
2 & 1.141k & & 1.81 & 28.2 & 1.63\\
3 & 3.453k & & 0.79 & 28.2 & 0.5\\
4 & 5.33k & & 0.53 & 28.2 & 0.38\\
5 & 7.45k & & 0.38 & 28.2 & 0.25\\
6 & 9.54k & & 0.30 & 28.2 & 0.13\\
7 & 10.84k & & 0.27 & 28.2 & 0.13\\
\hline
\end{tabular}
\caption{Table1}
\label{tab:xyz}
\end{table}

这篇关于标题在桌子外面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆