latex
作者:互联网
Tips
In order to get a paragraph break in LaTeX, leave a blank line.
You can write one sentence per line.
comment is % and is escape.
Format
page margin
1
2
3usepackage{geometry}
geometry {papersize = {20cm,15cm}}
geometry {left = 1cm ,right =2cm ,top =3cm, bottom =4cm}- page header and footer
1
2
3
4
5
6
7
8
9
10
11usepackage{fancyhdr}
pagestyle{fancy}
lhead{author}
chead {date}
rehad {...}
lfoot{}
cfoot{}
rfoot{}
renewcommand{headrulewidth}{0.4pt}
renewcommand{headrulewidth}{textwidth}
renewcommand{headrulewidth}{0pt}- line space
1
2usepackage {setspace}
onehalfspacing- paragraph space
1
addtolength{parskip}{.4em}
- Emphsis
1
emph {text}
- Bold
1
textbf{text}
Fancy Text
Numbered lists can be made with the following code:
1
2
3
4
5begin{enumerate}
item One thingdots
item dots leads to another.
end{enumerate}
% If you want to have an un-numbered list with bullets, replace both instances of enumerate with itemize.Graphics
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29includegraphics{samplereport-graphic}
% You should save the image file in the same folder as your LaTeX code.
% However, I much prefer that graphics be encapsulated in a figure. Thus I would rather you use code like the following:
begin{figure}[h]
centering
includegraphics[width=3in]{SampleReport-Graphic.pdf}
caption{The caption of a figure should be a complete sentence.}
label{SampleFigure}
end{figure}
%Figure across two columns
大专栏 latexbegin{figure*}
end{figure*}
%Two figures layout side by side
usepackage{subfig}
usepackage{subcaption}
usepackage{stfloats}
begin{figure}[h]
centering
subfloat[caption1] {{ includergraphics[width=3.5cm]{Figure1.png} }}
qquad
subfloat[caption1] {{ includergraphics[width=3.5cm]{Figure2.png} }}
caption{ General caption}
label{}
end{figure}Catalogue
1
2tableofcontents
% After the maketitle
Use Chinese
1
2
3
4
5
6
7
8
9
10% set the char-set to utf-8
% use ctex package,there are two method you can use
% Method 1 note the ctex auto indent.
usepackage{ctex}
% Method 2
document[UTF8]{ctexart}
begin {document}
你好!世界
end {document}Reference
Method 1 : refer directly
1
2
3
4
5
6
7
8
9
10begin{thebibliography}{1}
bibitem{liu} 刘海洋. LaTeX 入门 [M]. 北京: 电子工业出版社, 2013.
bibitem{hu} 胡伟. LaTeX 2e完全学习手册(第二版). 北京: 清华大学出版社, 2013.
bibitem{label}
end{thebibliography}
{1}:是用来占位的,表示每条文献的编号宽度
label:是文献引用时候的label引用的命令是 cite{label},在中文文档中, 参考文献引用时需要写到文字 的右上角, 需要对命令 cite{...} 重新定义(下面这句话放置在导言区, 即begin{document}之 前):
newcommand{upcite}[1]{textsuperscript{textsuperscript{cite{#1}}}}
重新定义的命令是 upcite{label}Method 2 : batch refer with using bibtex
create bib file and input all the reference.
save the bib to the same folder with tex.
refer by cite{label}.
1
2bibliographystyle{plain}
bibliyography{bibfileName}
> 文章中没有引用的参考文献,即使在建立bib数据库的时候使用了,在最后的Reference里面也不会出现,这也是为什么建议在阅读文献的时候就顺手建立bib数据库.
Article Kind
article/ctexart
1
2
3
4
5
6% define 5 series to algin the article
section {}
subsection {}
subsubsection {}
paragraph {}
subparagraph {}book/ctexbook
1
part{}
report/ctexrep
1
chapter {}
标签:latex,end,figure,LaTeX,bib,label,cite 来源: https://www.cnblogs.com/lijianming180/p/12360896.html