zoukankan      html  css  js  c++  java
  • latex表格调整行距

    主要是在表格环境中插入这两句

    egingroup
    setlength{	abcolsep}{10pt} % Default value: 6pt
    
    enewcommand{arraystretch}{1.5} % Default value: 1
    

    一个是调整列距离,一个是调整行距离

    然后表格前后的对比为

    以下为源码

    %	itle{LaTeX Table spacing example}  
    % Example by John Hammersley
    
    documentclass{article}
    usepackage[usenames,dvipsnames]{xcolor}
    egin{document}
    
    section*{Table with default spacings}
    
    % A table with the default row and column spacings
    egin{tabular}{ c c c }
    First Row & -6 & -5 \
    Second Row & 4 & 10\
    Third Row & 20 & 30\
    Fourth Row & 100 & -30\
    end{tabular}
    
    section*{Table with adjusted spacings}
    
    % A table with adjusted row and column spacings
    % setlength sets the horizontal (column) spacing
    % arraystretch sets the vertical (row) spacing
    egingroup
    setlength{	abcolsep}{10pt} % Default value: 6pt
    
    enewcommand{arraystretch}{1.5} % Default value: 1
    egin{tabular}{ c c c }
    First Row & -6 & -5 \
    Second Row & 4 & 10\
    Third Row & 20 & 30\
    Fourth Row & 100 & -30\
    end{tabular}
    endgroup
    % The egingroup ... endgroup pair ensures the separation
    % parameters only affect this particular table, and not any
    % sebsequent ones in the document.
    
    end{document}
    

    参考链接https://www.overleaf.com/project/5c349976c042023b1bd97751

  • 相关阅读:
    redis方法中文解释
    简单redis队列实现
    PHP中常用的字符串操作【转】
    SQL循环语句
    crontable 实例
    自动以当前时间命名文件
    tar命令详解
    PHP 数据类型验证和获取
    Nginx 配置文件nginx.conf的完整配置说明
    sql server DateFormat(转)
  • 原文地址:https://www.cnblogs.com/yongjieShi/p/15480250.html
Copyright © 2011-2022 走看看