- z8 ?3 t1 S0 B9 B* m) ~# \\documentclass{article} % F% [% H5 ]7 [/ G4 N1 t\begin{document} 0 T- P! K- u, g hello, world & P5 w: r1 A4 F: V0 c
\end{document} $ y$ z P! J& l( Z) E3 Q m$ K1 z% I9 ?5 A" H& K然后在WinEdt的工具栏中找到编译按钮(在垃圾桶和字母B中间),在下拉菜单中选择XeLaTeX,并点击编译。 如果顺利的话,我们就可以顺利生成出第一个pdf文件,点击工具栏中的放大镜按钮就可以快速打开生成的pdf文件。 + ]. S; ~2 w6 B. s) k; r
/ Y- X9 t8 c( ]) s$ z, t3.标题、作者和注释 ' L" x) G: b6 I) K
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 ( y! L2 X$ ]; o7 z E
0 N+ u _; B5 w7 [\documentclass{article} 5 P7 L& N6 [1 i6 s7 e$ i$ _ \author{My Name} ( }8 k7 ~/ v/ F9 b, b' t \title{The Title} ! E$ }% L* [4 N2 J\begin{document} 8 v& q% Y7 z- j& G' ?: ] \maketitle 6 T& C* ~0 v J, m: l! n( _
hello, world % This is comment . s4 I0 `! K9 N
\end{document}' t6 u! s, m# [. z
%意为本行右边所有内容被注释掉,在生成的pdf中不会显示。 8 k2 y( n4 [3 ^1 G 3 l# `% f2 G2 q+ }4.章节和段落 0 _, p# x W' K P建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 # h) o" ?; X" w8 o& z) G" G
' a* M- P. V' j- N+ Q8 T$ R. `\documentclass{article} 4 ^0 _- o) O8 |& V: j2 j6 |1 r' M8 W \title{Hello World} 3 p$ y/ p! ?1 \6 m0 y\begin{document} 1 J) Z7 L4 W7 U2 G: ^& Y
\maketitle 3 \8 r) a: K2 t7 D \section{Hello China} China is in East Asia. / S! U* b/ M) } s6 S \subsection{Hello Beijing} Beijing is the capital of China. : f2 M+ v' \" f2 L0 @3 t1 M, s% o
\subsubsection{Hello Dongcheng District} 4 E6 g# m, f$ L) k0 B. M3 n' f$ v \paragraph{Tian'anmen Square}is in the center of Beijing ( [: y2 W5 v3 F: K5 u& Z1 t \subparagraph{Chairman Mao} is in the center of Tian'anmen Square + Y2 d( e- O2 B5 _ \subsection{Hello Guangzhou} / I! S' x, Y+ c0 K" \/ Z
\paragraph{Sun Yat-sen University} is the best university in Guangzhou. ' R$ U! q R+ D' w% I\end{document} 0 m9 o9 @) Z( i" X5 z( Q
% ?6 h3 N# Y g y& g m, g6 n- h退格只是为了看起来层次清晰美观。实际操作上未必要如此,每一行之前的空格不影响编译生成PDF的排版结果。 8 m& c8 n) o* x; `9 g$ j* \ A# R& C- V( w/ n, n% x
5.加入目录 7 W) ?$ {& W3 \7 E1 d! \1 ]建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 : q1 Q2 r5 n8 }0 o1 E1 N* N! u7 F8 W, p b' q1 P( g/ ?# N
\documentclass{article} . \0 f/ [ c z$ V; k7 _$ r) O
\begin{document} $ X- y) g' N7 `9 p
\tableofcontents ( ]) ?/ m- Y( D5 S0 G, m4 k8 A1 L \section{Hello China} China is in East Asia. $ X% q8 O [" a( D6 X' n, [ \subsection{Hello Beijing} Beijing is the capital of China. ; J; |# T2 s( @5 ] \subsubsection{Hello Dongcheng District} # H6 `8 P+ F% Y ?: j% _" K
\paragraph{Hello Tian'anmen Square}is in the center of Beijing . b- {* o0 S" K. Q u" i \subparagraph{Hello Chairman Mao} is in the center of Tian'anmen Square 0 |; }; z! E) N$ s9 e- H) M
\end{document} 8 m( Y c: A# ^" F# i T4 J: w
0 L1 c- x7 I* M/ }
6.换行 : r1 S) q5 T+ P& [: k. S- |
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 3 z* D& }! |( W7 {7 M5 g5 w/ B0 o$ A8 w8 ]2 p" u) Q K. F$ Z( F# q
\documentclass{article} ; z3 p+ K4 O# p5 K! e: p\begin{document} # V6 d ]0 B* m J2 g
Beijing is 6 [& K0 t3 t; k1 ~
the capital 0 a: s7 W+ y: B/ w. R of China. ) w: k" G" n- D' r) D" A" W/ f 0 X/ q+ \$ f. W6 _ Washington is f+ w2 g: }& t7 g " d5 b+ h' a1 A+ u the capital 9 u1 v. e% n, G" B+ | b9 e, ]5 k$ x& H
of America. - \, i% ~! p( \$ E! M
& T S, d0 e) G- @ Amsterdam is \\ the capital \\ 1 j, D- h2 c( a3 }/ |8 c+ X1 k
of Netherlands. 2 K* r6 ~, X; u: d% A
\end{document}" ]0 | g) c+ m" l2 \2 \% i
' Z" E6 R* z9 [0 q( Z% E
空一行为另起一段,\\为段内强制换行。 9 s# M. R- d1 b r$ |# L我对之前手滑写出New York is the capital of America这类低级错误表示非常抱歉。 0 {1 c. W3 | G& ?: l- z8 d% S . U, Y/ K$ S2 J2 q7.数学公式 1 |7 g3 M7 r+ F S$ t4 K/ j
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 " x8 C7 z2 }* d0 ]8 w
" t: Y8 _3 n, p+ s) C# _. {5 N& d: |" `
\documentclass{article} v$ Q. W* O( N2 b( Y2 o \usepackage{amsmath} 0 P5 U) C4 J$ {, Q; t5 E \usepackage{amssymb} 6 p) U* j/ ^7 p7 W" u! T\begin{document} 0 u% \+ Q+ f+ a& [+ r; e
The Newton's second law is F=ma. / @( D4 L- v: w% [4 T9 q6 ?: t7 f
( b7 w& K q1 `% [& q
The Newton's second law is $F=ma$. + L) v3 n7 G+ S+ }; M' a3 Y+ Q; F; y; ]- L" K" F
The Newton's second law is " h6 H" a9 G7 Z( Z7 s6 I. j
$$F=ma$$ ) z! q+ O( d) _+ x# }7 v
' P& z7 \" O+ X. V6 a2 W4 S The Newton's second law is # X5 X1 R" u2 M) ^9 Z9 F5 Q
\[F=ma\] . }1 ~3 U9 @# G/ L1 I: j% t# |
4 y9 I, y& x0 T
Greek Letters $\eta$ and $\mu$ 4 D# u* O, P7 _! }! _* ~9 n ' e$ P; w" O( l. T! {; ] Fraction $\frac{a}{b}$ 7 c _- w0 O5 z, N A$ c6 X6 U" [: j7 G9 f: N6 v0 |! O( `
Power $a^b$ 4 z4 a2 o% d$ H" ?( @