仰望星空,脚踏实地分享 http://blog.sciencenet.cn/u/duancg

博文

ctex表格

已有 2795 次阅读 2022-5-31 11:10 |个人分类:Latex|系统分类:科研笔记

第一次接触ctex,使用ctex做表格。

作为一个小白,真的是从ctex的界面操作开始学起。


ctex代码如下:


\documentclass[letterpaper,12pt]{article}

\usepackage[margin=1in]{geometry}

\usepackage{verbatim}

\usepackage{amsmath}

\usepackage{supertabular}

\usepackage{array}

\usepackage{multirow}

\usepackage{booktabs}

\usepackage{threeparttable}


\begin{document}


\renewcommand{\arraystretch}{1.5} 

\begin{table}[tp]


  \centering

  \fontsize{7}{9}\selectfont  

  \begin{threeparttable}

  \caption{$SiS_2$ and $Si_2S$}

  \label{tab:performance_comparison}

    \begin{tabular}{ccccccc}

    \toprule

    \multicolumn{4}{c}{$SiS_2$}&\multicolumn{3}{c}{$Si_2S$}\cr

    \cmidrule(lr){2-4} \cmidrule(lr){5-7}

    &$J'_{Ka',Kc'}$$\rightarrow$$J_{Ka,Kc}$&Frequnency (MHz)&$E_u (K)$&$J'_{Ka',Kc'}$$\rightarrow$$J_{Ka,Kc}$&Frequnency (MHz)&$E_u (K)$\cr

    \midrule

    &$4_{0,4}$$\rightarrow$$3_{1,3}$&32756.2703&2.62&$4_{0,4}$$\rightarrow$$3_{1,3}$&31754.1622&2.54\cr

    &$4_{1,4}$$\rightarrow$$3_{0,3}$&32793.1882&2.62&$4_{1,4}$$\rightarrow$$3_{0,3}$&31866.6612&2.54\cr

    &$3_{2,2}$$\rightarrow$$2_{1,1}$&34549.2147&1.86&$3_{2,2}$$\rightarrow$$2_{1,1}$&34377.4766&1.78\cr

    &$4_{1,3}$$\rightarrow$$3_{2,2}$&39446.3936&3.51&$4_{1,3}$$\rightarrow$$3_{2,2}$&37515.9772&3.43\cr

    &$5_{0,5}$$\rightarrow$$4_{1,4}$&40050.4392&4.19&$5_{0,5}$$\rightarrow$$4_{1,4}$&38862.3314&4.07\cr

    &$5_{1,5}$$\rightarrow$$4_{0,4}$&40054.6584&4.19&$5_{1,5}$$\rightarrow$$4_{0,4}$&38880.9153&4.07\cr

    &$4_{2,3}$$\rightarrow$$3_{1,2}$&40789.1543&3.46&$4_{2,3}$$\rightarrow$$3_{1,2}$&40279.6240&3.32\cr

    &$3_{3,1}$$\rightarrow$$2_{2,0}$&43464.6229&2.12&$3_{3,1}$$\rightarrow$$2_{2,0}$&43722.3899&2.08\cr

    &$3_{3,0}$$\rightarrow$$2_{2,1}$&47173.2232&2.01&$5_{1,4}$$\rightarrow$$4_{2,3}$&45630.1270&5.26\cr

    &$5_{1,4}$$\rightarrow$$4_{2,3}$&47257.4869&5.42&$6_{0,6}$$\rightarrow$$5_{1,5}$&45933.4432&5.93\cr

    &$6_{0,6}$$\rightarrow$$5_{1,5}$&47331.1264&6.12&$6_{1,6}$$\rightarrow$$5_{0,5}$&45936.2282&5.93\cr

    &$6_{1,6}$$\rightarrow$$5_{0,5}$&47331.5636&6.12&$3_{3,0}$$\rightarrow$$2_{2,1}$&46400.1598&2.00\cr

    &$5_{2,4}$$\rightarrow$$4_{1,3}$&47516.3714&5.41&$5_{2,4}$$\rightarrow$$4_{1,3}$&46403.6849&5.23\cr

    &$4_{3,2}$$\rightarrow$$3_{2,1}$&50864.0771&3.90&$5_{2,3}$$\rightarrow$$4_{3,2}$&48973.5235&6.19\cr

    \bottomrule

    \end{tabular}

    \end{threeparttable}

\end{table}


\end{document}


一点点心得

记录下来,免得下次使用的时候又忘了


·\usepackage{XXX}   %使用包,运行出错时,差什么包就加什么包;

·\begin{document}   %文档开始,有begin,后面一定会对应一个end;

·\renewcommand{\arraystretch}{1.5}  %这是控制行高的;

·\fontsize{7}{9}\selectfont   %表格长宽;

·$Si_2S$   %Si2S,下标使用_,且要用$$框起来,如果下标是多个数字或者字母,需要用{}框起来;

·\rightarrow   %向右箭头,使用时用$$框起来;

  




https://blog.sciencenet.cn/blog-3489179-1340966.html

上一篇:AstroChemical Newsletter #78
下一篇:已探测到的类肽键分子
收藏 IP: 218.70.255.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-12-22 14:59

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部