表格标题为小写

表格标题为小写

我遇到了表格标题方面的问题。我正在撰写IEEEtran期刊论文。我的文章中有一张表格,但标题并没有按预期以大写形式显示。我曾经从序言中删除了标题包,问题似乎解决了,但图表标题却受到了影响。

这是我的脚本序言

\documentclass[journal,10pt,onecolumn,draftclsnofoot]{IEEEtran}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{eurosym}
\usepackage{authblk}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{amsmath}
\usepackage{tikz,lipsum}
\usepackage{caption}
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage{amsthm}
\usepackage{mathrsfs}
\usepackage{slashbox}
\usepackage{mathrsfs}
\usepackage{color}
\setcounter{MaxMatrixCols}{10}

我的表定义为

\begin{table}[H]
\caption{Different values of $\protect\gamma ^{\ast }$.}
\label{tab1}
\centering
\begin{tabular}{c|cccccccc}
\hline
\backslashbox{$C$}{$\overline{\gamma }_{1} [dB]$} & $0$ & $5$ & $10$ & $15$
& $20$ & $25$ & $30$ & $35$ \\ \hline
$C=0.25$ & $0.1558$ & $0.3214$ & $0.5385$ & $0.7408$ & $0.8771$ & $0.9483$ &
$0.9798$ & $0.9925$ \\ \hline
$C=0.5$ & $0.1486$ & $0.3122$ & $0.5307$ & $0.7364$ & $0.8752$ & $0.9476$ & $%
0.9796$ & $0.9924$ \\ \hline
$C=0.8$ & $0.1430$ & $0.3038$ & $0.5228$ & $0.7317$ & $0.8732$ & $0.9469$ & $%
0.9793$ & $0.9923$ \\ \hline
\end{tabular}%
\end{table}

请帮助我找出解决这个问题的方法。

答案1

正如 Christian Hupfer 在评论中指出的那样,该caption包与文档类不兼容IEEEtran;您应该已经收到有关此问题的警告消息。

$由于几乎所有的表都处于数学模式,因此您可以通过从一个tabular环境切换到另一个环境来避免输入大量符号array

不要使用过时的slashbox软件包,因为 TeXLive 不再分发该软件包。相反,请使用该diagbox软件包。

最后,请考虑让您的表格看起来更加“开放”。以下屏幕截图和代码中的第二个表格提供了一个示例。

在此处输入图片描述

\documentclass[journal,10pt,onecolumn,draftclsnofoot]{IEEEtran}
\usepackage{amsfonts,amssymb,amsmath,amsthm}
\setcounter{MaxMatrixCols}{10}
\usepackage{eurosym}
\usepackage{authblk}
\usepackage{cite}
\usepackage{graphicx}
%\usepackage{epstopdf} % not needed
\usepackage{tikz,lipsum}
%%\usepackage{caption} % doesn't work with "IEEEtran" class
\usepackage{float}
\usepackage[T1]{fontenc}
\usepackage{mathrsfs}
%%\usepackage{slashbox} % obsolete -- use "diagbox" package instead
\usepackage{diagbox}
%%%\usepackage{mathrsfs} % don't load any package twice
\usepackage{xcolor} % more modern than "color"
\usepackage{booktabs} % <--- new

\begin{document}

\begin{table}[t!]
\caption{Different values of $\gamma^{\ast}$.}
\label{tab1}
\centering
$\begin{array}{l|cccccccc@{}}
\hline
$\backslashbox{$C$}{$\bar{\gamma}_1$ [dB]}$
     & 0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 \\ 
\hline
0.25 & 0.1558 & 0.3214 & 0.5385 & 0.7408 & 0.8771 & 0.9483 & 0.9798 & 0.9925 \\ 
\hline
0.5  & 0.1486 & 0.3122 & 0.5307 & 0.7364 & 0.8752 & 0.9476 & 0.9796 & 0.9924 \\ 
\hline
0.8  & 0.1430 & 0.3038 & 0.5228 & 0.7317 & 0.8732 & 0.9469 & 0.9793 & 0.9923 \\ 
\hline
\end{array}$
\end{table}

\begin{table}[h]
\caption{Same table, but with a more ``open'' look}
\label{tab1}
\centering
$\begin{array}{@{} l *{8}{c} @{}}
\toprule
C & \multicolumn{8}{c@{}}{\bar{\gamma}_1 \text{ [dB]}}\\
    \cmidrule(l){2-9}
     & 0 & 5 & 10 & 15 & 20 & 25 & 30 & 35 \\ 
\midrule
0.25 & 0.1558 & 0.3214 & 0.5385 & 0.7408 & 0.8771 & 0.9483 & 0.9798 & 0.9925 \\ 
0.5  & 0.1486 & 0.3122 & 0.5307 & 0.7364 & 0.8752 & 0.9476 & 0.9796 & 0.9924 \\ 
0.8  & 0.1430 & 0.3038 & 0.5228 & 0.7317 & 0.8732 & 0.9469 & 0.9793 & 0.9923 \\ 
\bottomrule
\end{array}$
\end{table}
\end{document}

相关内容