如何增加表格内的字体大小?

如何增加表格内的字体大小?

这是表格。我尽了一切努力来增加文本的字体大小,但没有效果。文档类型是文章。

\begin{table*}
\LARGE\textbf
\centering\caption{Uplink and Downlink Systems with Different Cooperation Methods}\label{Table:systems}
\resizebox{\textwidth }{!}{
\renewcommand{\arraystretch}{1.2}
\begin{tabular}[l]{|l|l|l|l|}
\hline
\Huge{\textbf{Cooperation Method}}&\Huge{\textbf{Downlink}}&\Huge{\textbf{Uplink}}&\Huge{\textbf{Information needed to calculate DL Beamforming vector}}\\
\hline
\Huge{CBF}&\Huge{Each BS transmits to UEs under its own coverage area.}&\Huge{Each UE transmits to only one BS and other BSs treat it as noise.}&\Huge{Each BS needs to know its own channel to all the users.}\\ \hline
\Huge{PDC}&\Huge{Each BS transmits independent data streams to all UEs,}&\Huge{Each UE transmits independent data streams to the BSs,}&\Huge{Each BS needs to calculate $\mathbf{w}_{l, k}$ from~(\ref{Eq:uldlconv}).}\\ \hline
\Huge{JP}&\Huge{The BSs have all the data to be transmitted to UE}&\Huge{No uplink counterpart.}&\Huge{Each BS needs to know all the channels and data symbols.}\\ \hline 
\end{tabular}
}
\end{table*}

答案1

您的表格太宽了,没有 就无法容纳文本resizebox。它不仅会将表格缩小到所需的宽度,还会将字体大小缩小到可以缩小表格的大小... 通常, resizebox在任何情况下都不应使用(好吧,当您绝望时,它可以是最后的解决办法)。

更好的方法是重新设计表格。单元格中的文本必须分成更多行,以便表格适合文本宽度。在这个包中,`tabularx 非常方便:

在此处输入图片描述

上表图像的 MWE 为:

\documentclass[twocolumn]{article}
\usepackage[showframe]{geometry}  
\usepackage{makecell, tabularx}
    \renewcommand\theadfont{\bfseries}
\usepackage[labelfont=bf]{caption}                   

\begin{document}
\begin{table*}
%\small
\caption{Uplink and Downlink Systems with Different Cooperation Methods}
    \label{Table:systems}
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\textwidth}{|l|*{3}{>{\raggedright\arraybackslash}X|}}
\hline
\thead[b]{Cooperation\\ 
          Method}
    &   \thead[b]{Downlink}
        &   \thead[b]{Uplink}
            &   \thead[b]{Information needed\\ 
                          to calculate DL\\ Beamforming vector}        \\
\hline
CBF &   Each BS transmits to UEs under its own coverage area
        &   Each UE transmits to only one BS and other BSs treat it as noise
            &   Each BS needs to know its own channel to all the users. \\ 
    \hline
PDC &   Each BS transmits independent data streams to all UEs
        &   Each UE transmits independent data streams to the BSs,
            &   Each BS needs to calculate $\mathbf{w}_{l, k}$ from~(\ref{Eq:uldlconv}).                                   \\
    \hline
JP  &   The BSs have all the data to be transmitted to UE
        &   No uplink counterpart.
            &   Each BS needs to know all the channels and data symbols.\\ 
    \hline
\end{tabularx}
\end{table*}
\end{document}

从您的代码片段中看不清楚,如果您真的想让表格中的所有文本都以粗体显示。根据我的测试,我删除了错误使用的\textbf

如果您希望列头垂直居中,只需省略选项[b] at \thead。对于顶部对齐,请[b]用替换[t]

答案2

您可以使用\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge它来控制表格中的文本大小。

\documentclass{article}
\begin{document}
\begin{table*}
\centering\caption{Uplink and Downlink Systems with Different Cooperation Methods}\label{Table:systems}
\small
\begin{tabular}[l]{|l|l|l|l|}
\hline
\textbf{Cooperation Method}&\textbf{Downlink}&\textbf{Uplink}&\textbf{Information needed to calculate DL Beamforming vector}\\
\hline
CBF&Each BS transmits to UEs under its own coverage area.&Each UE transmits to only one BS and other BSs treat it as noise.&Each BS needs to know its own channel to all the users.\\ \hline
PDC&Each BS transmits independent data streams to all UEs,&Each UE transmits independent data streams to the BSs,&Each BS needs to calculate $\mathbf{w}_{l, k}$ from~(\ref{Eq:uldlconv}).\\ \hline
JP&The BSs have all the data to be transmitted to UE&No uplink counterpart.&Each BS needs to know all the channels and data symbols.\\ \hline 
\end{tabular}
\end{table*}
\end{document}

答案3

除了使用之外,tabular您还可以tabularx像这样使用

\documentclass{article}
\usepackage{booktabs,tabularx}
\usepackage{ragged2e}
\renewcommand\tabularxcolumn[1]{b{#1}}

%\usepackage[showframe]{geometry}

\begin{document}
\begin{table}[htb]
    \centering
    \large
    \begin{tabularx}{\textwidth}{*{4}{>{\Centering\arraybackslash}X}}
\toprule
\textbf{Cooperation Method}&\textbf{Downlink}&\textbf{Uplink}&\textbf{Information needed to calculate DL Beamforming vector}\\
\midrule
CBF&Each BS transmits to UEs under its own coverage area.&Each UE transmits to only one BS and other BSs treat it as noise.&Each BS needs to know its own channel to all the users.\\ 
\midrule
PDC&Each BS transmits independent data streams to all UEs,&Each UE transmits independent data streams to the BSs,&Each BS needs to calculate $\mathbf{w}_{l, k}$ from~(\ref{Eq:uldlconv}).\\ 
\midrule
JP&The BSs have all the data to be transmitted to UE&No uplink counterpart.&Each BS needs to know all the channels and data symbols.\\
 \bottomrule
\end{tabularx}
    \end{table} 
\end{document}

结果如下图所示:

在此处输入图片描述

如果你改用\tiny在此处输入图片描述

答案4

tabularx这是一个基于和caption的正常字体大小的解决方案makecell

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[showframe]{geometry} %
\usepackage{ragged2e}%
\usepackage{tabularx, makecell, booktabs, caption}

\begin{document}

\begin{table*}
\renewcommand{\tabularxcolumn}[1]{>{\RaggedRight\arraybackslash}p{#1}}
\renewcommand{\cellset}{\bfseries\renewcommand\arraystretch{1}}\renewcommand\cellalign{lc}
\setlength\tabcolsep{4pt}
\setcellgapes{3pt}\makegapedcells
\centering\caption{Uplink and Downlink Systems with Different Cooperation Methods}\label{Table:systems}
%\resizebox{\textwidth }{!}{
\renewcommand{\arraystretch}{1.2}
\begin{tabularx}{\linewidth}{|l|*{3}{>{\arraybackslash}X|}}
\hline
 \makecell{Cooperation\\ Method} & \makecell{Downlink} & \makecell{Uplink} & \makecell{Information needed\\ to calculate %
DL\\ Beamforming vector} \\
\hline
 CBF & Each BS transmits to UEs under its own coverage area. & Each UE transmits to only one BS and other BSs treat it as noise. & Each BS needs to know its own channel to all the users. \\ \hline
 PDC & Each BS transmits independent data streams to all UEs, & Each UE transmits independent data streams to the BSs, &{Each BS needs to calculate $\mathbf{w}_{l, k}$ from~(\ref{Eq:uldlconv}).}\\ \hline
 JP & The BSs have all the data to be transmitted to UE & No uplink counterpart. & Each BS needs to know all the channels and data symbols. \\ \hline
\end{tabularx}
%}
\end{table*}

\end{document} 

在此处输入图片描述

相关内容