LaTeX mathematical formulas environment

Basics

1. mathematical functions:

\without{}
\cos{}
\tan{}
\arcsin{}
\arccos{}
\arctan{}

\ln{}

\log{}

 

2. Common formula

Mathematical formulas divided between rows inline formula and formula

  1. Interline formula: $$ (double $)
  2. Between the lines numbered formula: equation environment
  3. Formula is not between the lines numbered: \ [\]

 

3. inline official:

  1. One pair dollar sign $$
  2. Parentheses:\(.... \)
  3. mah Environment: begin {math} ... end {math}

 

4. The line between the formula

  1. A pair of double dollar sign $$$$

  2. In brackets: \ [... \]

  3. displaymath环境:\begin{displaymath}...\end{displaymath}

  4. Numbered interline formula: \ begin {equation} ... \ end {equation}

  5. Unnumbered equation between the lines: \ begin {equation *} ... \ end {equation *}

    Note: unnumbered formula, we need to import amsmath packages

\documentclass{article}
\usepackage{ctex}
\usepackage{amsmath}

\begin{document}
\section{行间公式}
\subsection{双美元符号}
交换律是$$a+b=b+a $$如$$1+2=2+1$$

\subsection{中括号}
交换律是 \[a+b=b+a\] 如\[1+2=2+1\]

\subsection{displaymath环境}
交换律是\begin{displaymath}a+b=b+a\label{eq:no2}\end{displaymath}
如\begin{displaymath}1+2=2+1\end{displaymath}

\subsection{自动编号}
交换律见式\ref{eq:no1}
\begin{equation}
a+b=b+a \label{eq:no1}
\end{equation}
如见公式\ref{eq:no2}
\begin{equation}
1+2=2+1
\end{equation}

\subsection{不自动编号}
交换律见式
\begin{equation*}
a+b=b+a \label{eq:no3}
\end{equation*}
如见公式 \ref{eq:no3}
\begin{equation*}
1+2=2+1
\end{equation*}

\end{document}

 

 

Mathematical formula Environment

1. basic details

  1. ** No problem: there is no asterisk number in the environment, there is no asterisk number.
  2. \ \: Wrap
  3. \ Ref {fig: 01} reference tab, \ label {fig: 01} add tags to achieve cross-reference
  4. \ Text {Text}: Mathematics text input mode

2. gather environment

Uses: equation can be written multiple lines, the overall alignment is aligned with the intermediate

(1) numbered

    %多行公式--带编号
    \begin{gather}
        a + b +c = b + a \\
        1+2 = 2 + 1
    \end{gather}

 

 

(2) without numbering

(The following numbered whether similar)

%多行公式--不带编号1
    \begin{gather*}
        a + b = b + a \\
        1+2 = 2 + 1
    \end{gather*}

 

 

(3) prevent the number

%多行公式--带编号2 \notag 阻止编号
    \begin{gather}
    a + b = b + a \notag \\
    1+2 = 2 + 1 \notag
    \end{gather}

 

 

3. align environment

Press ampersand aligned themselves specify the alignment

% 按&号对齐,--带编号
    \begin{align}
        a+b &= b+a \\
        1+2= & 2+1
    \end{align}

 

 

4. split environment

When a formula requires multi-line layout, the alignment is aligned by &

%一个公式的多行排版--带编号
    \begin{equation}
        \begin{split}
        \cos 2x &= \cos^2 x - \sin^2x \\
        &=2\cos^2x-1
        \end{split} 
    \end{equation}

 

 

5. cases environment

Piecewise functions or mathematical formulas opening brace

%case环境, text{}在数学模式中处理中文-带编号
    \begin{equation}
        D(x)=\begin{cases}
        1, & \text{如果} x \in \mathbb{Q};\\
        0, & \text{如果} x \in \mathbb{R}\setminus\mathbb{Q}
        \end{cases}
    \end{equation}

 

Published 118 original articles · won praise 63 · views 40000 +

Guess you like

Origin blog.csdn.net/qq_42185999/article/details/104255134