LaTeX学习笔记
2017-02-10 21:31
881 查看
使用网页版的LaTeX(可能要FQ).
https://www.overleaf.com/8126478vdhwbxxyjkch#/28695502/
1.第一个文档
打开WinEdt,建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8。
\documentclass{article}
\begin{document}
hello,
world
\end{document}
然后在WinEdt的工具栏中找到编译按钮(在垃圾桶和字母B中间),在下拉菜单中选择XeTeX,并点击编译。如果顺利的话,我们就可以顺利生成出第一个pdf文件,点击工具栏中的放大镜按钮就可以快速打开生成的pdf文件。
2.标题、作者和注释
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\author{My
Name}
\title{The
Title}
\begin{document}
\maketitle
hello,
world % This is comment
\end{document}
3.章节和段落
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\author{Dou zi}
\title{Welcome to LaTex World !}
\begin{document}
\maketitle
\section{Hello China} China is in East
Asia. %%大标题{} + 段落
\subsection{Hello Beijing} Beijing is
center of China %%子标题 + 段落
\subsubsection{Hello DongCheng
District}
\paragraph{Tian'anmen Square}is in
the center of Beijing
\subparagraph{Chairman Mao} is
in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University}
is the best university in Guangzhou.
\end{document}
4.加入目录
建立一个新文档,将以下内容复制进入文档中,保存
\documentclass{article}
\begin{document}
\tableofcontents
\section{Hello China} China is in East
Asia.
\subsection{Hello Beijing} Beijing is
the capital of China.
\subsubsection{Hello Dongcheng
District}
\paragraph{Hello Tian'sanmen
Square}is in the center of Beijing
\subparagraph{Hello
Chairman Mao} is in the center of Tian'sanmen Square
\end{document}
5.换行
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\begin{document}
Beijing is
the
capital
of China.
New York
is
the
capital
of
America.
Amsterdam
is \\ the capital \\ %% “\\”:是顶格换行,空一行:是对齐换行
of
Netherlands.
\end{document}
6.数学公式
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
The Netton's second law is F=ma.
The Newton's second law is $F=ma$.
The Newton's second law is
$$F = ma$$
The Newton's second law is
\[F=ma\]
Greek Letters $\eta$ and $\mu$
Fraction $\frac{a}{b}$
Power $a^b$
Subscipt $a_b$
Derivate $\frac{\partial y}{\partial t} $
Vector $\vec{n}$
Blod $\mathbf{n}$
To time differential $\dot{F}$
\end{document}
\begin{document}
\begin{tabular}{|c|c|}
a & b \\
c & d\\
\end{tabular}
\begin{tabular}{|c|c|}
\hline
a
& b \\
\hline
c & d\\
\hline
\end{tabular}
\begin{center}
\begin{tabular}{|c|c|}
\hline
a & b \\ \hline
c & d\\
\hline
\end{tabular}
\end{center}
\end{document}
https://www.overleaf.com/8126478vdhwbxxyjkch#/28695502/
\documentclass[a4paper]{article} %% Language and font encodings \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} %% Sets page size and margins \usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry} %% Useful packages \usepackage{amsmath} \usepackage{graphicx} \usepackage[colorinlistoftodos]{todonotes} \usepackage[colorlinks=true, allcolors=blue]{hyperref} \title{ACM} \author{Douzi} \begin{document} \maketitle \begin{abstract} Your abstract. \end{abstract} \section{Introduction} Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started. If you have a question, please use the help menu (``?'') on the top bar to search for help or ask us a question. \section{Some examples to get started} \subsection{How to add Comments} Comments can be added to your project by clicking on the comment icon in the toolbar above. % * <john.hammersley@gmail.com> 2014-09-03T09:54:16.211Z: % % Here's an example comment! % % ^ <1281561801@qq.com> 2017-02-11T06:22:46.997Z. To reply to a comment, simply click the reply button in the lower right corner of the comment, and you can close them when you're done. \subsection{How to include Figures} First you have to upload the image file from your computer using the upload link the project menu. Then use the includegraphics command to include it in your document. Use the figure environment and the caption command to add a number and a caption to your figure. See the code for Figure \ref{fig:frog} in this section for an example. \begin{figure} \centering \includegraphics[width=0.3\textwidth]{frog.jpg} \caption{\label{fig:frog}This frog was uploaded via the project menu.} \end{figure} \subsection{How to add Tables} Use the table and tabular commands for basic tables --- see Table~\ref{tab:widgets}, for example. \begin{table} \centering \begin{tabular}{l|r} Item & Quantity \\\hline Widgets & 42 \\ Gadgets & 13 \end{tabular} \caption{\label{tab:widgets}An example table.} \end{table} \subsection{How to write Mathematics} \LaTeX{} is great at typesetting mathematics. Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let \[S_n = \frac{X_1 + X_2 + \cdots + X_n}{n} = \frac{1}{n}\sum_{i}^{n} X_i\] denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$. \subsection{How to create Sections and Subsections} Use section and subsections to organize your document. Simply use the section and subsection buttons in the toolbar to create them, and we'll handle all the formatting and numbering automatically. \subsection{How to add Lists} You can make lists with automatic numbering \dots \begin{enumerate} \item Like this, \item and like this. \end{enumerate} \dots or bullet points \dots \begin{itemize} \item Like this, \item and like this. \end{itemize} \subsection{How to add Citations and a References List} You can upload a \verb|.bib| file containing your BibTeX entries, created with JabRef; or import your \href{https://www.overleaf.com/blog/184}{Mendeley}, CiteULike or Zotero library as a \verb|.bib| file. You can then cite entries from it, like this: \cite{greenwade93}. Just remember to specify a bibliography style, as well as the filename of the \verb|.bib|. You can find a \href{https://www.overleaf.com/help/97-how-to-include-a-bibliography-using-bibtex}{video tutorial here} to learn more about BibTeX. We hope you find Overleaf useful, and please let us know if you have any feedback using the help menu above --- or use the contact form at \url{https://www.overleaf.com/contact}! \bibliographystyle{alpha} \bibliography{sample} \end{document}
1.第一个文档
打开WinEdt,建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8。
\documentclass{article}
\begin{document}
hello,
world
\end{document}
然后在WinEdt的工具栏中找到编译按钮(在垃圾桶和字母B中间),在下拉菜单中选择XeTeX,并点击编译。如果顺利的话,我们就可以顺利生成出第一个pdf文件,点击工具栏中的放大镜按钮就可以快速打开生成的pdf文件。
2.标题、作者和注释
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\author{My
Name}
\title{The
Title}
\begin{document}
\maketitle
hello,
world % This is comment
\end{document}
3.章节和段落
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\author{Dou zi}
\title{Welcome to LaTex World !}
\begin{document}
\maketitle
\section{Hello China} China is in East
Asia. %%大标题{} + 段落
\subsection{Hello Beijing} Beijing is
center of China %%子标题 + 段落
\subsubsection{Hello DongCheng
District}
\paragraph{Tian'anmen Square}is in
the center of Beijing
\subparagraph{Chairman Mao} is
in the center of Tian'anmen Square
\subsection{Hello Guangzhou}
\paragraph{Sun Yat-sen University}
is the best university in Guangzhou.
\end{document}
4.加入目录
建立一个新文档,将以下内容复制进入文档中,保存
\documentclass{article}
\begin{document}
\tableofcontents
\section{Hello China} China is in East
Asia.
\subsection{Hello Beijing} Beijing is
the capital of China.
\subsubsection{Hello Dongcheng
District}
\paragraph{Hello Tian'sanmen
Square}is in the center of Beijing
\subparagraph{Hello
Chairman Mao} is in the center of Tian'sanmen Square
\end{document}
5.换行
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\begin{document}
Beijing is
the
capital
of China.
New York
is
the
capital
of
America.
Amsterdam
is \\ the capital \\ %% “\\”:是顶格换行,空一行:是对齐换行
of
Netherlands.
\end{document}
6.数学公式
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
The Netton's second law is F=ma.
The Newton's second law is $F=ma$.
The Newton's second law is
$$F = ma$$
The Newton's second law is
\[F=ma\]
Greek Letters $\eta$ and $\mu$
Fraction $\frac{a}{b}$
Power $a^b$
Subscipt $a_b$
Derivate $\frac{\partial y}{\partial t} $
Vector $\vec{n}$
Blod $\mathbf{n}$
To time differential $\dot{F}$
\end{document}
8.简单表格
\documentclass{article}\begin{document}
\begin{tabular}{|c|c|}
a & b \\
c & d\\
\end{tabular}
\begin{tabular}{|c|c|}
\hline
a
& b \\
\hline
c & d\\
\hline
\end{tabular}
\begin{center}
\begin{tabular}{|c|c|}
\hline
a & b \\ \hline
c & d\\
\hline
\end{tabular}
\end{center}
\end{document}
相关文章推荐
- 树-堆结构练习——合并果子之哈夫曼树
- PHP下生成随机码
- Java i++原理及i=i++的问题说明
- 1061. 判断题(15)
- TODO:Windows 10 下SVN简单配置
- Hibernate缓存机制学习笔记
- 【mysql】表备份
- 80. Remove Duplicates from Sorted Array II
- UVA 1349 Optimal Bus Route Design(最小权完美匹配)
- 1060. 爱丁顿数(25)
- 关于SoftHashMap实现相关内容
- 对称加密与非对称加密
- CSU-1640
- 面试题3
- ROC曲线及其matlab实现ROC曲线的绘画
- android入门之服务
- 树莓派+Python+pyserial 2.7实现串口通信
- JZOJ-senior-3502. 【NOIP2013模拟11.4B组】方格游戏
- 1059. C语言竞赛(20)
- Opencv 3.1安装遇到的问题记录