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 ...
随机推荐
- ubuntu 18.04 安装搜狗输入法
安装 fcitxsudo apt install fcitx 配置输入法打开fcitx配置界面,点击桌面左下角的菜单,弹出如下桌面: 点击: “Input Method”,进入设置界面 点击 “OK” ...
- idea删除工作记录
或者
- 利用sourceinsight宏(Quicker.em)提高编码效率和质量
利用sourceinsight宏(Quicker.em)提高编码效率和质量Marco是sourceinsight软件一个强大的功能,用户可以通过编写宏来实现自定义功能.这里有个比较流行的宏文件quic ...
- Angular 发布订阅模式实现不同组件之间通讯
在我们项目中要实现不同组件之间通讯,Angular的@Input和@Output只能实现有父子组件的限制,如果是复杂跨组件实现不同组件可以通过共享变量的方式实现,比如这个博客的思路:https://w ...
- samtools获取uniq reads
参考地址: https://www.biostars.org/p/56246/ -q INT only include reads with mapping quality >= INT [0] ...
- ROS中的通信机制
http://www.ros.org/core-components/ Communications Infrastructure At the lowest level, ROS offers a ...
- RestTemplate对象的使用
- C之多维指针讲解
转载自: http://c.biancheng.net/view/2016.html #include <stdio.h> #include <string.h> int m ...
- Python03之单引号、双引号、三单引号、三双引号
今天在学习字符串的时候,发现字符串有时使用单引号,有时使用双引号,而有时还使用三引号.至此我整理如下: 单引号和双引号区别.三单引号和三双引号也没什么区别. 一: 两单引号之间不可以出现单引号,如果出 ...
- laravel框架视图中常用的逻辑结构forlese,foreach,ifelse等
if 和else @if($name === 1) 这个数字是1 @else 这个数字非1 @endif switch @switch($name) @case(1) 变量name == 1 @bre ...