latex 记下用过的方法

1 两张表格并排

\begin{minipage}{\textwidth}
 \begin{minipage}[t]{0.45\textwidth}
  \centering
     \makeatletter\def\@captype{table}\makeatother\caption{表格标题1}
       \begin{tabular}{cccc} 
    表格内容
    \end{tabular}
  \end{minipage}
  \begin{minipage}[t]{0.45\textwidth}
   \centering
        \makeatletter\def\@captype{table}\makeatother\caption{表格标题2}
         \begin{tabular}{cccc}        
          表格内容
      \end{tabular}
   \end{minipage}
\end{minipage}

2 大段注释

\usepackage{verbatim}


注释:

\begin{comment}

多

行

注

释

内

容
\end{comment} 

3 双栏图表占两列,加*即可

\begin{table*}[]
\begin{tabular}{lrrrrrrrrrrrrrrr}
\toprule
...

\bottomrule  
\end{tabular}
\caption{Booktabs table}
\label{tab:booktabs}
\end{table*}

4 修改表格的整体大小

usepackage{graphicx}


如果要在外面加table,就这么用

\begin{table}

\caption{表格标题}
\scalebox{0.9}{
\begin{tabular}

……

\end{tabular}}

\end{table}

5 表格单元格文字竖排

使用graphicx提供的\rotatebox{90}{}

\documentclass{article}
\usepackage{graphicx}

\begin{document}

\begin{tabular}{|l|c|}\hline
  \rotatebox{90}{some rotated text} & \rotatebox{90}{some rotated text}\\\hline
some text & some text\\ \hline
\end{tabular}

\end{document}

6 Single-Column Double-Spaced format

% 单栏
\documentclass[journal,onecolumn]{IEEEtran}
%变成双倍行距
\usepackage{setspace}
                \doublespacing 

 7 双栏和单栏相互转化

双栏:\documentclass[journal,11pt,draftclsnofoot,onecolumn]{IEEEtran}
单栏:\documentclass[journal,11pt,draftclsnofoot,twocolumn]{IEEEtran}

8 表格旋转90 + 两列并排

用 \begin{sidewaystable*}[]   ... \end{sidewaystable*} 旋转表格

在sidewaystable包裹中使用minipage, 两个表的间隔用\vspace{15mm}调整

\begin{sidewaystable*}[] %表格横过来

    \begin{minipage}[t]{0.50\textwidth} %两列
    \centering
    \scalebox{0.7}{ %表格尺寸调整
        \begin{tabular}{lrrr}

        \end{tabular}}
    \caption{This is caption1. }
    \label{tab:label}
    \vspace{15mm} %调整纵向距离
    \end{minipage}

    \begin{minipage}[t]{0.50\textwidth} %两列
    \centering
    \scalebox{0.7}{ %表格尺寸调整
        \begin{tabular}{lrrr}

        \end{tabular}}
    \caption{This is caption1. }
    \label{tab:label}
    \vspace{15mm} %调整纵向距离
    \end{minipage}


\end{sidewaystable*}

9 双倍行距

% 正文开始之前添加包
\usepackage{setspace} % double space
\doublespacing

10 添加行数

% 正文开始之前添加包
\usepackage{lineno} 

\begin{document}    
\linenumbers % begin line numbering
% 巴拉巴拉内容
\nolinenumbers % end line numbering

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值