用于出版物的排版,样式控制,使得编排标准美观。
一个最简环境
\documentclass{article}
\begin{document}
content...
\end{document}
特殊符号的表示需要使用转义方式,但是\\表示的是换行而不是\。需要则使用$\backslash$表示。
\documentclass{article}
\begin{document}
\# \$ \% \^{} \& \_ \{ \} \~ \\
$\backslash$
\end{document}
省略号使用特殊的表示,区别于传统的直接使用多个点,间距不同的。
\documentclass{article}
\begin{document}
\ldots when Einstein introduced his formula\\
...
\end{document}
\documentclass{article}
\begin{document}
\begin{equation} e = m \cdot c^2 \end{equation}
which is at the same time the most widely known and the least well understood physical formula.
\end{document}
\documentclass{article}
\begin{document}
\begin{equation} \sum_{k=1}^{n} I_k = 0 \end{equation}
Kirchhoff’s voltage law can be derive \ldots
\end{document}
如下
\documentclass{article}
\begin{document}
\today
\end{document}
使用两个’表示,或者左边使用`,右边使用’表示。
\documentclass{article}
\begin{document}
‘‘Please press the ‘x’ key.’’ \\
\\
``asdf'''
\end{document}
使用多个-表示
\documentclass{article}
\begin{document}
--------------------------
\LaTeX
\end{document}
如下,分别为上波浪线和中波浪线
\documentclass{article}
\begin{document}
http://www.rich.edu/\~{}bush \\
http://www.clever.edu/$\sim$demo\\
\end{document}
,如℃
\documentclass{article}
\begin{document}
It’s $-30\,^{\circ}\mathrm{C}$.
sm\o rrebr\o d, !‘Se\~norita!,\\
\end{document}
观察不同即可
\documentclass{article}
\usepackage{textcomp}
\begin{document}
\texteuro
\end{document}
如下示例
\documentclass{article}
\begin{document}
Not shelfful\\
but shelf\mbox{}ful\\
\end{document}
如下简例
\documentclass{article}
\begin{document}
\section{Some Interesting Words}
\end{document}
\documentclass{article}
\begin{document}
Footnotes\footnote{This is a footnote.}
\end{document}
一般使用斜体,但是整体是斜体则用正体,总之是不同的样式,表示强调
\documentclass{article}
\begin{document}
\textit{You can also \emph{emphasize} text if it is set in italics,}\\
\emph{emphasize}
\end{document}
如下示例
\documentclass{article}
\begin{document}
\begin{enumerate}
\item You can mix the list environments to your taste:
\begin{itemize} \item But it might start to look silly. \item[-] With a dash. \end{itemize}
\item Therefore remember:
\begin{description}
\item[Stupid] things will not become smart because they are in a list.
\item[Smart] things, though, can be presented beautifully in a list.
\end{description}
\end{enumerate}
\end{document}
示例右对齐、居中
\documentclass{article}
\begin{document}
\begin{flushright} This text is right-\\aligned. \LaTeX{} is not trying to make each line the same length.
\end{flushright}
\begin{center} At the centre\\of the earth \end{center}
\end{document}
摘要部分:
\documentclass{article}
\begin{document}
\begin{abstract} The abstract abstract. \end{abstract}
\end{document}
示例:
\documentclass{article}
\begin{document}
\begin{verbatim}
10 PRINT "HELLO WORLD ";
20 GOTO 10 \end{verbatim}
\end{document}
与上下横线,如下示例:宽度固定4.7cm
\documentclass{article}
\begin{document}
\begin{tabular}{|p{4.7cm}|} \hline Welcome to Boxy’s paragraph. We sincerely hope you’ll all enjoy the show.\\ \hline
\end{tabular}\\
\\\\
\\
\begin{tabular}{l} \hline leading space left and right\\ \hline \end{tabular}
\end{document}
示例:
\documentclass{article}
\begin{document}
1\\
[122pt] 100~m$^{3}$ of water\\
\end{document}
示例:tal 和 属于
\documentclass{article}
\begin{document}
\(\tau \epsilon \)\\
\end{document}
如下和效果:
\documentclass{article}
\begin{document}
\begin{displaymath} \lim_{n \to \infty} \sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6} \end{displaymath}
\begin{equation} x^{2} \geq 0\qquad \textrm{for all }x\in\mathbf{R} \end{equation}
\begin{equation} a^x+y \neq a^{x+y} \end{equation}
\[\lim_{x \rightarrow 0} \frac{\sin x}{x}=1\]
\begin{displaymath} \mathbf{X} = \left( \begin{array}{ccc} x_{11} & x_{12} & \ldots \\ x_{21} & x_{22} & \ldots \\ \vdots & \vdots & \ddots \end{array} \right) \end{displaymath}
\end{document}