• LATEX教程(一)


    第一个文档

    打开WinEdt,建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8。

    documentclass{article}
    egin{document}
       hello, world
    end{document}

    标题、作者和注释

    documentclass{article}

    usepackage{Ctex}

    author{yif}

    itle{我是标题}

    egin{document}

    maketitle

    我是yif % This is comment

    end{document}

    章节和段落

    documentclass{article}
    usepackage{Ctex} 
          	itle{我是标题}
        author{yif} 
    egin{document} 
      maketitle 
      section{Hello China} 
        China is in East Asia.
        subsection{Hello Beijing} 
        Beijing is the capital of China.
          subsubsection{Hello Dongcheng District} 
            paragraph{Tian'anmen Square}is in the center of Beijing %段落
              subparagraph{Chairman Mao} is in the center of Tian'anmen Square 
          subsection{Hello Guangzhou} 
            paragraph{Sun Yat-sen University} is the best university in Guangzhou. 
    end{document}

    加入目录

    documentclass{article} 
    usepackage{Ctex}
    egin{document} 
       	ableofcontents %生成目录
       section{Hello China} China is in East Asia. 
         subsection{Hello Beijing} Beijing is the capital of China. 
           subsubsection{Hello Dongcheng District} 
             paragraph{Hello Tian'anmen Square}is in the center of Beijing 
               subparagraph{Hello Chairman Mao} is in the center of Tian'anmen Square 
    end{document}

    换行




    documentclass{article} 
    usepackage{Ctex}
    	itle{我的标题}
    author{yif}
        egin{document} 
    maketitle 
       Beijing is 
       the capital 
       of China. 
    
      Washington is 
    
       the capital 
    
       of America. 
    
       Amsterdam is \ the capital \ 
       of the Netherlands. 
        end{document}

    换一行不会显示换行,进行换两行在显示时才显示换一行。

    双斜杠换行

    数学公式

    documentclass{article} 
           usepackage{amsmath} 
           usepackage{amssymb}
        usepackage{Ctex}
        	itle{我的标题}
        author{yif} 
    egin{document} 
    maketitle
       The Newton's second law is F=ma. 
    
       The Newton's second law is $F=ma$. %用美元修饰数学公式
    
       The Newton's second law is 
      
    F=ma
    
    
       The Newton's second law is 
      
    F=ma
    
    
       Greek Letters $eta$ and $mu$ %用数学符号
    
       Fraction $frac{a}{b}$ %表示分数
    
       Power $a^b$ %表示指数
    
       Subscript $a_b$ %b是a的下标
    
       Derivate $frac{partial y}{partial t} $ %偏导数
    
       Vector $vec{n}$ %向量
    
       Bold $mathbf{n}$ %加粗
    
       To time differential $dot{F}$ %用点表示微分
    
       Matrix (lcr here means left, center or right for each column)%矩阵 
       [ 
         left[ 
           egin{array}{lcr} 
             a1 & b22 & c333 \ 
             d444 & e555555 & f6 
           end{array} 
         
    ight] 
       ] 
    
    Equations(here & is the symbol for aligning different rows) %写&
    egin{align} 
       a+b&=c\ %公式后面显示标号
       d&=e+f+g %公式后面显示标号
    end{align} 
    
    [ %带前括号
       left{ 
         egin{aligned} 
           &a+b=c\ 
           &d=e+f+g 
         end{aligned} 
       
    ight. 
    ]
    
    end{document}
  • 相关阅读:
    Android权限大全(链接地址整理)
    Android6.0运行时权限(基于RxPermission开源库)
    Android6.0机型上调用系统相机拍照返回的resultCode值始终等于0的问题
    使用AccessibilityService模拟点击事件失败的分析
    Android混淆打包配置总结
    okhttputils开源库的混淆配置(Eclipse)
    Android布局中的空格以及占一个汉字宽度的空格,实现不同汉字字数对齐
    java开发者大会:总结
    JAVA开发者大会:拍拍贷MQ系统原理与应用
    消息总线真的能保证幂等?
  • 原文地址:https://www.cnblogs.com/yifdu25/p/8319319.html
Copyright © 2020-2023  润新知