\documentclass[12pt]{article}
\usepackage{caption}
\usepackage{float}
\usepackage{hyperref}
\author{Chaitanya Krishna Ande, Colton Kohnke, Sricharan Chiruvolu \& \\
Svetlana Golubeva}
\date{\today}
\title{Learn \LaTeX \hspace{1pt} in Y Minutes!}
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\begin{abstract}
\LaTeX \hspace{1pt} documentation written as \LaTeX! How novel and totally not
my idea!
\end{abstract}
\section{Introduction}
Hello, my name is Colton and together we're going to explore \LaTeX!
\section{Another section}
This is the text for another section. I think it needs a subsection.
\subsection{This is a subsection}
I think we need another one
\subsubsection{Pythagoras}
Much better now.
\label{subsec:pythagoras}
\section*{This is an unnumbered section}
然而并不是所有章节都要被标序号
\section{Some Text notes}
\LaTeX \hspace{1pt} is generally pretty good about placing text where it should
go. If
a line \\ needs \\ to \\ break \\ you add \textbackslash\textbackslash
\hspace{1pt} to the source code. \\
\section{Lists}
Lists are one of the easiest things to create in \LaTeX! I need to go shopping
tomorrow, so let's make a grocery list.
\begin{enumerate}
\item Salad.
\item 27 watermelon.
\item A single jackrabbit.
\item[how many?] Medium sized squirt guns.
Not a list item, but still part of the enumerate.
\end{enumerate}
\section{Math}
使用 \LaTeX \hspace{1pt} 的一个最主要的方面是学术论文和技术文章
通常在数学和科学的领域
因此我们需要在文章中插入特殊符号! \\
数学符号极多,远超出你能在键盘上找到的那些;
集合关系符,箭头,操作符,希腊字符等等 \\
集合与关系在数学文章中很重要
如声明所有 x 属于 X $\forall$ x $\in$ X. \\
\[a^2 + b^2 = c^2 \]
My favorite Greek letter is $\xi$. I also like $\beta$, $\gamma$ and $\sigma$.
I haven't found a Greek letter yet that \LaTeX \hspace{1pt} doesn't know
about! \\
常用函数操作符同样很重要:
trigonometric functions ($\sin$, $\cos$, $\tan$),
logarithms 和 exponentials ($\log$, $\exp$),
limits ($\lim$), etc.
在 LaTeX 指令中预定义
让我们写一个等式看看发生了什么:
$\cos(2\theta) = \cos^{2}(\theta) - \sin^{2}(\theta)$ \\
分数可以写成以下形式:
$$ ^{10}/_{7} $$
$$ \frac{n!}{k!(n - k)!} $$ \\
我们同样可以插入公式(equations)在环境 ``equation environment'' 下。
\begin{equation}
c^2 = a^2 + b^2.
\label{eq:pythagoras}
\end{equation}
引用我们的新等式!
Eqn.~\ref{eq:pythagoras} is also known as the Pythagoras Theorem which is also
the subject of Sec.~\ref{subsec:pythagoras}. A lot of things can be labeled:
figures, equations, sections, etc.
求和(Summations)与整合(Integrals)写作 sum 和 int :
\begin{equation}
\sum_{i=0}^{5} f_{i}
\end{equation}
\begin{equation}
\int_{0}^{\infty} \mathrm{e}^{-x} \mathrm{d}x
\end{equation}
\section{Figures}
让我们插入图片。图片的放置非常微妙。
我在每次使用时都会查找可用选项。
\begin{figure}[H]
\centering
\caption{Right triangle with sides $a$, $b$, $c$}
\label{fig:right-triangle}
\end{figure}
\subsection{Table}
插入表格与插入图片方式相同
\begin{table}[H]
\caption{Caption for the Table.}
\begin{tabular}{c|cc}
Number & Last Name & First Name \\
\hline
1 & Biggus & Dickus \\
2 & Monty & Python
\end{tabular}
\end{table}
\section{Getting \LaTeX \hspace{1pt} to not compile something (i.e. Source Code)}
现在增加一些源代码在 \LaTeX \hspace{1pt} 文档中,
我们之后需要 \LaTeX \hspace{1pt} 不翻译这些内容而仅仅是把他们打印出来
这里使用 verbatim environment。
\begin{verbatim}
print("Hello World!")
a
random = 4; #decided by fair random dice roll
\end{verbatim}
\section{Compiling}
现在你大概想了解如何编译这个美妙的文档
然后得到饱受称赞的 \LaTeX \hspace{1pt} pdf文档
(这个文档确实被编译了)。 \\
得到最终文档,使用 \LaTeX \hspace{1pt} 组合步骤:
\begin{enumerate}
\item Write the document in plain text (the ``source code'').
\item Compile source code to produce a pdf.
The compilation step looks like this (in Linux): \\
\begin{verbatim}
> pdflatex learn-latex.tex
\end{verbatim}
\end{enumerate}
许多 \LaTeX \hspace{1pt}编译器把步骤1和2在同一个软件中进行了整合
所以你可以只看步骤1完全不看步骤2
步骤2同样在以下情境中使用情景 \footnote{以防万一,当你使用引用时
(如 Eqn.~\ref{eq:pythagoras}),你将需要多次运行步骤2
来生成一个媒介文件 *.aux 。}.
在步骤1中,用普通文本写入格式化信息
步骤2的编译阶段则注意在步骤1 中定义的格式信息。
\section{Hyperlinks}
同样可以在文档中加入超链接
使用如下命令在序言中引入库:
\begin{verbatim}
\usepackage{hyperref}
\end{verbatim}
有两种主要的超链接方式 \\
\url{https://learnxinyminutes.com/docs/latex/}, 或
\href{https://learnxinyminutes.com/docs/latex/}{shadowed by text}
这个库同样在输出PDF文档时制造略缩的列表,或在目录中激活链接
\section{End}
这就是全部内容了!
\begin{thebibliography}{1}
\bibitem{latexwiki} The amazing \LaTeX \hspace{1pt} wikibook: {\em
https://en.wikibooks.org/wiki/LaTeX}
\bibitem{latextutorial} An actual tutorial: {\em http://www.latex-tutorial.com}
\end{thebibliography}
\end{document}