1

I'm writting this table:

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

The problem is that the Caption is corrupted by spaces like:

enter image description here

I don't know why this happens, the Captions in the other figures in the TeX file looks fine.

Edit

Here is my LaTeX file preamble:

\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}
4
  • 3
    Welcome, the reason most likely is hidden in your document preamble. Please provide a minimal working example.
    – Johannes_B
    Commented Jun 25, 2016 at 19:30
  • In particular, please do tell us how wide the text block is.
    – Mico
    Commented Jun 25, 2016 at 19:46
  • When I try your preamble followed by your table and \end{document} I do not get the same caption as you have. Try to scale down your example and give a compilable code that reproduces the behavior.
    – StefanH
    Commented Jun 26, 2016 at 12:54
  • Even with the preamble, the error will not reproduce for me. Just as an experiment, try removing the caption package. Commented Jun 26, 2016 at 13:33

1 Answer 1

3

One problem of your given code is that it is not minimal or compilable as presented in your question. So I stripped it down to have only the relevant parts inside the code.

The second problem is that you call package caption with "bad" result. If you have a look into the log file you will find something like that:

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.

To make it short: Do not load package caption with this class!

With the following shortened 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}

I get the following resulting pdf (with the shown messages above):

resulting pdf with caption

You can see that the table caption shows not the spaces you have.

After commenting the call of package caption I get the following resulting pdf (without the warning for package caption):

enter image description here

You see the difference?

Please study my changed MWE, I changed a lot of things. At last you called several packages twice (Do not do this!) and left not used commands in the code I deleted too.

At last I added command \listfiles as first line to get an list of all used packages and version numbers for the compiling of the MWE. Please compare the following list with the result on your system. I guess your system is outdated causing the problem you have:

 *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
 ***********

 ) 

BTW: my used system is

This is pdfTeX, Version 3.14159265-2.6-1.40.17 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2016.5.24) 

(first line of log file) ...

Please add relevant informations to your question, for example all differences in used system and package versions ...

You must log in to answer this question.

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