latex 表格每行设置不同字体
Each cell of a table is set in a box, so that a change of font style (or whatever) only lasts to the end of the cell. If one has a many-celled table, or a long one which needs lots of rows emphasising, putting a font style change command in every cell will be impossibly tedious.
With the array package, you can define column modifiers which will change the font style for a whole column. However, with a bit of subtlety, one can make such modifiers affect rows rather than columns. So, we set things up by:
\usepackage{array}
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
Now, we put ‘$’ before the first column specifier; and we put ‘^ ’ before the modifiers of subsequent ones. We then use \rowstyle at the start of each row we want to modify:
\begin{tabular}{|$l|^l|^l|} \hline
\rowstyle{\bfseries}
Heading & Big and & Bold \\ \hline
Meek & mild & entry \\
Meek & mild & entry \\
\rowstyle{\itshape}
Strange & and & italic \\
Meek & mild & entry \\ \hline
\end{tabular}
The array package works with several other tabular-like environments from other packages (for example longtable), but unfortunately this trick won’t always work.
latex 表格每行设置不同字体的更多相关文章
- python3.4学习笔记(十八) pycharm 安装使用、注册码、显示行号和字体大小等常用设置
python3.4学习笔记(十八) pycharm 安装使用.注册码.显示行号和字体大小等常用设置Download JetBrains Python IDE :: PyCharmhttp://www. ...
- Latex表格制作记录
Latex表格制作记录 主要功能 合并表格的行列 长表格的使用 makecell例程借鉴 效果图 参考代码 \documentclass{ctexart} \usepackage{indentfirs ...
- LayUI之table数据表格获取行、行高亮等相关操作
前言 目前LayUI数据表格既美观有不乏一些实用功能.基本上表格应有的操作已经具备,LayUI作者[贤心]肯定是煞费苦心去优化,此处致敬.但是实话实话,如果单纯那数据表格功能来说,EasUI的数据表格 ...
- FineUI大版本升级,外置ExtJS库、去AXD化、表格合计行、表格可编辑单元格的增删改、顶部菜单框架
这是一篇很长的文章,在开始正文之前,请允许我代表目前排名前 20 中唯一的 .Net 开源软件 FineUI 拉下选票: 投票地址: https://code.csdn.net/2013OSSurve ...
- 详解CSS设置默认字体样式
浏览器默认的样式往往在不同的浏览器.不同的语言版本甚至不同的系统版本都有不同的设置,这就导致如 果直接利用默认样式的页面在各个浏览器下显示非常不一致,于是就有了类似YUI的reset之类用来尽量重写浏 ...
- ios开发设置不同字体
最近项目开发中遇到需要设置指定字体的需求,研究了一下字体设置,最后附有我写的一个小demo,先来看一下效果: 开始上网搜了一下,普遍说到以下方法 for(NSString *fontfamilynam ...
- Ueditor设置默认字体、字号、行间距,添加字体种类(转)
Ueditor默认字体.字号.行间距的修改: ueditor默认字号是16号,默认字体为sans-serif,默认行间距为5px,如下图所示: 首先,修改ueditor.all.js文件中如上图红框中 ...
- windows更改命令行cmd的字体为conlosas+微软雅黑
windows更改命令行cmd的字体为conlosas+微软雅黑 动力来源于对美孜孜不倦的追求~ 下载conlosas+微软雅黑字体 谢谢支持. 将解压后的YaHei.Consolas.1.12.tt ...
- css font-family属性设置中文字体乱码
一般设置字体,个人都喜欢用中文,比如:font-family:"微软雅黑":但是偶尔会出现设置以后字体显示乱码的问题 解决方法[1]: 看看你的CSS文件的第一行有没有:@char ...
随机推荐
- Codeforces-Two Buttons-520problemB(思维题)
B. Two Buttons Vasya has found a strange device. On the front panel of a device there are: a red but ...
- [转帖]Linux内核系统体系概述
Linux内核系统体系概述 https://www.cnblogs.com/alantu2018/p/8447369.html Linux 内核主要由 5 个模块构成,它们分别是: 进程调度模块 用来 ...
- linux服务器安装svn并上传项目
一.安装svn (1)安装svn服务器: yum install subversion (2)查看版本(随自己意愿): svnserve --version 二.创建svn仓库并配置 (1)创建svn ...
- 多线程(7)— JDK对锁优化的努力
JDK内部的“锁”优化策略 1. 锁偏向 锁偏向是针对加锁操作的优化手段,核心思想是:如果一个线程获得了锁,那么锁就进入偏向模式,当这个线程再次请求锁时,无须再做任何同步操作,这样就节省了大量有关锁申 ...
- C之typedef应用
1.0关于typedef关键字的基础: https://www.cnblogs.com/anSn/p/8783347.html 1.1 typedef 修饰“函数类型” 的调用方法: 1)我们写一段普 ...
- page分页问题,根据页码获取对应页面的数据,接口调用
添加一个log.js文件,进行接口调用. import axios from '@/libs/api.request' const MODULE_URL = '/log'; export const ...
- window服务器查看管理员列表
快捷键win+R 输入cmd并进入 输入指令net localgroup administrators
- windows Git Bash 无法运行python文件的解决方法(转)
https://blog.csdn.net/xie_0723/article/details/51958243
- span标签中显示固定长度,超出部分用省略号代替,光标放到文字上显示全部
在span中实现显示某段内容,固定其长度,多余部分用省略号代替,这样就用到html的title属性: 如:<span title="value"></span&g ...
- 高德地图模糊搜索地址(elementUI)
首先引入AMap: 1.在index.html引入AMap <script type="text/javascript" src="http://webapi.am ...