zoukankan      html  css  js  c++  java
  • LATEX使用总结

    LATEX使用总结

    1 文档基本结构

    \document{article}%book, report, letter 主要表明文档的性质,采用哪种模板

    \usepackage{} %引用宏包amsmath

    导言部分

    \begin{document} %中间开始正文部分

     

    \title{} %文章的标题

    \author{} %作者

    \date{} %删除自动创建的日期

    \maketitle %生成封面

     

    \tableofcontents %生成目录

     

    %篇章结构

    \part{} %part I

    \charpter{} %1 xxx

    \section{} %1.1 xxx

    \subsection{} %1.1.1 xxx

     

     

    \end{document}

     

    1.1 常用命令

    \mainmatter 控制页码的起始页

    正文以一个空行进行分段

    2 列表和表格

    2.1 表格

    2.1.1 tabular环境

    \begin{tabular}{|c|l|r|}%对齐方式 "|"表格的竖线

    \hline %表格的横线

    11&11&11\\

    \hline

    11&11&11\\

    \hline

    \end{tabular}

    问题,没有表头等附加信息

    2.1.2 table环境

    \begin{table} %表格

    \centering %居中操作

    \begin{tabular}{|c|l|r|}%对齐方式

    \hline

    11&11&11\\

    \hline

    11&11&11\\

    \hline

    \end{tabular}

    \caption{this is my first table}

    \end{table}

    2.1.3 table中的操作

    \multicolum{个数}{对齐}{内容} %合并行

    \multirow %合并列

    \cline{单元格区间}%部分元素加下划线

    2.1.3 longtable环境

    长表格环境

    2.2 列表

    2.2.1 itemsize环境

    点型列表

    •  
    •  

    \begin{itemize}

    \item this is 1

    \begin{itemize}

    \item sub 1%嵌套

    \item sub 2

    \end{itemize}

    \item this is 2

    \item this is 3

    \end{itemize}

    2.2.2 enumerate环境

    数字列表

    1.  
    2.  

    \begin{enumerate}[\bfseries A.] %以粗体大写字母为序号,需要导入enumerate宏包

    \setcounter{enumi}{4} %符号开头, 计数器

    \item item 1

    \begin{enumerate}[\sffamily a.] %选择小写字母

    \item sub 1

    \item sub 2

    \item sub 3

    \end{enumerate}

    \item item 2

    \item item 3

    \end{enumerate}

    3 插入公式

    3.1 基本方式

    \[ \]行间公式

    $ $行内公式

    缺点:无法自动标号

    3.2 equation环境

    可以对行间公式进行自动编号。

    通过在导言去使用命令

    \numberwithin{equation}{section}来细分标号的层次

    3.2.1 常用公式

    \sum^5{i=1}i^2     

    \prod                                    

    {\rm abcd}^a_b                            

    \mathop{\rm abcd}^a_b                        

    \lim_{n\to\infty}\left(1+\frac{1}{n}\right)^n=e    

    \left.\frac{\partial{y}}{\partial{x}}\right|^{y_1=4}_{y_2=4}    

    3.3 矩阵

    3.3.1 array环境

    \left[\begin{array}{ccc} %\left和\right保证括号,对齐方式

    11&11&11\\

    11&11&11\\

    11&11&11

    \end{array}\right]

    类似的环境:

    \bmatrix \Bmatrix

    \pmatrix

    \vmatrix \Vmatrix

    3.3.2 虚线

    使用arydshln宏包

    \hdashline[]横的虚线

     

  • 相关阅读:
    数据库chapter 4 数据库安全性
    数据库 chapter 2 关系数据库
    数据库 chapter 1 概论
    操作系统 chapter 11 I/O系统
    操作系统 chapter 12 死锁
    操作系统 chapter 7 8 存储模型
    聊一聊移动调试那些事儿
    获取当前日期和农历的js代码
    使用 CSS 媒体查询创建响应式网站
    大前端工具集
  • 原文地址:https://www.cnblogs.com/zjgtan/p/2893013.html
Copyright © 2011-2022 走看看