zoukankan      html  css  js  c++  java
  • 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}
    
    ewcolumntype{$}{>{globalletcurrentrowstyle
    elax}}
    
    ewcolumntype{^}{>{currentrowstyle}}
    
    ewcommand{
    owstyle}[1]{gdefcurrentrowstyle{#1}%
      #1ignorespaces
    }
    

    Now, we put ‘$’ before the first column specifier; and we put ‘’ before the modifiers of subsequent ones. We then use  owstyle at the start of each row we want to modify:

    egin{tabular}{|$l|^l|^l|}   hline
      
    owstyle{fseries}
      Heading & Big and & Bold \ hline
      Meek & mild & entry      \
      Meek & mild & entry      \
      
    owstyle{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.

  • 相关阅读:
    SQL Server事务、视图和索引
    软件系统的分层开发
    OOP应用:实体类
    Oracle/MySql/SQL Sqlserver分页查询
    数据库连接语句
    SQL连接查询
    MySQL基本手册
    C# 其他
    numpy的loadtxt()用法
    Pytorch从一个输入目录中加载所有的PNG图像,并将它们存储在张量中
  • 原文地址:https://www.cnblogs.com/xueqiuqiu/p/9075776.html
Copyright © 2011-2022 走看看