\documentclass{article}
\usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{multicol,lipsum, booktabs}
\usepackage{caption}
\DeclareCaptionLabelSeparator{par}{\par}
\DeclareCaptionLabelFormat{Wijaya}{\hfil\MakeUppercase{#1}\space \Roman{table}}
\DeclareCaptionTextFormat{sc}{{\scshape #1}}
\captionsetup{labelsep=par, labelformat=Wijaya, textformat=sc}
\begin{document}
\begin{multicols}{2}
\lipsum[1-5]
\end{multicols}
\begin{table}[h!]
\renewcommand{\arraystretch}{1.2}
\caption{Description of Variables and Parameters} \label{table1}
\begin{tabular}{cp{5.5cm}}
\hline
\midrule[0.1pt]
Symbol& Parameters\\
\hline
$S$&Susceptible subpopulations\\
$E$&Educated subpopulations\\
$I$&Infected subpopulations\\
$R$&Recovered subpopulations\\
$B$&Bacteria populations\\
$\Lambda$&Human birth rate\\
$\mu$&The human natural death rate\\
$\beta_1$&Interaction rate of susceptible subpopulations with bacteria populations\\
$\beta_2$&Interaction rate of educated subpopulations with bacteria populations\\
$k$&Constant saturation rate of the bacteria population\\
$\omega$&The loss rate of immunity\\
$\phi$&Educated rate\\
$\gamma$&The recovery rate of naturally infected populations\\
$\alpha$&Death rate that caused by cholera infection\\
$\xi$&The growth rate of bacteria\\
$\delta$&The natural death rate of bacteria\\
\hline
\midrule[0.1pt]
\end{tabular}
\end{table}
\end{document}
为什么标题表无法在左列居中?如何修复?
我想
答案1
一些建议和意见:
要在整个文本块宽度上排版表格,请使用
table*
环境,而不是table
环境。要将“表 I”标签置于中心位置,请在指令中替换
\hfil
为。\centering
\DeclareCaptionLabelFormat{Wijaya}{...}
我将分别用和替换这两个老式
\hline\midrule[0.1pt]
指令。\toprule
\bottomrule
\documentclass{article}
\usepackage[margin=2cm]{geometry}
\usepackage{multicol,lipsum, booktabs, ragged2e,array}
\usepackage{caption}
\DeclareCaptionLabelSeparator{par}{\par}
\DeclareCaptionLabelFormat{Wijaya}{\centering\MakeUppercase{#1}\space \Roman{table}}
\DeclareCaptionTextFormat{sc}{{\scshape #1}}
\captionsetup{labelsep=par, labelformat=Wijaya, textformat=sc}
\begin{document}
%\begin{multicols}{2}
%\lipsum[1-5]
%\end{multicols}
\begin{table*}
\centering
%\renewcommand{\arraystretch}{1.2}
\setlength\extrarowheight{2pt}
\caption{Description of Variables and Parameters} \label{table1}
\begin{tabular}{@{} >{$}c<{$} >{\RaggedRight}p{5.5cm} @{}}
\toprule
\mbox{Symbol} & Parameters\\
\midrule
S & Susceptible subpopulations\\
E & Educated subpopulations\\
I & Infected subpopulations\\
R & Recovered subpopulations\\
B & Bacteria populations\\
\Lambda & Human birth rate\\
\mu & Human natural death rate\\
\beta_1 & Interaction rate of susceptible subpopulations with bacteria populations\\
\beta_2 & Interaction rate of educated subpopulations with bacteria populations\\
k & Constant saturation rate of the bacteria population\\
\omega & Loss rate of immunity\\
\phi & Educated rate\\
\gamma & Recovery rate of naturally infected populations\\
\alpha & Death rate that caused by cholera infection\\
\xi & Growth rate of bacteria\\
\delta & Natural death rate of bacteria\\
\bottomrule
\end{tabular}
\end{table*}
\end{document}
答案2
正如我在评论中提到的,不清楚你的问题是什么。你的表格可以轻松放在一列中,因此我会坚持以下解决方案:
\documentclass[twocolumn]{article} % <---
\usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{amsmath} % <---
\usepackage{booktabs, tabularx} % <---
\usepackage{caption}
\captionsetup[table]{ % <---
skip=1ex,
name=TABLE,
labelfont={normalsize}, font={footnotesize,sc},
labelsep=newline,
justification=centerlast
}
\renewcommand{\thetable}{\Roman{table}} % <---
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[ht!]
\centering
\renewcommand{\arraystretch}{1.2}
\caption{Description of Variables and Parameters} \label{table1}
\begin{tabularx}{\linewidth}{@{} >{$}c<{$} X @{}} % <---
\toprule
\text{Symbol}
& Parameters \\
\midrule
S & Susceptible subpopulations \\
E & Educated subpopulations \\
I & Infected subpopulations \\
R & Recovered subpopulations \\
B & Bacteria populations \\
\Lambda & Human birth rate \\
\mu & The human natural death rate \\
\beta_1 & Interaction rate of susceptible subpopulations with bacteria populations\\
\beta_2 & Interaction rate of educated subpopulations with bacteria populations\\
k & Constant saturation rate of the bacteria population\\
\omega & The loss rate of immunity \\
\phi & Educated rate \\
\gamma & The recovery rate of naturally infected populations\\
\alpha & Death rate that caused by cholera infection\\
\xi & The growth rate of bacteria \\
\delta & The natural death rate of bacteria \\
\bottomrule
\end{tabularx} % <---
\end{table}
\lipsum[2-6]
\end{document}
注意:您的 MWE 中的 compasin 的变化已用<---
上述代码标记。