阅读目的:快速学会最简单的latex语法
说明:使用软件,latex+sublime text+skim,参考教程
latex是一种语言,命令和注释在生成pdf文件中不可见。
-
命令表示:/command
-
注释表示:%注释内容
主要有两个文件,tex和bib。
- tex文件:主要编辑文件,用于生成pdf
- bib文件:放参考文献
tex文件样例
\documentclass{article}
\usepackage{cite}
% 可显示中文
\usepackage{fontspec, xunicode, xltxtra}
\setmainfont{Hiragino Sans GB}
% -------
% 用于标记引用文献
\usepackage[numbers,sort&compress]{natbib} %合并标记序号
\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}} %用于标记右上角
% -------
% 正文
\begin{document}
\title{Title}
\author{zjw}
\maketitle{}
\begin{abstract} % 修改此处
TBD
\end{abstract}
\section{Introduction} % 修改此处
TBD
\subsection{intro}
2级标题部分的内容1{}
\subsection{intro{}2}
2级标题部分的内容2
\section{Approaches} % 修改此处
TBD
\section{Conclusion} % 修改此处
TBD
% 添加公式
\begin{equation}
c=\sum_a^b{a+b}
\end{equation}
%正文添加引用文献方式1
在 \cite{name1},作者提到
%正文添加引用文献方式2
小米\upcite{name1,name2}
% 文末添加引用文献来源bib文件
\bibliographystyle{plain}
\bibliography{test.bib}
\end{document}
bib样例文件
直接去谷歌学术—>引号—>右击在新标签页打开,复制粘贴到bib中
Book表示该文献的类型,name1代表该文献,tex中使用name1引用该文献
@book{name1,
title={Language two.},
author={Dulay, Heidi and others},
year={1982},
publisher={ERIC}
}
@book{name2,
title={Language two.},
author={Dulay, Heidi and others},
year={1982},
publisher={ERIC}
}
生成结果