我正在写这张表格:
\begin{table}[!t]
\centering
\caption{$\sigma(gg\to H \to X X^*)\mbox{fb}$ in $SU(5)_{eff}$ model at $\sin \beta \sim \sin \alpha$, $m_S$= 500 GeV, $Y_4=0.66- 0.69$, $k_i=10$, and $\zeta=-10$.}
\begin{tabular}{c|c|c}
\hline
Channel & $~ \sigma(gg\to H \to X X^*)~ \mbox{fb}~ $ & Exp. upper bound ~ fb \\ [0.5ex]
\hline
\hline
$WW^*$ & 11 & 54 \\
[1ex]
ZZ & 5 & 12 \\
[1ex]
$t\bar{t}$ & 148 & 550 \\
[1ex]
hh & 4 & 35 \\
[1ex]
jj & 5 & 15 \\
\hline
\hline
\end{tabular}
\label{tab1}
\end{table}
%
问题在于标题被空格破坏,例如:
我不知道为什么会发生这种情况,TeX 文件中其他图形的标题看起来很好。
编辑
这是我的 LaTeX 文件序言:
\documentclass[onecolumn,amsmath,amssymb]{revtex4}
%%%%%%%%%%%%%%%%%%%%% generic macros %%%%%%%%%%%%%%%%%%%%%%%
\topmargin -1.cm % distance to headers
\textwidth 170mm % Horizontal alignment
\textheight 235mm % height of text
\def\unit{\leavevmode\hbox{\small1\kern-3.6pt\normalsize1}}
\renewcommand{\baselinestretch}{1.12} \normalsize
\def\lsim{\raise0.3ex\hbox{$\;<$\kern-0.75em\raise-1.1ex\hbox{$\sim\;$}}}
\def\gsim{\raise0.3ex\hbox{$\;>$\kern-0.75em\raise-1.1ex\hbox{$\sim\;$}}}
\def\Frac#1#2{\frac{\displaystyle{#1}}{\displaystyle{#2}}}
\def\etal{{\it et al.}}
\def\eg{{\it e.g.}}
\def\ie{{\it i.e.}}
\usepackage{bm}
\usepackage{color}
\newcommand*{\B}[1]{\ifmmode\bm{#1}\else\textbf{#1}\fi}
\newcommand{\x}[2]{#1 \times #2}
\newcommand{\mat}[1]{\begin{pmatrix} #1 \end{pmatrix}}
\newcommand{\eq}[1]{Eq.~(\ref{#1})}
\usepackage{graphics}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{epsfig}
\usepackage{graphicx}
\newcommand{\be}{\begin{eqnarray}}
\newcommand{\ee}{\end{eqnarray}}
\newcommand{\1}{\mu_1^2}
\newcommand{\2}{\mu_2^2}
\newcommand{\3}{\mu_3^2}
\newcommand{\4}{\theta}
\newcommand{\5}{M_{_{Z'}}^2}
\newcommand{\g}{g''^2}
\newcommand{\FF}{{\cal F}}
\newcommand{\n}{\nonumber\\}
\newcommand{\nn}{\tilde{\nu}}
\newcommand{\dd}{\displaystyle}
\def\bea{\begin{eqnarray}}
\def\eea{\end{eqnarray}}
%
\usepackage{epsfig}
%%%%%%%%%%%%
\begin{document}
答案1
您给出的代码的一个问题是,它不像问题中所述的那样精简或可编译。所以我将其精简,只保留代码中的相关部分。
第二个问题是你调用包caption
时得到了“坏”的结果。如果你查看一下日志文件,你会发现类似这样的内容:
Package caption Warning: Unsupported document class (or package) detected,
(caption) usage of the caption package is not recommended.
See the caption package documentation for explanation.
...
Package caption Info: Begin \AtBeginDocument code.
Package caption Info: Incompatible package detected (regarding \caption).
(caption) \caption = macro:->\minipagefootnote@here \ifx \@captype \@undefined \@latex@error {\noexpand \cap
tion outside float}\@ehd \expandafter \@gobble \else \refstepcounter \@captype \expandafter \@firstofone \fi {\@dblarg {
\@caption \@captype }}.
Package caption Warning: \caption will not be redefined since it's already
(caption) redefined by a document class or package which is
(caption) unknown to the caption package.
See the caption package documentation for explanation.
Package caption Info: End \AtBeginDocument code.
简而言之:不要加载caption
包含此类的包!
使用以下缩写的 MWE
\listfiles
\documentclass[%
onecolumn,
% twocolumn,
amsmath,amssymb
]{revtex4}
\topmargin -1.cm % distance to headers
\textwidth 170mm % Horizontal alignment
\textheight 235mm % height of text
\renewcommand{\baselinestretch}{1.12} \normalsize
\usepackage{caption} % <================================================
\usepackage{showframe}
\usepackage{booktabs}
\begin{document}
Test text.
\begin{table}%[!t]
\centering
\caption{$\sigma(gg\to H \to X X^*)~\mbox{fb}$ in $SU(5)_{eff}$ model at
$\sin \beta \sim \sin \alpha$, $m_S$= 500 GeV, $Y_4=0.66- 0.69$,
$k_i=10$, and $\zeta=-10$.}
\label{tab:tab1}
\begin{tabular}{ccc}
\toprule
Channel & $\sigma(gg\to H \to X X^*)~\mbox{fb}$ & Exp. upper bound~fb \\[0.5ex]
\midrule
$WW^*$ & 11 & 54 \\[1ex]
ZZ & 5 & 12 \\[1ex]
$t\bar{t}$ & 148 & 550 \\[1ex]
hh & 4 & 35 \\[1ex]
jj & 5 & 15 \\
\bottomrule
\end{tabular}
\end{table}
Test text2. See table~\ref{tab:tab1}.
\end{document}
我得到了以下结果 pdf(包含上面显示的消息):
您可以看到表格标题显示的不是您拥有的空间。
在注释掉包的调用后,caption
我得到了以下结果pdf(没有包的警告caption
):
你看出了区别吗?
请研究我修改后的 MWE,我修改了很多东西。最后,你两次调用了几个包(不要这样做!),并且在我删除的代码中留下了未使用的命令。
最后我添加了命令\listfiles
作为第一行来获取所有使用的包的列表和MWE 编译的版本号。请将以下列表与您系统上的结果进行比较。我猜您的系统过时了,导致了您遇到的问题:
*File List*
revtex4.cls 2001/08/03 v4.0 (http://publish.aps.org/revtex4/ for documentation)
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
natbib.sty 2010/09/13 8.31b (PWD, AO)
revsymb.sty 2001/08/03 v4.0 (http://publish.aps.org/revtex4/ for documentation)
amssymb.sty 2013/01/14 v3.01 AMS font symbols
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
amsmath.sty 2016/03/10 v2.15b AMS math features
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
amsbsy.sty 1999/11/29 v1.2d Bold Symbols
amsopn.sty 2016/03/08 v2.02 operator names
aps.rtx 2001/08/03 v4.0 (http://publish.aps.org/revtex4/ for documentation)
10pt.rtx 2001/08/03 v4.0 (http://publish.aps.org/revtex4/ for documentation)
caption.sty 2016/02/21 v3.3-144 Customizing captions (AR)
caption3.sty 2016/05/22 v1.7-166 caption3 kernel (AR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
showframe.sty 2011/02/24 v0.1i showframe (new impl., RN)
eso-pic.sty 2015/07/21 v2.0g eso-pic (RN)
atbegshi.sty 2016/06/09 v1.18 At begin shipout hook (HO)
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
ifpdf.sty 2016/05/14 v3.1 Provides the ifpdf switch
xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
pdftex.def 2016/06/17 v0.06h Graphics/color for pdfTeX
booktabs.sty 2005/04/14 v1.61803 publication quality tables
supp-pdf.mkii
umsa.fd 2013/01/14 v3.01 AMS symbols A
umsb.fd 2013/01/14 v3.01 AMS symbols B
***********
)
顺便说一句:我使用的系统是
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2016.5.24)
(日志文件的第一行)...
请在您的问题中添加相关信息,例如所用系统和软件包版本的所有差异...