总结LaTeX学习笔记

LaTeX笔记

%%%%%----第一课\第二课-----
%%%%%导言区

\documentclass{ctexart}%book,report,letter

%\usepackage{ctex}

\newcommand\degree{^\circ}

%\title{my first document}
\title{\heiti 勾股定理杂谈}
\author{\kaishu 张三}
%\author{nangeng}
\date{\today}

%%%%%正文区(文稿区)

\begin{document}
\maketitle
%hello world!

%%%%%空行起换行作用,多个空行只能输出一个空行的作用。
%Let $f(x)$be defined by the formul
%%%%%双$$,和单$都表示输入公式,二者有什么不容呢,这个需要自行比较。
%%%%%数学公式要在数学公式模式下输入。
%$$f(x)=3x^2=x-1$$which is a polynomial of degree 2.
勾股定理可以用现代语言表示如下:
直角三角形斜边的平方等于两腰的平方和。
可以用符号语言表述为:设直角三角形$ABC$,其中$\angle C=90\degree$,则有
\begin{equation}
	AB^2=BC^2+AC^2.
\end{equation} %%%%%equation环境用于产生带编号的行阶公式。

\end{document}

%==第三课=

%导言区
\documentclass[10pt]{article} %文档类参数是一个可选参数

\usepackage{ctex}

%latex的思想是格式与内容的分离,因此不建议在文档中使用大量命令,定义一个新的命令执行相关的操作
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}

%正文区(文稿区)
\begin{document}
%字体族设置(罗马字体、无衬线字体、打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}

%既可以使用字体命令作用于命令的参数,也可以使用字体声明作用于后续的文本。

%字体声明
%也可以用大括号限制字体声明范围
{\rmfamily Roman Family}{\sffamily Sans Serif Family}{\ttfamily Typewriter Family}

\sffamily who are you?

\ttfamily Are you wiser than others?

%字体系列设置(粗细,宽度)
\textmd{Medium Series} \textbf{Boldface Series}

{\mdseries Medium Series}{\bfseries Boldface Series}

%字体形状(直立、斜体、伪斜体、小型大写)
\textup{Upright Shape} \textit{Italic Shape}
\textsl{Slanted Shape} \textsc{Small Caps Shape}
%%同样地,既可以使用字体设置命令,也可以使用字体设置声明
{\upshape Upright}{\itshape Italic Shape}{\slshape Slanted Shape}{\scshape Small Caps Shape}

%中文字体   %这里要使用ctex宏包,否则无法使用这里的设置。
{\songti 宋体} \quad {\heiti 黑体} \quad{\fangsong 仿宋} \quad {\kaishu 楷书}

中文字体的 \textbf{粗体}与 \textit{斜体}

%字体大小,%字体大小是通过一系列声明实现的,这些声明是与normalsize相对的大小。normalsize的大小是由文档类的参数控制的。
{\tiny           Hello}\\
{\scriptsize     Hello}\\
{\footnotesize   Hello}\\
{\small          Hello}\\
{\normalsize     Hello}\\  %
{\large          Hello}\\
{\Large          Hello}\\
{\LARGE          Hello}\\
{\huge           Hello}\\
{\Huge           Hello}\\

%中文字号设置命令
\zihao{5} 你好!

\myfont

\end{document}

%=第四课=
%导言区
\documentclass{ctexart}

%\usepackage{ctex}

%==设置标题格式=
\ctexset{
section = {
format+ =\zihao{-4}\heiti \raggedright,
name = {,、}, %这里不知道为什么标点输出的结果不对
number = \chinese{section},
beforeskip = 1.0ex plus 0.2ex minus .2ex,
afterskip = 1.0ex plus 0.2ex minus .2ex,
aftername = \hspace{0pt}
},
subsection = {
format+ =\zihao{5}\heiti\raggedright,
%name={\thesubsection、},
name = {,、},
number = \arabic{subsection},
beforeskip =1.0ex plus 0.2ex minus .2ex,
afterskip = 1.0ex plus 0.2ex minus .2ex,
aftername = \hspace{0pt}
}
}

%正文区
\begin{document}
\section{引言}
%空行分段,多个空行等同1个
%自动缩进,绝对不能使用空格代替
%英文中多个空格处理为一个空格,中文中空格将被忽略
%汉字与其他字符的间距会自动由XeLaTeX处理
%禁止使用中文全角空格

本人

\par 二级学院:

班    级:

团队名称
:
家长意见(是否同意,并签字):

本人签字:

二〇二〇年七月

%\\双斜杠只是换行不产生新一行的段落。\par产生新一行的段落

\section{实验方法}
\section{实验结果}
\subsection{数据}
\subsection{图表}
\subsubsection{实验条件}
\subsubsection{结果分析}
\subsubsection{实验过程}
\section{结论}
\section{致谢}

\end{document}

%=第五课=
%导言区
\documentclass{ctexbook}

%文稿区(文档区)
%%======将内容与格式分离是latex的基本思想

\begin{document}
\tableofcontents %产生整个文档的目录
\chapter{绪论}
\section{研究的目的和意义}
\section{国内外研究现状}
\subsection{国外研究现状}
\subsection{国内研究现状}
\section{研究内容}
\section{研究方法与技术路线}
\subsection{研究内容}
\subsection{技术路线}

\chapter{实验与结果分析}
\section{引言}
\section{实验方法}
\section{实验结果}
\subsection{数据}
\subsection{图表}
\subsubsection{实验条件}
\subsubsection{实验过程}
\subsection{结果分析}
\section{结论}
\section{致谢}

\end{document}

%=第六课
%导言区
\documentclass{article}

\usepackage{ctex}
\usepackage{xltxtra}%提供了针对XeTeX的改进并且加入了XeTeX的LOGO
\usepackage{texnames} %一些LOGO
\usepackage{mflogo}

%文稿区(正文区)

\begin{document}
\section{空白符号}
本人

The algorithm was named after Nicholas Metropolis, who was an author along with Arianna W. Rosenbluth,
Marshall N. Rosenbluth, Augusta H. Teller, and Edward Teller of the 1953 paper Equation of State Calculations
by Fast Computing Machines which first proposed the algorithm for the specific case of the canonical ensemble.
W.K. Hastings who extended it to the more general case in 1970. The algorithm is versatile and 据本责任书和有关规定处 gives rise to
Gibbs sampler as a special case. This paper is meant to provide a simple or intuitive exposition of the M-H	algorithm

%1em(当前字体中的M宽度)
a\quad b

%2em
a\qquad b

%约为1/6个em
a\,b a\thinspace b

%0.5个em
a\enspace b\\
%空格
a\ b\\
%硬空格
a~b

%1pc=12pt=4.218mm
a\kern 1pc b

a\kern -1em b

a\hskip 1em b

a\hspace{35pt}b

%占位宽度
a\hphantom{xyz}b

%弹性长度
a\hfill b


\section{\LaTeX 控制符}
\# \$ \% \{ \} \~{} \_{} \^{} \textbackslash
\&

\section{排版符号}
\S \P \dag \ddag \copyright \pounds 
\section{\TeX 标志符号}
\TeX{} \LaTeX{} \LaTeXe{}
\XeLaTeX

%texnames宏包提供
\AmSTeX{} \AmS-\LaTeX{}
\BibTeX{} \LuaTeX{}
%mflogo宏包提供
\METAFONT{} \MF{} \MP{}

\section{引号}
` ' `` ''
\section{连字符}
- -- ---
\section{非英文字符}
\oe \OE \ae \AE \aa \AA \o \O \l \L \ss \SS  !` ?`
\section{{重音符号(以o为例}}
\`o \'o \^o \''o \~o \=o \.o \u{o} \v{o} \H{o} \r{o} \t{o} \b{o} \c{o} \d{o}

\end{document}

%%==第七课=
%导言区
\documentclass{ctexart}

%导言区:\usepackage{graphicx}
%语法:\includegraphics[<选项>]{<文件名>}
%格式:EPS,PDF,PNG,JPEG,BMP
\usepackage{graphicx}
\graphicspath{{论文排版/}}%图片在当前目录下的figures目录

%正文区
\begin{document}
%\LaTeX{}中的插图

\includegraphics{1}
\includegraphics{2}
\includegraphics{3}

\includegraphics[scale=0.3]{1}
\includegraphics[scale=0.03]{2}
\includegraphics[scale=0.3]{3}

\includegraphics[height=2cm]{1}
\includegraphics[height=2cm]{2}
\includegraphics[height=2cm]{3}

\includegraphics[width=2cm]{1}
\includegraphics[width=2cm]{2}
\includegraphics[width=2cm]{3}

\includegraphics[height=0.1\textheight]{1}
\includegraphics[height=0.1\textheight]{2}
\includegraphics[height=0.1\textheight]{3}

\includegraphics[angle=-45,width=0.2\textwidth]{1}
\includegraphics[width=0.2\textwidth]{2}
\includegraphics[angle=45,width=0.2\textwidth]{3}

\end{document}

%%=第八课LATEX中的表格==

%导言区
\documentclass{ctexart} %ctexbook, ctexrep

%\begin{tabluar}[<垂直对齐方式>]{<列格式说明>}
%<表项> &<表项> &…&<表项>\
%…
%\end{tabluar}
%用\表示换行
%用&表示不同的列
%l-本列左对齐
%c-本列居中对齐
%r-本列右对齐
%p{<宽>}-本列宽度固定,能够自动换行

%usepackage{ctex}

%正文区(文稿区)

\begin{document}
\begin{tabular}{|l || c | c | c |p{1.5cm}|} % {|l || c | c | c | r|}
\hline
姓名 & 语文 & 数学 & 外语 & 备注 \
\hline\hline
张三 & 87 & 100 & 93 & 优秀 \
\hline
李四 & 75 & 64 & 52 & 补考另行通知\
\hline
王二 & 80 & 82 & 78 & \
\hline
\end{tabular}
\end{document}

%%第九课Latex中的浮动体环境=

%%ctrl+T给整段加注释,ctrl+U整段取消注释
%导言区
\documentclass{ctexart}
\usepackage{graphicx}
\graphicspath{{论文排版/}}%图片在当前目录下的figures目录
%标题控制(caption、bicaption等宏包)
%并排与子图表(subcaption、subfig、floatrow等宏包)
%绕排(picinpar、wrapfig等宏包)

%正文区
\begin{document}
\LaTeX{}中\TeX 文件见图\ref{fig-lion}:
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.3]{2}
\caption{\TeX 文件}\label{fig-lion}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=0.3]{3}
\caption{\TeX 文件}\label{fig-lion}
\end{figure}

\begin{figure}[htbp]
\centering
\includegraphics[scale=0.3]{1}
\caption{\TeX 文件}\label{fig-lion}
\end{figure}

在LaTeX{}中也可以使用表\ref{tab-score}所示的表格:
\begin{table}[h]
\centering
\caption{考试成绩单} \label{tab-score}
\begin{tabular}{|l|c|c|c|r|}
\hline
姓名 & 语文 & 数学 & 外语 & 备注\
\hline
张三 & 87 & 100 & 93 & 优秀 \

\end{tabular}

\end{table}

\end{document}

%%%=讲解==
%浮动体
%实现灵活分页(避免无法分割的内容产生的页面留白)
%给图表添加标题
%交叉引用\ref
%
%%figure环境(table环境与之类似)
%%\begin{figure}[<允许位置>]
%<任意内容>
%\end{figure}

%<允许位置>参数(默认tbp)
%h,此处(here)-代码所在的上下文位置
%t,页顶(top)-代码所在页面或之后页面的底部
%b,页底(bottom)-代码所在页面或之后页面的底部
%p,独立一页(page)-浮动页面

%%latex第10课数学公式初步=

%导言区
\documentclass{ctexart}
\usepackage{ctex}
\usepackage{amsmath}

%正文区
\begin{document}
\section{简介}
\LaTeX{}将排版内容分为文本模式和数学模式。文本模式用于普通文本排版,数学模式用于数学公式排版
\section{行内公式}
\subsection{美元符号}
交换律是 a + b = b + a a+b=b+a a+b=b+a,如 1 + 2 = 2 + 1 = 3 1+2=2+1=3 1+2=2+1=3
\subsection{小括号}
交换律是(a+b=b+a),如(a+2=2+1=3)。
\subsection{math环境}
交换律是 \begin{math}a+b=b+a\end{math},如\begin{math}1+2=2+1=3\end{math}
\subsection{displaymath环境}
交换律是
\begin{displaymath}
a+b=a+a,
\end{displaymath}

\begin{displaymath}
1+2=2+1=3.
\end{displaymath}
\subsection{自动编号公式equation环境}
交换律见\ref{eq:commutative}:
\begin{equation}
a+b=b+a \label{eq:commutative}
\end{equation}
\subsection{不编号公式equation*环境}

交换律见\ref{eq:commutative2}:
\begin{equation*}
a+b=b+a   \label{eq:commutative2}            
\end{equation*}

公式的编号与交叉引用也是自动实现的,大家在排版中要习惯采用自动化的方式处理诸如图、表、公式的编号与交叉引用。再如公式\ref{eq:pol}

\begin{equation}
	x^5-7x^3+4x=0\label{eq:pol}
\end{equation}

\section{上下标}
\subsection{上标}
$3x^{20}-x+2=0$
$3x^{3x^{20}-x+2}-x+2=0$
\subsection{下标}
$a_0,a_1,a_2$

$a_0,a_1,a_2,a_3,......,a_{3x^{20}-x+2}$
\section{希腊字母}
$\alpha$
$\beta$
$\gamma$
$\epsilon$
$\pi$
$\omega$

$\Gamma$
$\Delta$
$\Theta$
$\Pi$
$\Omega$

$\alpha^3+\beta^2+\gamma=0$

\section{数学函数}
$\log$
$\sin$
$\cos$
$\arcsin$
$\arccos$
$\ln$

$\sin^2 x + \cos^2 x =1$
$y=\arcsin x$
$y=\sin^{-1} x$
$y=\log_2 x$
$y=\ln x$

$\sqrt{2}$
$\sqrt{x^2+y^2}$
$\sqrt{2+\sqrt{2}}$
$\sqrt[4]{x}$
\section{分式}
大约是原体积的$3/4$
大约是原体积的$\frac{3}{4}$

$\frac{x}{x^2+x+1}$

$\frac{\sqrt{x-1}}{\sqrt{x+1}}$

$\frac{1}{1+\frac{1}{x}}$

$\sqrt{\frac{x}{x^2+x-1}}$

\end{document}

%=第十一课数学公式的矩阵=
%导言区
\documentclass{ctexart}
\usepackage{amsmath}

\newcommand{\adots}{\mathinner{\mkern2mu%
\raisebox{0.1em}{.}\mkern2mu\raisebox{0.4em}{.}%
\mkern2mu\raisebox{0.7em}{.}\mkern1mu}
}%%这里定义一个新的函数adots

%正文区
\begin{document}
[
\begin{matrix}
0 & 1 \
1 & 0
\end{matrix}
]

%pmatrix环境
\[
\begin{pmatrix}
	0 & -i \\
	i & 0
\end{pmatrix}\qquad
\]

%bmatrix环境
\[
\begin{bmatrix}
	0 & -1 \\
	1 & 0
\end{bmatrix} \qquad
\]

%Bmatrix环境
\[
\begin{Bmatrix}
0 & -1 \\
1 & 0
\end{Bmatrix} \qquad
\]

%Vmatrix环境
\[
\begin{Vmatrix}
0 & -1 \\
1 & 0
\end{Vmatrix} \qquad
\]
%常用省略号:\dots,\vdots,\ddots,\adots
\[
A=\begin{bmatrix}
a_{11} & \dots & a_{1n} \\
& \ddots & \vdots \\
0 & & a_{nn}
\end{bmatrix}_{n \times n}
\]
\[
A=\begin{pmatrix}
a_{11} & \dots & a_{1n} \\
& \ddots & \vdots \\
0 & & a_{nn}
\end{pmatrix}_{n \times n}
\]
%分块矩阵(矩阵嵌套)
\[
\begin{pmatrix}
\begin{matrix}
1 & 0\\0&1
\end{matrix}
& \text{\Large 0}\\  %\text命令用于在数学模式中切换到文本模式
\text{\Large 0} & \begin{matrix}
1 & 0\\0&-1
\end{matrix}
\end{pmatrix}
\]
%三角矩阵
\[\begin{pmatrix}
a_{11}&a_{12}&\cdots & a_{1n}\\
& a_{22} & \cdots & a_{2n}\\
&        & \ddots & \vdots \\
\multicolumn{2}{c}{\raisebox{1.3ex}[0pt]{\Huge 0}} %raisebox来调整高度
&        &a_{nn}

\end{pmatrix}\]
% 跨列的省略号:\hdotsfor{<列数>}
\[
\begin{pmatrix}
1 & \frac 12 & \dots & \frac 1n \\
\hdotsfor{4}\\
m & \frac m2 & \dots & \frac mn
\end{pmatrix}\]

%行内小矩阵(smallmatrix)环境
复数$z=(x,y)$也可用矩阵
\begin{math}
	\left(%需要手动加上左括号
	\begin{smallmatrix}
	x & -y \\ y & x
	\end{smallmatrix}
	\right)%需要手动加上右括号
\end{math}来表示。

%array环境(类似于表格环境tabular)
\[
\begin{array}{r|r}
\frac 12 & 0\\
\hline
0 & -\frac abc\\
\end{array}\]

%用array环境构造复杂矩阵
\[
%@{<内容>}-添加任意内容,不占表项计数
%此处添加一个负值空白,表示向左移-5pt的距离
\begin{array}{c@{\hspace{-5pt}}l}%c-居中对齐,l-居左对齐
%第1行,第1列
\left(
\begin{array}{ccc|ccc}
a & \cdots & a & b & \cdots & b\\
&   \ddots & \vdots & \vdots & \adots\\
&   &  a   & b\\ \hline
&   &      &      c     & \cdots & c\\
&&&\vdots&&\vdots\\
\multicolumn{3}{c|}{\raisebox{2ex}[0pt]{\Huge 0}}
& c& \cdots & c
\end{array}
\right)
&
%第1行第2列 ,用于产生左侧的括号
\begin{array}{l}
%\left.仅表示与\right\}配对,什么都不输出
\left.\rule{0mm}{7mm}\right\}p\\
\\
\left.\rule{0mm}{7mm}\right\}q
\end{array}
\\[-5pt]
%第2行第1列 
\begin{array}{cc}
\underbrace{\rule{17mm}{0mm}}_m& %用于产生下方的横向大括号标志
\underbrace{\rule{17mm}{0mm}}_m
\end{array}
&%第2行第2列
\end{array}
\]

\end{document}

%第十二课数学公式的多行公式
\documentclass{ctexart}

\usepackage{amsmath}
\usepackage{amssymb}

%正文区
\begin{document}
%gather 和 gather* 环境(可以使用\换行)
%gather带编号,实现带编号的多行公式的排版
\begin{gather}
a + b =b + a \
ab=ba
\end{gather}
%gather不带编号,实现不带编号的多行公式的排版
\begin{gather
}
3+5=5+3=8 \
3\times 5=15
\end{gather*}

%在\\前使用\notag阻止编号
\begin{gather}
	3^2 +4^2=5^2 \notag \\
	5^2 +12^2= 13^2 \notag \\
	a^2 +b^2=c^2 
\end{gather}
%align和align*环境对指定位置进行对齐(用&进行对齐)
%带编号
\begin{align}
	x &= t+\cos t +1\\
	y &= 2\sin t
\end{align}
%不带编号
\begin{align*}
	x &= t & x &= \cos t & x & =t \\
	y &= 2t& y &= \sin(t+1) & y & =\sin t
\end{align*}
%split环境(对齐采用align环境的方式,编号在中间)
\begin{equation}
	\begin{split}
	\cos 2x &= \cos^2 x- \sin^2 x\\
	&= 2\cos^2 x-1
	\end{split}
\end{equation}

%类似分段函数的公式排版可以在cases环境下实现
%cases环境
%每行公式中使用& 分隔为两部分
%通常表示值和后面的条件
\begin{equation}
	D(x)= \begin{cases}
	1,& \text{如果} x \in \mathbb{Q};\\ %\in -用于输出属于符号;mathbb-用于输出花体字符 ,这里需要amssymb宏包支持
	%数学公式中\text命令用于实现中文排版,如果不用此命令,无法输出中文字符。所以需要使用\text命令在数学模式下处理中文
	0, & \text{如果} x \in \mathbb{R}\setminus\mathbb{Q}.
	\end{cases}
\end{equation}

\end{document}

%=第13课参考文献的引用
%导言区
\documentclass{ctexart}

\usepackage{amsmath}
%正文区
\begin{document}
%一次管理,一次使用
%参考文献格式:
%\begin{thebibliography}{编号样本}
% \bibtiem[记号]{引用标志}文献条目1
% \bibtiem[记号]{引用标志}文献条目2
%…
%\end{thebibliography}
%其中文献条目包括:作者,题目,出版社,年代,版本,页码等。
%引用的时候可以采用: \cite{引用标志1,引用标志2,…}
\begin{thebibliography}{99}
\bibitem{article1}陈立辉,苏伟,蔡川,陈晓云.\emph{基于LaTeX的Web数学公式提取方法研究}[J].计算机科学.2014(06)
\bibitem{book1}William H Press,Saul A. Teukolsky,
William T. Vetterling,Brian P.Flannery,
\emph{Numerical Recipes 3rd Edition:
The Art of Scientific Computing}
Cambridge University Press,New York,2007.
\bibitem{latexGuide} Kopka Helmut,W.Daly Patrick,
\emph{Guide to \LaTeX}, 4 t h 4^{th} 4th Edition.
Available at \texttt{http://www.amazon.com}.
\bibitem{latexMath} Graetzer George,\emph{Math Into \LaTeX},
Boston;3 edition (June 22,2000).
\end{thebibliography}
\end{document}

%%%这节课没有听完,有待听第二遍

%%第14课参考文献暂略

%%第15课latex中的自定义命令和环境=
%导言区
\documentclass{ctexart}
\usepackage{amsmath}
\usepackage{amssymb}
%\newcommand{cmd}{def}-定义命令
%命令只能有字母组成,不能以\end开头
%\newcommand<命令>[<参数个数>][<首参数默认值>]{<具体定义>}

%\newcommand可以是简单字符串替换,例如:
%使用\PRC 相当于 People’s Republic of \emph{China} 这一串内容
\newcommand\PRC{People’s Republic of \emph{China}}

%\newcommand也可以使用参数
%参数个数可以从1 到9,使用时用#1,#2,…,#9表示
\newcommand\loves[2]{#1 喜欢 #2}
\newcommand\hatedby[2]{#2 不受 #1 喜欢}

%\newcommand的参数也可以有默认值
%指定参数个数的同时制定了首个参数的默认值,那么这个命令的第一个参数就成为可选参数(要使用中括号指定)
\newcommand\love[3][喜欢]{#2#1#3}

%\renewcommand-重定义命令
%与\newcommand 命令作用和用法相同,但只能用于已有命令
%\renewcommand<命令>[<参数个数>][<首参数默认值>]{<具体定义>}
\renewcommand\abstractname{简介}

%定义和重定义环境
% \newcommand{<环境名称>}[<参数个数>][<首参数默认值>]{<环境前定义>}{<环境后定义>}
%\renewcommand{<环境名称>}[<参数个数>][<首参数默认值>][<环境前定义>][<环境后定义>]

%为book类中定义摘要(abstract)环境
\newenvironment{myabstract}[1][摘要]%
{\small
\begin{center}\bfseries #1\end{center}
\begin{quotation}}
{
\end{quotation}}

%环境参数只有<环境前定义>中可以使用参数,
%<环境后定义>中不能再使用环境单数。
%如果需要,可以先把前面的道德参数保存在一个命令中,在后面使用:
\newenvironment{Quotation}[1]%
{\newcommand\quotesource{#1}%
\begin{quotation}}%
{\par\hfill—《\textit{\quotesource}》%
\end{quotation}}

%正文区(文稿区)
\begin{document}
\begin{myabstract}[我的摘要]
这是一段摘要…
\end{myabstract}

\begin{Quotation}{易$\cdot$乾}
	初九,潜龙勿用。
\end{Quotation}

定义命令和环境是进行\LaTeX{}格式定制、达成内容与格式分离目标的利器。使用自定义的命令和环境把字体、字号、缩进、对齐、间距等各种琐细的内容包装起来,附以一个有意义的名字,可以使文档结构清晰、代码整洁、易于维护。在使用宏定义的功能时,要综合利用各种已有的命令、环境、变量等功能,事实上,前面所介绍的长度变量与盒子、字体字号等内容,大多并不直接出现在文档正文中,而主要都是用在实现各种结构化的宏定义里。

\PRC

\loves{猫儿}{鱼}

\hatedby{猫儿}{萝卜}

\love{猫儿}{鱼}

\love[最爱]{猫儿}{鱼}

\end{document}

你可能感兴趣的:(总结LaTeX学习笔记)