Latex

作者: hxc92 | 来源:发表于2017-12-24 22:34 被阅读0次

一篇比较不错的入门教程

\documentclass{article}
    \author{jiuer}
    \title{Hello World}
\begin{document}
    \maketitle
    \section{Hello China}   China is in the east of China.
        \subsection{Hello Beijing}  Beijing is the capital.
            \subsection{Hello Dongcheng District}
                \paragraph{Ti'an Square}    is in the center.
                    \subparagraph{Chairman Mao} is the great man.
            \subsection{Hello Guangzhou}
                \paragraph{Sun University} is here
\end{document}
图像 2.png
  1. 空一行即另起一段,自带段首空格;

  2. \\用于行内强制换行

\documentclass{article}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \author{jiuer}
    \title{Hello World}
\begin{document}
    \maketitle
    this is F=ma
    this is $F=ma$
    this is 
    $$F=ma$$
    this is 
    \[F=ma\]
    that is $\eta$ and $\mu$
    and this is $\frac{a}{b}$
    power is $a^b$
    subscript $a_b$
    derivate $\frac{\partial y}{\partial t}$
    vector $\vec{n}$
    bold $\mathbf{n}$
    time differential $\dot{F}$
    Equation(\& for aligning different rows)
        \begin{align}
            a+b&=c\\
            d&=e+f+g
        \end{align}
        
        \[
            \left\{
                \begin{aligned}
                    &a+b=c\\
                    &d=e+f+g
                \end{aligned}
            \right.
        \]
            
\end{document}
图像 3.png
  1. $...$行内数学模式
  2. $$...$$另起一行并居中开始数学模式

输入公式的话可以参考latex数学符号

以及多行公式输入的各种实例

各种括号的输入和设置


编译参考文献时需要先把bib文件用utf-8方式编码,否则会can't find a database entry

  1. latex编译
  2. bib编译
  3. 再进行latex编译

以上才能确保参考文献编译正确。


然后是自己第一次使用过程中发现的。

  1. ctexart 模板中不支持关键词,在abstract中使用\\\\\textbf:空两行然后加入关键词;

  2. \label{}\ref{}一起使用,实现动态引用;

  3. equation*环境用于不带编号的公式,或者使用命令\notag

  4. 数学模式中括号使用时候要带上\left(\right)

相关文章

网友评论

      本文标题:Latex

      本文链接:https://www.haomeiwen.com/subject/eitfgxtx.html