beamer模板中一个表格排出来太丑了

2020-05-22 18:49发布

## 我的问题 结果有点丑 ``` \documentclass{beamer} \setbeamercolor{title}{fg=black} \setbeamercolor{section ...

## 我的问题 结果有点丑 ``` \documentclass{beamer} \setbeamercolor{title}{fg=black} \setbeamercolor{section in toc}{fg=black} \setbeamertemplate{section in toc shaded}[default][50] \setbeamertemplate{frametitle}[default][right] \setbeamercolor{frametitle}{fg=white} \setbeamercolor{framesubtitle}{fg=black} \setbeamercolor{navigation symbols}{fg=white, bg=white} \setbeamertemplate{sidebar right}{} \addtobeamertemplate{footline}{% \hfill\usebeamertemplate***{navigation symbols} \hspace*{1em}\par\vspace{1pt} }{} \usepackage[UTF8]{ctex} \usepackage{multirow} \usepackage{array} \begin{document} \begin{frame} \frametitle{实验设计} \begin{center} \begin{tabular}{|p{5 em}<{\centering}|p{5 em}<{\centering}|p{10 em}<{\centering}|} \hline 模型&实验组名称&实验组说明\\ \hline \multirow{2}{*}{GANs}&实验一&使用全部数据集\\ \cline{2-3} &实验二&使用数字6\\ \hline \multirow{2}{*}{DCGAN}&实验一&使用全部数据集\\ \cline{2-3} &实验二&使用数字6\\ \hline \end{tabular} \end{center} \end{frame} \end{document} ```
2条回答
纸鸢
2020-05-22 19:46
增加行高就行了,使用命令`\renewcommand{\arraystretch}{1.5}` ```tex \documentclass{beamer} \setbeamercolor{title}{fg=black} \setbeamercolor{section in toc}{fg=black} \setbeamertemplate{section in toc shaded}[default][50] \setbeamertemplate{frametitle}[default][right] \setbeamercolor{frametitle}{fg=white} \setbeamercolor{framesubtitle}{fg=black} \setbeamercolor{navigation symbols}{fg=white, bg=white} \setbeamertemplate{sidebar right}{} \addtobeamertemplate{footline}{% \hfill\usebeamertemplate***{navigation symbols} \hspace*{1em}\par\vspace{1pt} }{} \usepackage[UTF8]{ctex} \usepackage{multirow} \usepackage{array} \begin{document} \begin{frame} \frametitle{实验设计} \begin{center} \renewcommand{\arraystretch}{1.5} \begin{tabular}{|w{c}{5em}|w{c}{5em}|w{c}{10em}|} \hline 模型&实验组名称&实验组说明\\ \hline \multirow{2}{*}{GANs}&实验一&使用全部数据集\\ \cline{2-3} &实验二&使用数字6\\ \hline \multirow{2}{*}{DCGAN}&实验一&使用全部数据集\\ \cline{2-3} &实验二&使用数字6\\ \hline \end{tabular} \end{center} \end{frame} \end{document} ``` ![](https://wenda.latexstudio.net/data/attach/200522/e4s3tt9C.png) 更推荐使用三线表 ```tex \documentclass{beamer} \setbeamercolor{title}{fg=black} \setbeamercolor{section in toc}{fg=black} \setbeamertemplate{section in toc shaded}[default][50] \setbeamertemplate{frametitle}[default][right] \setbeamercolor{frametitle}{fg=white} \setbeamercolor{framesubtitle}{fg=black} \setbeamercolor{navigation symbols}{fg=white, bg=white} \setbeamertemplate{sidebar right}{} \addtobeamertemplate{footline}{% \hfill\usebeamertemplate***{navigation symbols} \hspace*{1em}\par\vspace{1pt} }{} \usepackage[UTF8]{ctex} \usepackage{multirow} \usepackage{booktabs} \begin{document} \begin{frame} \frametitle{实验设计} \begin{center} \renewcommand{\arraystretch}{1.5} \begin{tabular}{ccc} \toprule 模型&实验组名称&实验组说明\\ \midrule \multirow{2}{*}{GANs}&实验一&使用全部数据集\\ &实验二&使用数字6\\ \midrule \multirow{2}{*}{DCGAN}&实验一&使用全部数据集\\ &实验二&使用数字6\\ \bottomrule \end{tabular} \end{center} \end{frame} \end{document} ``` ![](https://wenda.latexstudio.net/data/attach/200522/2h1p35iH.png)

一周热门 更多>