如何用冒号标记表格标题?

如何用冒号标记表格标题?

我有这张表: 在此处输入图片描述

使用以下代码:

\begin{table}[htbp]
\caption{Parametric values for Model 1 figures}
   \centering
      \begin{tabular}{|l| l|l |r|r|}
      \multicolumn{4}{c}{} \\
    \hline
     Parameter & Fig.2 Value & Fig.3 Value & Fig.4 Value & Fig.5 Value \\ \hline
      $\alpha$ & 0.6 & 0.6 & 0.6 & 0.6\\
      $\beta$ & 0.5 & 0.5 & 0.5 & 0.5\\
      $\widehat{G}$ & 90 & 90 & 80 & 50\\
      $\widecheck{G}$ & 50 & 50 & 90 & 90\\
      $\bar{P}$ & 100 & 100 & 100 & 100000\\
   \hline
   \end{tabular}
   \label{tab:Comparison of PV}
\end{table}

我想删除标题中的句号,并写成:表 1:模型 1 图形的参数值。另外,我希望标题更接近表格本身。

以下是我的序言

\documentclass[11pt,reqno]{amsart}

% Packages
\usepackage{graphicx}
\usepackage{amssymb,amsthm}
\usepackage{natbib}
\bibpunct{(}{)}{;}{;}{,}{,}
\usepackage{xr-hyper}
\usepackage[
  colorlinks=true,
  citecolor=blue,
  urlcolor=blue,
  linkcolor=blue
]{hyperref}
\usepackage{bm}
\usepackage{fullpage}
\usepackage{ amssymb }
\usepackage{caption} \captionsetup[figure]{labelfont=normalfont,labelsep=colon}
\usepackage{mathabx}
\makeatletter
\def\subsection{\@startsection{subsection}{1}%
  \z@{.5\linespacing\@plus.7\linespacing}{-.5em}%
  {\normalfont\itshape}}
\def\@sect#1#2#3#4#5#6[#7]#8{%
  \edef\@toclevel{\ifnum#2=\@m 0\else\number#2\fi}%
  \ifnum #2>\c@secnumdepth \let\@secnumber\@empty
  \else \@xp\let\@xp\@secnumber\csname the#1\endcsname\fi
  \@tempskipa #5\relax
  \ifnum #2>\c@secnumdepth
    \let\@svsec\@empty
  \else
    \refstepcounter{#1}%
    \edef\@secnumpunct{%
      \ifdim\@tempskipa>\z@ % not a run-in section heading
        \@ifnotempty{#8}{.\@nx\enspace}%
      \else
        \@ifempty{#8}{.}{.\@nx\enspace}%
      \fi
    }%
    \@ifempty{#8}{%
      \ifnum #2=\tw@ \def\@secnumfont{\bfseries}\fi}{}%
    \protected@edef\@svsec{%
      \ifnum#2<\@m
        \@ifundefined{#1name}{}{%
          \ignorespaces\csname #1name\endcsname\space
        }%
      \fi
      \@seccntformat{#1}%
    }%
  \fi
  \ifdim \@tempskipa>\z@ % then this is not a run-in section heading
    \begingroup #6\relax
    \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty\@M #8\par}%
    \endgroup
    \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi
  \else
  \def\@svsechd{#6\hskip #3\@svsec
    \@ifnotempty{#8}{\ignorespaces#8\unskip
       %\@addpunct.
       }%
    \ifnum#2>\@m \else \@tocwrite{#1}{#8}\fi
  }%
  \fi
  \global\@nobreaktrue
  \@xsect{#5}}
\makeatother

\pagestyle{plain}

\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{12pt}

\setcounter{secnumdepth}{2}

\allowdisplaybreaks[4]

% Commenting/debugging
\let\IG\iffalse
\let\ENDIG\fi

%% Shortcuts
\newcommand{\td}[2]{\dfrac{d #1}{d #2}}
\newcommand{\std}[2]{\dfrac{d^2 #1}{d {#2}^2}}
\newcommand{\ctd}[3]{\dfrac{d^2 #1}{d #2 d #3}}

\newcommand{\pd}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\spd}[2]{\dfrac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\cpd}[3]{\dfrac{\partial^2 #1}{\partial #2 \partial #3}}

\newcommand{\pdi}[2]{\partial #1/\partial #2}

\newcommand{\LR}{\Leftrightarrow}
\newcommand{\Lg}{\mathcal{L}}
\newcommand{\half}{\tfrac{1}{2}}
\newcommand{\eqp}{\phantom{=}}
\newcommand{\eqs}{\buildrel s \over =}
\newcommand{\me}{\mathrm{e}}

答案1

要获得标签的“正常”字体(而不是小写)以及获得“冒号”(:)而不是句号,只需更改前导指令

\captionsetup[figure]{labelfont=normalfont,labelsep=colon}

\captionsetup{labelfont=normalfont,labelsep=colon}`

这样,该\captionsetup指令将适用于全部浮动而不只是figures。

要将标题和 之间的垂直距离减少tabular到正常量,只需\multicolumn{4}{c}{} \\从 中删除该行tabular。要进一步减少距离,您可以添加 选项skip=5pt\captionsetup(默认设置为skip=10pt。)

在此处输入图片描述

\documentclass[11pt,reqno]{amsart}
%% I've condensed the preamble to the bare minimum needed for your example:
\usepackage{caption} 
\captionsetup{labelfont=normalfont,
              labelsep=colon}
\usepackage{mathabx}  %% for '\widecheck' macro

\begin{document}
\begin{table}[htbp]
\caption{Parametric values for Model 1 figures}
\label{tab:Comparison of PV}
   \centering
      \begin{tabular}{|l| l|l |r|r|}
    \hline
     Parameter & Fig.2 Value & Fig.3 Value & Fig.4 Value & Fig.5 Value \\ \hline
      $\alpha$ & 0.6 & 0.6 & 0.6 & 0.6\\
      $\beta$ & 0.5 & 0.5 & 0.5 & 0.5\\
      $\widehat{G}$ & 90 & 90 & 80 & 50\\
      $\widecheck{G}$ & 50 & 50 & 90 & 90\\
      $\bar{P}$ & 100 & 100 & 100 & 100000\\
   \hline
   \end{tabular}
\end{table}
\end{document}

相关内容