; v* W, |( W3 E1 s\documentclass{article} - p; q% I% L! V3 q s- x
\author{My Name} ! `2 R# x' [6 f2 g- G+ W \title{The Title} % I' @* Z0 U. f" W6 g
\begin{document} # }0 l) G/ V" j. c1 O6 P
\maketitle # V: [- D. x- V/ ` hello, world % This is comment `" h0 G& R' L: c( {
\end{document} 1 U# `& h$ O) ~/ {%意为本行右边所有内容被注释掉,在生成的pdf中不会显示。1 L$ \3 }# k) M5 S/ T4 `
8 |" k% ^' {* O0 v" |
4.章节和段落 4 V5 o6 S- l4 h u: U建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 ) e# z: F* U9 e1 D7 B- R& M1 J' S, w 0 x* v" |9 ?: V" J\documentclass{article} - z0 |' n" a7 f
\title{Hello World} $ ?9 W: c/ Y# s5 m& |\begin{document} ' W& c% C/ t& J \maketitle ( _& [. ?% S0 u4 _
\section{Hello China} China is in East Asia. 5 l' R) p0 x: |' h' C r
\subsection{Hello Beijing} Beijing is the capital of China. 6 i U. C9 P* g+ v \subsubsection{Hello Dongcheng District} 8 s$ d6 H, o3 s" R$ L$ k& [
\paragraph{Tian'anmen Square}is in the center of Beijing - z. e" v; G; G& } \subparagraph{Chairman Mao} is in the center of Tian'anmen Square / Y! {6 L& i; j" I# v7 O) H$ m
\subsection{Hello Guangzhou} 6 c }4 [( T5 L3 s2 ? \paragraph{Sun Yat-sen University} is the best university in Guangzhou. 9 y' ^& E) \' x- M4 |9 i$ [6 i
\end{document} 8 H8 ^2 D5 \7 \
# g! ^4 }/ ~5 i, x7 s# U
退格只是为了看起来层次清晰美观。实际操作上未必要如此,每一行之前的空格不影响编译生成PDF的排版结果。 1 f; M1 U6 p. z; ~$ _) i
* e0 d2 m/ b! u q/ \5.加入目录 5 y; w- G& z6 s6 d建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 ; ]. s) m. N1 s + b$ V4 P, W. h+ U& a\documentclass{article} 5 Q: p/ Z$ }9 O; j6 _6 N\begin{document} 4 s; B6 M9 f$ u( u: D9 A0 Q8 v
\tableofcontents 7 f' V- N$ P# G
\section{Hello China} China is in East Asia. ( X# y% A9 x' Z5 F% x2 R
\subsection{Hello Beijing} Beijing is the capital of China. " K! ^+ R" j) @1 k1 z9 [ \subsubsection{Hello Dongcheng District} % {. \* k, m" R
\paragraph{Hello Tian'anmen Square}is in the center of Beijing + ~( a5 S0 I- ?# o) }: q- X
\subparagraph{Hello Chairman Mao} is in the center of Tian'anmen Square 7 R7 `7 v; b9 s. I0 O+ `9 L
\end{document} . y: h$ Z- s( b' U+ I
+ g" m' f1 `) ]: V6 f7 W- D6.换行 ! \ p+ {. s- e) k$ r4 F; ]
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 - j$ N( |8 t9 t! b% |6 {* W% x* l U+ B" D& b: E. g3 H3 b. `( X
\documentclass{article} 6 m2 I. P6 d5 g! l8 e, G: n+ v0 l% ^\begin{document} & p% k$ U b0 R" C7 c% \: n+ G Beijing is ) |2 e+ Z, H! m9 K. u. S; G( X& M* K the capital ( ^% V- U+ p( j% i* J
of China. " n3 V: Q& @3 f/ p, _& `9 t 8 l9 i! b0 Z ?6 x% y* n7 K Washington is " t4 w/ n. L0 _, a; ]2 ]7 g4 V: @
' k w+ o! A- Y; W6 D* Y+ M) T- k9 Y the capital # B M! X% ?5 P( q! F
) W& x- f1 T$ D5 e% u of America. . ~. p, H3 {: P! T
; |" ?6 b* a- X8 ^8 ] Amsterdam is \\ the capital \\ , j5 q% P3 o( ?; i$ [; ], V of Netherlands. o) M1 R H- s' c\end{document}& S0 o6 G3 E( A: m
! d$ b/ r+ e$ v* y9 z p空一行为另起一段,\\为段内强制换行。 ( ^ b2 R0 j0 _3 S# ?# J我对之前手滑写出New York is the capital of America这类低级错误表示非常抱歉。 ' Y$ p* d7 S3 @ [% @9 P6 U: r: f% o9 w7.数学公式 - j T7 v+ c7 d- U/ S. M7 f1 D建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 & S1 g- L" }( l7 W5 r 6 s8 I0 n z" j\documentclass{article} " R( y$ j2 }# V. L( G \usepackage{amsmath} ( l& J6 e' {8 B' n6 w0 x! y ` \usepackage{amssymb} 6 R6 R2 }7 G/ g
\begin{document} & ~0 A6 r) m; k ~6 N
The Newton's second law is F=ma. ' D) ~5 R4 r. A$ J
! z) X. X5 b; t' d K3 i8 e The Newton's second law is $F=ma$. : ]5 J8 h/ T$ {2 W( J( X* X6 }0 {2 H. U. E8 j1 Q
The Newton's second law is 1 ~% H& I1 |8 B) r
$$F=ma$$ 3 T& R4 U* ?: r2 K
& m0 F" m5 T5 M0 Q* _7 G
The Newton's second law is : v+ n6 B6 q6 R3 L! G& L! m9 ~8 }& j5 Z \[F=ma\] 5 ^( P: v3 U8 J4 f
, A4 y3 j+ L V2 \# _" P Greek Letters $\eta$ and $\mu$ 1 @# A4 o7 s9 V' p0 T; r' ^0 p
- f1 S0 M3 P( R- e5 ^1 \0 @: i Fraction $\frac{a}{b}$ 5 g! z8 Z4 N r! h; ~. K / Y: n; ]; W) t$ i/ W+ J# M Power $a^b$ ; t0 @( e1 W$ D2 q) M }7 H8 n) b! \5 G
Subscript $a_b$ & S& y" F8 f: _, _% q$ c' {- |
r* _7 @9 c1 J' l! G& l Derivate $\frac{\partial y}{\partial t} $ ' W6 J: ^ K$ H# z( o/ I
9 |1 r2 h! T; z$ p+ V
Vector $\vec{n}$ 7 s9 }$ t% a [5 u 1 g# p- @9 i# M2 o; T Bold $\mathbf{n}$ . @4 B; C5 p7 R+ o
1 w; o6 |* e2 I4 `
To time differential $\dot{F}$ 1 J7 {! q6 k) j4 T+ ]1 r; T
$ [! H! Y1 S# B1 |: D0 f Matrix (lcr here means left, center or right for each column) & @4 y3 ~0 q; e/ n3 M) S& i9 e
\[ 5 l$ G8 T* f0 S' D, D. B9 R
\left[ 6 {' z' p% K* E3 r6 v( D9 |6 Y \begin{array}{lcr} 6 Q+ ~0 o) i$ ]( m, }/ Q- a' ]$ ] a1 & b22 & c333 \\ * c% v5 q; K& |+ W d444 & e555555 & f6 0 _4 w, S( l1 y: E5 x
\end{array} % I# t6 s+ i: _: p$ k
\right] 2 b" P: X7 w; p4 j' ~# K
\] 8 i, s, O7 C) l- }. K P
$ M8 G- S$ e- Y# y5 {* B3 D, WEquations(here \& is the symbol for aligning different rows) $ _1 j: Y3 Y8 i7 l* a
\begin{align} ' t: }: q4 k6 G
a+b&=c\\ 2 Q* V- k1 E" c" ? d&=e+f+g 8 C! n- w' u! C I3 p' D
\end{align} , t* ]+ ]# ~& K6 h