我半途而废的学习笔记之 LaTeX (3) -数学公式

公式可以用mathtype往这边粘过来。

本来你是用word写公式,直接复制粘贴就行;用LaTeX的话需要改个设置,在下面这个转换里:
在这里插入图片描述
本来默认是这样的,公式对象Windows:
在这里插入图片描述
需要改成下面这个:
在这里插入图片描述
然后复制粘贴就行了,需要注意的是 需要把粘过来的百分号 那些好几行的都删掉,然后看情况是行内还是行间加不加dollar符就行了。

在这里插入图片描述

\documentclass{article}
\usepackage{amsmath}%矩阵包
\usepackage{ctex}
\begin{document}
    %\subsection{displaymath环境} %换行公式
    %交换律是:
    %\begin{displaymath}
    %    \[\frac{{ - b \pm \sqrt {{b^2} - 4ac} }}{{2a}}\]
    %\end{displayment}
    %知道了吧。
    \subsection{自动编号公式displaymath环境}
    公式\quad如\ref{math-1}所示:%\quad是空格还有qquad等
    \begin{equation}
        \frac{{ - b \pm \sqrt {{b^2} - 4ac} }}{{2a}}\label{math-1}
    \end{equation}

%mathtype矩阵
$\left( {\begin{array}{*{20}{c}}
   {\rm{0}} & {\rm{1}}  \\
   {\rm{2}} & {\rm{3}}  \\
\end{array}} \right)$

    \[%矩阵
    \begin{bmatrix}%pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix
    0&1\\
    2&3\\
    \dots&\vdots\\
    \ddots&\times
    \end{bmatrix}
    \]
    \subsection{多行公式的排版}
    \begin{gather}
        a + b = b + a\notag\\
        ab ba\\
        1\times 5 = 5\\
    \end{gather}

\end{document}

学完了可以再把mathtype的那个设置改回去,别忘了~

猜你喜欢

转载自blog.csdn.net/weixin_41661059/article/details/106891836