LATEX 固定表格列宽并居中
来源:互联网 发布:java 获取jar包中资源 编辑:程序博客网 时间:2024/06/05 05:21
方法1: 使用p{x cm}能固定列宽,但是不能修改是否居中、左对齐、右对齐。只能使用默认格式
\documentclass{article}\begin{document}\begin{tabular}{|p{1cm}|p{2cm}|p{3cm}|}\hline1 cm width & 2 cm width & 3 cm width \\\hlinetest 1 & test 2 & test 3\\\hline\end{tabular}\end{document}
效果图:
方法2:
The alignment of the cells could be changed by using the package tabularx and define three new row-types: flush left fixed width:\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}center fixed width:\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}flush right fixed width:\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
示例如下:
\documentclass{article}\usepackage{tabularx}\begin{document}\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}\begin{tabular}{|L{1cm}|C{2cm}|R{3cm}|}\hline1 cm width & 2 cm width & 3 cm width \\\hlinetest 1 & test 2 & test 3\\\hline\end{tabular}\end{document}效果图:
0 0
- LATEX 固定表格列宽并居中
- LaTex中表格固定列宽并且居中的方法
- latex 表格列宽度固定的情况下让文字居中显示
- LaTeX 表格指定宽度并居中
- Latex设定表格列宽
- LaTeX技巧374:如何在指定列宽的表格里实现文字居中
- LaTeX技巧374:如何在指定列宽的表格里实现文字居中
- 表格列固定
- latex 图 表格 标题居中
- Latex 表格图片公式跨双栏显示并使标题居中以及表格图片注释技巧
- latex 表格标题分行和居中
- 设计表头固定并且列宽可调整的Table表格
- LaTeX技巧67:Latex表格列宽设置的一个例子
- 网页表格表头固定并可以自由拉伸列头的问题解决 (完美方案_html_table_seo)
- 二列固定宽度居中布局
- DIV布局 两列固定宽度居中
- 固定表格的标题列(CSS)
- 固定表格的标题列_2(CSS)
- 多线程编程 基础篇 (四)
- Snail—OC学习之本地数据持久化(归档)
- 使用EasyUI实现文本框内容长度验证,对文本框输入内容提示“剩余可输入字数”
- ffmpeg解码流程学习总结
- poj_1065_Wooden Sticks
- LATEX 固定表格列宽并居中
- Android 颜色透明度
- json在线解析
- Maven setting.xml配置说明
- VMWare虚拟机提供的桥接、NAT和Host-only的区别
- PID算法完全讲解
- spring mvc + jpa 事务无法提交
- ListView的复用及如何优化
- [Android]Toolbar使用详解(三)——源码解析