MWE 如下。当我编译下面提到的代码时,它会产生正确的输出,但生成的输出非常小。有没有办法增加表格单元格的字体大小,同时保留所有内容。任何帮助都值得赞赏。
\begin{table}[h]
\renewcommand{\arraystretch}{1.7}
\tcaption{Descriptive statistics of some numerical variables of the used dataset.}
\label{t0}
\scalebox{0.52}
{
\begin{tabular}{llccccccc}
\hline
Variable name & Variable description & N & Missing & Mean & Median & Std. Dev. & Min & Max\\
\hline
Actual\_Effort (in PM) & Total development effort (in PM) & 10 & 0 & 7014.91 & 3363.47 & 7931.52 & 377.8 & 22479.3\\
No.of.Processes & Total number of processes for an application & 10 & 0 & 2.9 & 2.5 & 1.96 & 1 & 7\\
No.of.Tasks & Total number of tasks for processes & 10 & 0 & 6.9 & 5.5 & 4.58 & 2 & 15\\
TCC & Total size based on the definition of processes and tasks of an application & 10 & 0 & 975.7 & 539 & 1027.62 & 74 & 2890\\
\hline\\
\end{tabular}
}
\end{table}
答案1
这可以帮助您:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
%\usepackage{showframe}
\usepackage[a4paper, margin={1cm,1cm}]{geometry}
\begin{document}
\begin{table}[h]
\renewcommand{\arraystretch}{1.7}
\caption{Descriptive statistics of some numerical variables of the used dataset.}
\label{t0}
\begin{tabular}{p{2cm}p{5cm}ccccccc}
\hline
Variable name & Variable description & N & Missing & Mean & Median & Std. Dev. & Min & Max\\
\hline
Actual\_Effort (in PM) & Total development effort (in PM) & 10 & 0 & 7014.91 & 3363.47 & 7931.52 & 377.8 & 22479.3\\
No.of.Processes & Total number of processes for an application & 10 & 0 & 2.9 & 2.5 & 1.96 & 1 & 7\\
No.of.Tasks & Total number of tasks for processes & 10 & 0 & 6.9 & 5.5 & 4.58 & 2 & 15\\
TCC & Total size based on the definition of processes and tasks of an application & 10 & 0 & 975.7 & 539 & 1027.62 & 74 & 2890\\
\hline\\
\end{tabular}
\end{table}
\end{document}
答案2
这是一个\small
字体大小为 的解决方案,并且tabularx
。我加载了该caption
包,以便在标题和表格之间更好地垂直跳跃,booktabs
在水平规则周围留出一些填充,并makecell
在普通单元格中留出一些换行符。最后,我稍微降低了 的值tabcolsep
。评论一下:您应该french
通过 documentclass 选项加载 babel 选项。
\documentclass[french]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[showframe]{geometry}
\usepackage{array, tabularx, caption, makecell, booktabs}
\begin{document}
\begin{table}[h]
\renewcommand{\arraystretch}{1.7}\setlength\tabcolsep{4pt}
\caption{Descriptive statistics of some numerical variables of the used dataset.}
\label{t0}
\small
\begin{tabularx}{\linewidth}{@{}l>{\raggedright}X*{7}{c}@{}}%
\toprule
Variable name & \makecell{Variable description} & N & Missing & Mean & Median & Std. Dev. & Min & Max \\
\midrule
\makecell[lt]{Actual\_Effort \\ (in PM)} &{Total development effort\\ (in PM)} & 10 & 0 & 7014.91 & 3363.47 & 7931.52 & 377.8 & 22479.3\\
No.of.Processes & {Total number of processes\\ for an application} & 10 & 0 & 2.9 & 2.5 & 1.96 & 1 & 7\\
No.of.Tasks & Total number of tasks for processes & 10 & 0 & 6.9 & 5.5 & 4.58 & 2 & 15 \\
TCC & Total size based on the definition of processes and tasks of an application & 10 & 0 & 975.7 & 539 & 1027.62 & 74 & 2890 \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}