Latex使用技巧总结(Latex tips summary)

设置字体颜色

使用的宏包:

\usepackage{color}

使用示例:

\textcolor[rgb]{1,0,0}{需要变色的内容}

设置粗体

使用示例:

\textbf{想要设置粗体的字符}

设置花体

使用示例:

\mathcal{想要变成花体的字符}

输入根号:

使用示例:

\sqrt{A+B}

公式中换行:

在公式上下两端加上split,同时使用\指明换行的位置。

使用示例:

\begin{equation}
    \begin{split}
        q_0 = \frac{\sqrt{tr(R)+1}}{2} \\
        q_1 = \frac{m_{23}-m_{32}}{4q_0} \\
    \end{split}
\end{equation}

输出方程组:

方程组不标号:

使用宏包:

\usepackage{amsmath}

使用示例:

\begin{equation*}
     \begin{cases}
         l_{11}y_{1} = 1 \\
         l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
         l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
         l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
     \end{cases}
 \end{equation*}

方程组整体标号:

使用宏包:

\usepackage{amsmath}

使用示例:

\begin{equation}
    \begin{cases}
        l_{11}y_{1} = 1 \\
        l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
        l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
        l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
     \end{cases}
\end{equation}

方程组中每个方程都标号:

使用宏包:

\usepackage{cases}

使用示例:

\begin{numcases}{}
    l_{11}y_{1} = 1 \\
    l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
    l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
    l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
\end{numcases}
————————

Set font color

Macro package used:

\usepackage{color}

Use example:

\textcolor[rgb]{1,0,0}{需要变色的内容}

Set bold

Use example:

\textbf{想要设置粗体的字符}

Set flower body

Use example:

\mathcal{想要变成花体的字符}

Enter root:

Use example:

\sqrt{A+B}

Line break in formula:

Add split at the upper and lower ends of the formula, and use \ to indicate the position of line feed.

Use example:

\begin{equation}
    \begin{split}
        q_0 = \frac{\sqrt{tr(R)+1}}{2} \\
        q_1 = \frac{m_{23}-m_{32}}{4q_0} \\
    \end{split}
\end{equation}

Output equations:

Equations are not labeled:

Use macro package:

\usepackage{amsmath}

Use example:

\begin{equation*}
     \begin{cases}
         l_{11}y_{1} = 1 \\
         l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
         l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
         l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
     \end{cases}
 \end{equation*}

Overall label of equations:

Use macro package:

\usepackage{amsmath}

Use example:

\begin{equation}
    \begin{cases}
        l_{11}y_{1} = 1 \\
        l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
        l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
        l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
     \end{cases}
\end{equation}

Each equation in the equation set is labeled:

Use macro package:

\usepackage{cases}

Use example:

\begin{numcases}{}
    l_{11}y_{1} = 1 \\
    l_{21}y_{1} + l_{22}y_{2} = 0 \\ 
    l_{31}y_{1} + l_{32}y_{2} + l_{33}y_{3} = 0 \\
    l_{41}y_{1} + l_ {42}y_{2} + l_{43}y_{3} + l_{44}y_{4} = 0
\end{numcases}