Latex表格问题及解决方案汇总【持续更新】 |
您所在的位置:网站首页 › 问题点汇总表格担当 › Latex表格问题及解决方案汇总【持续更新】 |
文章目录
参考资料1. Latex解决表格过宽问题,自适应调整宽度2. Latex在线表格生成网址3. 一个看起来比较舒服的表格模板
参考资料
Latex解决表格过宽问题,自适应调整宽度
本篇博客为自己在用latex写论文碰到的表格相关问题汇总,旨在于便于翻阅查找。 1. Latex解决表格过宽问题,自适应调整宽度 \resizebox{\linewidth}{!}{ #此处!表示根据根据宽高比进行自适应缩放 \begin{tabular}... .... .... \end{tabular} } # 注意加的位置在\begin{tabular}和\end{tabular}前后 2. Latex在线表格生成网址 https://www.tablesgenerator.com/https://tableconvert.com/csv-to-latex 3. 一个看起来比较舒服的表格模板 \usepackage{booktabs} %引用package \begin{table}[h] \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} \centering \caption{ mission expend time steps} \resizebox{\linewidth}{!}{ \begin{tabular}{cccc} \toprule & \tabincell{c}{\textbf{Policy with}\\ \textbf{ shields}} & \tabincell{c}{\textbf{Policy without} \\\textbf{ shields}} & \tabincell{c}{\textbf{policy with dynamic} \\\textbf{ obstacle avoidance} } \\ \midrule \midrule \tabincell{c}{\textbf{No time delay} \\\textbf{and} \\\textbf{no disturbance}} & $95.93\%$ & & \\ \midrule \tabincell{c}{\textbf{Only} \\\textbf{time delay}} & $91.06\%$& & \\ \midrule \tabincell{c}{\textbf{Only} \\\textbf{disturbance}} & & & \\ \midrule \tabincell{c}{\textbf{time delay} \\\textbf{and} \\\textbf{disturbance}} & $90.24\%$ & & \\ \bottomrule \end{tabular}} \label{tab:safety_test4} \end{table}效果如下: 其中 \toprule是画最上面那条线,中间的横线用的是\midrule,最底下的横线用\bottomrule。 如果表格线要改粗细,调pt前面的值即可,如调整上面那根线的粗细: \toprule[1pt] |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |