tex源代码
\RequirePackage{mmap} % make PDF copy and paste-able
\documentclass[twocolumn]{article}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{mathrsfs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% \usepackage{lmodern} % from http://tex.stackexchange.com/a/115089/121234
\usepackage[margin=0.5in]{geometry}
\setlength{\parskip}{0ex}
\usepackage{ragged2e}
\setlength{\RaggedRightParindent}{1em}
\usepackage{url}
\usepackage{listings}
\lstset{%
basicstyle=\scriptsize\ttfamily, % the size of the fonts
columns=fixed, % anything else is horrifying
showspaces=false, % show spaces using underscores?
showstringspaces=false, % underline spaces within strings?
showtabs=false, % show tabs within strings?
xleftmargin=1.5em, % left margin space
}
\lstdefinestyle{inline}{basicstyle=\ttfamily}
\usepackage[dvipsnames]{xcolor}
\definecolor{headcolor}{HTML}{004225} % British racing green {E34234} % vermillion
\usepackage{titlesec}
% \titleformat{ command }[ shape ]{ format }{ label }{ sep }{ before-code }[ after-code ]
% \titlespacing*{ command }{ left }{ before-sep }{ after-sep }[ right-sep ]
\titleformat{\section}[runin]{\color{headcolor}\bf}{}{0em}{}
\titlespacing*{\section}{0em}{0.65ex}{0.67em}
% TODO
\pagestyle{empty}
\begin{document}\thispagestyle{empty}
\RaggedRight
\begin{center}
{\large\color{headcolor}\textbf{\LaTeX{} Math for Undergrads}} \\
\end{center}
\section{Rule One}
Any mathematics at all,
even a single character, gets a mathematical setting.
Thus, for ``the value of $x$ is $7$\,'' enter
\lstinline[style=inline]!the value of $x$ is $7$!.
\section{Template}
Your document should contain at least this.
\begin{lstlisting}
\documentclass{article}
\usepackage{mathtools,amssymb,amsthm} % imports amsmath
\begin{document}
--document body here--
\end{document}
\end{lstlisting}
\section{Common constructs}
\begin{center}
\begin{tabular}{@{} *{1}{l@{\hspace{1.5em}}} l @{}}
$x^2$\quad\lstinline[style=inline]!x^2!
&$\sqrt{2}$, $\sqrt[n]{3}$\quad\lstinline[style=inline]!\sqrt{2}!,
\lstinline[style=inline]!\sqrt[n]{3}! \\
$x_{i,j}$\quad\lstinline[style=inline]!x_{i,j}!
&$\frac{2}{3}$, $2/3$\quad\lstinline[style=inline]!\frac{2}{3}!,
\lstinline[style=inline]!2/3!
\end{tabular}
\end{center}
\section{Calligraphic letters}
Use as in \lstinline[style=inline]!$\mathcal{A}$!.
\begin{center}
$ \mathcal{A}\mathcal{B}\mathcal{C}
\mathcal{D}\mathcal{E}\mathcal{F}
\mathcal{G}\mathcal{H}\mathcal{I}
\mathcal{J}\mathcal{K}\mathcal{L}
\mathcal{M}\mathcal{N}\mathcal{O}
\mathcal{P}\mathcal{Q}\mathcal{R}
\mathcal{S}\mathcal{T}\mathcal{U}
\mathcal{V}\mathcal{W}\mathcal{X}
\mathcal{Y}\mathcal{Z} $
\end{center}
Get script letters, such as $\mathscr{P}$
from \lstinline[style=inline]!$\mathscr{P}$!,
by putting
\lstinline[style=inline]!\usepackage{mathrsfs}!
in the preamble.
\section{Greek}
\begin{center}
\begin{tabular}{@{}l@{\hspace{1em}}l@{}}
$\alpha$\quad\lstinline[style=inline]!\alpha!
&$\xi$, $\Xi$\quad\lstinline[style=inline]!\xi!,
\lstinline[style=inline]!\Xi! \\
$\beta$\quad\lstinline[style=inline]!\beta!
&o\quad\lstinline[style=inline]!o! \\
$\gamma$, $\Gamma$\quad\lstinline[style=inline]!\gamma!,
\lstinline[style=inline]!\Gamma!
&$\pi$, $\Pi$\quad\lstinline[style=inline]!\pi!,
\lstinline[style=inline]!\Pi! \\
$\delta$, $\Delta$\quad\lstinline[style=inline]!\delta!,
\lstinline[style=inline]!\Delta!
&$\varpi$\quad\lstinline[style=inline]!\varpi! \\
$\epsilon$\quad\lstinline[style=inline]!\epsilon!
&$\rho$\quad\lstinline[style=inline]!\rho! \\
$\varepsilon$\quad\lstinline[style=inline]!\varepsilon!
&$\varrho$\quad\lstinline[style=inline]!\varrho! \\
$\zeta$\quad\lstinline[style=inline]!\zeta!
&$\sigma$, $\Sigma$\quad\lstinline[style=inline]!\sigma!,
\lstinline[style=inline]!\Sigma! \\
$\eta$\quad\lstinline[style=inline]!\eta!
&$\varsigma$\quad\lstinline[style=inline]!\varsigma! \\
$\theta$ $\Theta$\quad\lstinline[style=inline]!\theta!,
\lstinline[style=inline]!\Theta!
&$\tau$\quad \lstinline[style=inline]!\tau! \\
$\vartheta$\quad\lstinline[style=inline]!\vartheta!
&$\upsilon$, $\Upsilon$\quad\lstinline[style=inline]!\upsilon!,
\lstinline[style=inline]!\Upsilon! \\
$\iota$\quad\lstinline[style=inline]!\iota!
&$\phi$, $\Phi$\quad\lstinline[style=inline]!\phi!,
\lstinline[style=inline]!\Phi! \\
$\kappa$\quad\lstinline[style=inline]!\kappa!
&$\varphi$\quad\lstinline[style=inline]!\varphi! \\
$\lambda$ $\Lambda$\quad\lstinline[style=inline]!\lambda!,
\lstinline[style=inline]!\Lambda!
&$\chi$\quad\lstinl