@@ -187,14 +187,17 @@ \subsection{什么是\LaTeX?}
187187 \item 中文期刊的支持较差;
188188\end {itemize }
189189
190- \subsection {如何查询文档 ? }
190+ \subsection {如何查询文档和学习 ? }
191191对于这种非常陌生羞涩难懂的软件。你会觉得连查文档都很困难。不过如果你想对某个模块阅读文档,可以通过下面的命令打开英文文档。
192192
193193\ begin{lstlisting}
194194> texdoc 模块的名字
195195> texdoc lstlisting
196196\end {lstlisting }
197197
198+ 本文虽然只是给你讲解一些快速入门的东西。但是如果你想真正的学习好\LaTeX 那么,看一本书籍是必备的。
199+ 推荐这本入门书籍\cite {latex_start } 。建议先看: \href {https://github.com/heartacker/MyNotes/blob/master/01.Latex/LaTeX_Docs_2014/04%20%E7%94%B5%E5%AD%90%E4%B9%A6/LaTeX%E5%85%A5%E9%97%A8%EF%BC%88%E5%88%98%E6%B5%B7%E6%B4%8B%EF%BC%89.pdf}{LaTeX入门(刘海洋).pdf}
200+
198201
199202\subsection {\LaTeX 文类层级 }
200203\label {sec:structure }
@@ -601,117 +604,9 @@ \subsubsection{分组}
601604
602605这就是分组和环境的效果。
603606
604- \subsection {公式 }
605-
606- \LaTeX 对数学和科学支持最好的排班系统。这也是为什么科技工作者、科研人员、计算机科学家等非常喜欢使用 \LaTeX 写文章的原因。
607-
608- \subsubsection {行内公式 }
609-
610- 行内公式叫做 inline formula, 只需要 \$\ \$ 括起来,就是一个公式环境,比如\verb !$a+b$ ! 会得到 $ a+b$ ,而不是a+b。
611-
612- \subsubsection {列表公式 }
613- 较长的公式或者大块公式,一般单独居中编写,为了方便引用,还要进行编号。我们一般叫 displayed formula。使用 equation (单行) 和gather\footnote {需要引用amsmath 宏包} (多行) 等环境方便输出。参考 \href {https://matnoble.me/tech/latex/multi-line-equations/}{各种样子的对齐编码}。
614-
615- \ begin{lstlisting}
616- \begin{gather}
617- f(x)= \int_a^b x dx \notag \\ % \notag 代表不编号
618- % 度数竟然没有专门的符号^\circ
619- \angle CAB = 90^\circ =\pi / 2
620- \end{gather}
621- \end {lstlisting }
622-
623- 渲染效果:
624- \begin {gather }
625- f(x)= \int _a^b x dx \notag \\
626- % 度数竟然没有专门的符号^\circ
627- \angle CAB = 90^\circ =\pi / 2
628- \end {gather }
629-
630- \subsubsection {常用数学宏 amsmath 推荐 }
631-
632- 数学公式的编辑,一定离不开这个宏。我这里找了一个关于 amsmath 的\href {http://math.ecnu.edu.cn/~jypan/Latex/lect/lect06mathB.pdf}{PPT介绍}。\footnote {来自华东师范大学数学系潘建瑜老师的课程。}
633-
634- amsmath 这个宏包的作用如下。
635- \begin {enumerate }
636- \item 提供更多的数学符号和数学函数
637- \item 提供了除了 equation 之外的其他几个常用的数据环境。 gather、 align、flalign、 alignat、 multiline、subsequent。
638- \begin {quote }
639- Split 和 gathered 、aligned、alignated 则不会进入数学环境。
640- \end {quote }
641- \item 提供各种数学矩阵,如 matrix , pmatrix , bmatrix , Bmatrix , Vmatrix , smallmatrix。
642- \end {enumerate }
643-
644- 引用参数:
645- \ begin{lstlisting}
646- \usepackage[选项]{amsmath}
647- % 选项:其中前者是默认的参数
648- % centertags 或者 tabtags, split 环境种公式的编号的位置,左首右末
649- % sumlimits 或者 nosumlimits,求和符号上下限位置
650- % nointlimits 或者 inlimits,积分符号上下限位置
651- % namelimits 或者 nonameinlimits,积分符号上下限位置
652- % reqno 或者leqno。公式编号位置
653- % flenq, 行间公式居左对齐,默认是剧中对其。
654- \end {lstlisting }
655-
656- 参考下面的代码:
657- \ begin{lstlisting}
658- \documentclass{article}
659-
660- \usepackage{ctex}
661- \usepackage{amsmath}
662- \usepackage{amssymb}%花体字符
663-
664-
665- \begin{document}
666-
667-
668- \begin{gather}%会产生编号
669- a+b=b+a\\
670- ab=ba
671- \end{gather}
672-
673- \begin{gather*}%不会产生编号
674- a \times b=b \times a\\
675- ab=ba
676- \end{gather*}
677-
678- \begin{gather}%会编号
679- a+b=b+a \notag \\%\notag阻止编号
680- ab=ba \notag %\notag阻止编号
681- \end{gather}
682607
683608
684609
685- %align和align*环境(用$对齐)
686- \begin{align}
687- x &= t + \cos t + 1\\
688- y &= 2\sin t
689- \end{align}
690-
691-
692- %split环境(用$对齐)(一个公式分为多行排版)
693- \begin{equation}
694- \begin{split}
695- \cos 2x &= \cos^2 x - \sin^2 x\\
696- &= 2\cos^2 x - 1
697- \end{split}
698- \end{equation}
699-
700-
701- %case环境
702- %每行公式使用&分割成两部分
703- %通常表示值和后面的条件
704- \begin{equation}
705- D(x) = \begin{cases}
706- 1, &\text{如果} x \in \mathbb{Q}\\%mathbb花体字符
707- 0, &\text{如果} x \in \mathbb{R}\setminus\mathbb{Q}
708- \end{cases}%\text是为了在数学公式中处理中文
709- \end{equation}
710-
711-
712- \end{document}
713- \end {lstlisting }
714-
715610
716611\subsection {文章结构设计及模板 }
717612
@@ -1454,12 +1349,127 @@ \subsubsection{效果显示}
14541349% \footnotetext[1]{这里只展示论文的部分符号。符号首次出现时,本文将详细地说明其含义}
14551350
14561351\subsubsection {居中 }
1457- 有时候,用 \verb !\begin{center}-\end( center} ! 来将 table 整体居中,
1352+ 有时候,用 \verb !\begin{center}-\end{ center} ! 来将 table 整体居中,
14581353但它的居中只是 居中了 \verb !\begin{table}-\end{table} !;
14591354
14601355如果\verb !\begin{table}-\end{table} ! 里面嵌套了 \verb !\begin{tabular}-\end{tabular} ! ,
14611356那么表格还是不会居中。要使得表格居中,则需要在 \verb !\begin{table} ! 后面附加 \verb !\centering !,才能使得表格整体居中。
14621357
1358+
1359+ \subsection {如何插入数学公式 }
1360+
1361+ \LaTeX 对数学和科学支持最好的排班系统。这也是为什么科技工作者、科研人员、计算机科学家等非常喜欢使用 \LaTeX 写文章的原因。
1362+
1363+ \subsubsection {行内公式 }
1364+
1365+ 行内公式叫做 inline formula, 只需要 \$\ \$ 括起来,就是一个公式环境,比如\verb !$a+b$ ! 会得到 $ a+b$ ,而不是a+b。
1366+
1367+ \subsubsection {列表公式 }
1368+ 较长的公式或者大块公式,一般单独居中编写,为了方便引用,还要进行编号。我们一般叫 displayed formula。使用 equation (单行) 和gather\footnote {需要引用amsmath 宏包} (多行) 等环境方便输出。参考 \href {https://matnoble.me/tech/latex/multi-line-equations/}{各种样子的对齐编码}。
1369+
1370+ \ begin{lstlisting}
1371+ \begin{gather}
1372+ f(x)= \int_a^b x dx \notag \\ % \notag 代表不编号
1373+ % 度数竟然没有专门的符号^\circ
1374+ \angle CAB = 90^\circ =\pi / 2
1375+ \end{gather}
1376+ \end {lstlisting }
1377+
1378+ 渲染效果:
1379+ \begin {gather }
1380+ f(x)= \int _a^b x dx \notag \\
1381+ % 度数竟然没有专门的符号^\circ
1382+ \angle CAB = 90^\circ =\pi / 2
1383+ \end {gather }
1384+
1385+ \subsubsection {常用数学宏 amsmath 推荐 }
1386+
1387+ 数学公式的编辑,一定离不开这个宏。我这里找了一个关于 amsmath 的\href {http://math.ecnu.edu.cn/~jypan/Latex/lect/lect06mathB.pdf}{PPT介绍}。\footnote {来自华东师范大学数学系潘建瑜老师的课程。}
1388+
1389+ amsmath 这个宏包的作用如下。
1390+ \begin {enumerate }
1391+ \item 提供更多的数学符号和数学函数
1392+ \item 提供了除了 equation 之外的其他几个常用的数据环境。 gather、 align、flalign、 alignat、 multiline、subsequent。
1393+ \begin {quote }
1394+ Split 和 gathered 、aligned、alignated 则不会进入数学环境。
1395+ \end {quote }
1396+ \item 提供各种数学矩阵,如 matrix , pmatrix , bmatrix , Bmatrix , Vmatrix , smallmatrix。
1397+ \end {enumerate }
1398+
1399+ 引用参数:
1400+ \ begin{lstlisting}
1401+ \usepackage[选项]{amsmath}
1402+ % 选项:其中前者是默认的参数
1403+ % centertags 或者 tabtags, split 环境种公式的编号的位置,左首右末
1404+ % sumlimits 或者 nosumlimits,求和符号上下限位置
1405+ % nointlimits 或者 inlimits,积分符号上下限位置
1406+ % namelimits 或者 nonameinlimits,积分符号上下限位置
1407+ % reqno 或者leqno。公式编号位置
1408+ % flenq, 行间公式居左对齐,默认是剧中对其。
1409+ \end {lstlisting }
1410+
1411+ 参考下面的代码:
1412+ \ begin{lstlisting}
1413+ \documentclass{article}
1414+
1415+ \usepackage{ctex}
1416+ \usepackage{amsmath}
1417+ \usepackage{amssymb}%花体字符
1418+
1419+
1420+ \begin{document}
1421+
1422+
1423+ \begin{gather}%会产生编号
1424+ a+b=b+a\\
1425+ ab=ba
1426+ \end{gather}
1427+
1428+ \begin{gather*}%不会产生编号
1429+ a \times b=b \times a\\
1430+ ab=ba
1431+ \end{gather*}
1432+
1433+ \begin{gather}%会编号
1434+ a+b=b+a \notag \\%\notag阻止编号
1435+ ab=ba \notag %\notag阻止编号
1436+ \end{gather}
1437+
1438+
1439+
1440+ %align和align*环境(用$对齐)
1441+ \begin{align}
1442+ x &= t + \cos t + 1\\
1443+ y &= 2\sin t
1444+ \end{align}
1445+
1446+
1447+ %split环境(用$对齐)(一个公式分为多行排版)
1448+ \begin{equation}
1449+ \begin{split}
1450+ \cos 2x &= \cos^2 x - \sin^2 x\\
1451+ &= 2\cos^2 x - 1
1452+ \end{split}
1453+ \end{equation}
1454+
1455+
1456+ %case环境
1457+ %每行公式使用&分割成两部分
1458+ %通常表示值和后面的条件
1459+ \begin{equation}
1460+ D(x) = \begin{cases}
1461+ 1, &\text{如果} x \in \mathbb{Q}\\%mathbb花体字符
1462+ 0, &\text{如果} x \in \mathbb{R}\setminus\mathbb{Q}
1463+ \end{cases}%\text是为了在数学公式中处理中文
1464+ \end{equation}
1465+
1466+
1467+ \end{document}
1468+ \end {lstlisting }
1469+
1470+
1471+
1472+ % * \subsection{如何在 \LaTeX 中插入代码} % (fold)
14631473\subsection {如何在 \LaTeX 中插入代码 } % (fold)
14641474
14651475\subsubsection {简单代码 }
0 commit comments