1 S0 R# n4 u7 C+ X+ }\documentclass{article} + b) R' O: x2 V/ @. E" F. w: M
\author{My Name} / Y7 i- t- b* Q* T, T
\title{The Title} . k% s. Q& Y9 r8 v\begin{document} 9 W: c( A- ] L4 f8 F+ @ \maketitle ) e2 j! K+ U- M6 _
hello, world % This is comment % H! {( l9 @5 u& E+ w9 P
\end{document} 1 ]- b+ O. c; Z# O! ^%意为本行右边所有内容被注释掉,在生成的pdf中不会显示。2 ~% }& O& F0 r9 h! s% e: r
9 {& b7 }$ |! k8 ]+ F# f6 S$ M4.章节和段落 ( z" f. c$ Z l4 i$ M
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 1 Q7 y! L$ d" _ # E# I4 _( U9 O' L" s\documentclass{article} " u7 p3 Q4 M0 C5 ? \title{Hello World} " N. F# i. e* v% l9 b
\begin{document} / D; B+ q, a+ M8 ? p \maketitle & d) e( k6 @9 b! R
\section{Hello China} China is in East Asia. % v$ [' W/ j6 i \subsection{Hello Beijing} Beijing is the capital of China. ; s% ?' I1 S0 H8 B |2 u
\subsubsection{Hello Dongcheng District} ' A) b( K* A! @# O \paragraph{Tian'anmen Square}is in the center of Beijing - B& U5 T$ ^5 M' g& x2 Y' n
\subparagraph{Chairman Mao} is in the center of Tian'anmen Square 7 ]3 N8 \6 D9 t. t, p2 ^0 S0 w
\subsection{Hello Guangzhou} ; [9 ?& [( }, @) ^. ^6 j& K \paragraph{Sun Yat-sen University} is the best university in Guangzhou. 1 {" O8 ^. u. m# x6 k\end{document} 5 z/ f1 }' V( l7 ~+ `- S6 U
" B. X/ I H. X1 _9 M2 X( r退格只是为了看起来层次清晰美观。实际操作上未必要如此,每一行之前的空格不影响编译生成PDF的排版结果。 2 m; J3 a) Z6 \
! P& d4 ^; F: o0 x0 C# m- k. |4 w; W5.加入目录 $ x6 s; R8 K2 y, Z
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察现象。 1 `; ?% M: B3 I
9 O, @& U3 p- \% r; D\documentclass{article} " B4 \. @8 f8 s2 y. n I
\begin{document} 2 a6 D0 O& @/ F; v; `2 N1 t
\tableofcontents 4 j, b6 Z7 [# g \section{Hello China} China is in East Asia. : Z1 k; ^/ b; S) L! M( @ \subsection{Hello Beijing} Beijing is the capital of China. ; `8 w W' {( I5 x1 G \subsubsection{Hello Dongcheng District} , k) L) I7 u+ V/ R( _; F$ L
\paragraph{Hello Tian'anmen Square}is in the center of Beijing 2 G4 G$ Q8 Q, t, L& K( q
\subparagraph{Hello Chairman Mao} is in the center of Tian'anmen Square 7 ]! s8 S6 ~1 p9 w\end{document} 5 v {! B. J% Q/ ^
4 z7 P$ r" k1 y _1 {& o9 V
6.换行 ( g( S' @9 [6 q- J5 d) Q7 _% v
建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 : L, ]" g$ `/ E7 C: S
! j' P" M8 h z3 g6 f1 V$ @\documentclass{article} 4 x; c( |9 i- w0 `* K5 I
\begin{document} & i* U6 `& j3 ~9 {* e Beijing is & r' r$ f- y+ g- B, X$ @! {
the capital 2 G, ^! w; I' c1 V
of China. % M4 h/ ^* ]: I% J. b
. E( C: {* ^& `' k0 ^ Q
Washington is % n4 ~' m, W8 ^! o, U 6 ?8 Z/ }4 ?- |% r/ t; h the capital # p) O R9 Z0 b+ h5 i0 R
1 l1 j6 e X3 w, h5 C+ i, d$ F of America. / u& K# p9 m V3 L" {. l/ E$ R
0 g, x; S. ~' |! ~3 W
Amsterdam is \\ the capital \\ ; \4 R2 F" @0 K: G% S! Z7 Z
of Netherlands. 3 `6 \7 `! }& Z
\end{document}; ]8 N& l! Z2 i. \5 H1 F
& _. C1 h! D _0 W. ~4 A$ | y
空一行为另起一段,\\为段内强制换行。 8 B. o6 @2 X. l/ Q, L0 \我对之前手滑写出New York is the capital of America这类低级错误表示非常抱歉。 $ z; u# N7 L j0 t: H9 n) U! m. {: G+ j' t! J" e
7.数学公式 0 S& U) C) }' I# ?; |建立一个新文档,将以下内容复制进入文档中,保存,保存类型选择为UTF-8,编译并观察对比现象。 ! ]; E: l' ~0 R% f% g& [1 z
/ |% {: @: v, b$ v7 H ^: U$ w2 e! V
\documentclass{article} . X7 U1 s1 G6 L, h% C
\usepackage{amsmath} " y6 N& e7 D4 y( W- \. N2 W
\usepackage{amssymb} , S- q/ `- A* U) H& _/ s
\begin{document} - x- Q3 j+ [* O: i# Z2 f The Newton's second law is F=ma. |# n, m4 f, i7 r* l
P% v5 }1 m+ F
The Newton's second law is $F=ma$. ; N" I! {! w$ |% g8 p; ^3 R4 a! x$ s3 F/ ?( D3 S: D6 r9 l& @% |+ D# T
The Newton's second law is / u4 ]1 N( S! m8 {2 |. K $$F=ma$$ $ l8 u5 w+ b4 M- s& z 6 K# `2 Q& Y' T; f: P The Newton's second law is ! }3 g/ c& N+ l% I7 d) m
\[F=ma\] 1 Q, M9 V7 B8 l4 B" E8 h+ a3 V% N: O8 Y) |
Greek Letters $\eta$ and $\mu$ 1 u1 L& D+ u* U# n1 d# C
, @/ X* D1 y3 u' P3 ^
Fraction $\frac{a}{b}$ 4 J( j6 z& }: W! {* @
5 B# @- G5 `4 n( `3 }: I Power $a^b$ 7 T @4 u/ H3 u7 L
1 [2 w, w9 T( `* \6 w" y4 \' E
Subscript $a_b$ 3 O/ F& E& m: t0 I+ a% h
7 }( G I6 k- N
Derivate $\frac{\partial y}{\partial t} $ & _2 M. @& m. _' C% ]
* G! P" u J0 W( R; ]/ s% P Vector $\vec{n}$ A2 T6 W6 x( L6 |2 E
1 d8 P* F* ?. c; i Bold $\mathbf{n}$ # m# v3 B' v' `! C
" r) R8 S% v3 s' z5 a. P
To time differential $\dot{F}$ 3 k- y4 Q1 k- a $ v& ?7 e2 ^6 o; j Matrix (lcr here means left, center or right for each column) 7 l" t& ]: ?+ }# s8 |7 G9 Z% c
\[ 0 }+ O& i- Y [
\left[ . u! H/ v1 ]: h6 ~1 v7 S" p \begin{array}{lcr} & ~ ]! }) O6 [; J0 C/ N' M& S a1 & b22 & c333 \\ ' s) \, n- M3 a6 b' w* V5 m
d444 & e555555 & f6 7 |, o6 w% A8 p, M# M
\end{array} " I3 L6 g* H6 R: W \right] . s0 D: S1 X3 q( e( o \] # D& l. h0 ?# I. O! a V) W
1 {; Z$ D: c) |) l1 \, j7 [Equations(here \& is the symbol for aligning different rows) 1 s& X/ B: f5 ? M& i1 O |" \
\begin{align} ! z0 r3 G% O6 m1 A5 b
a+b&=c\\ . Z/ z$ p. P) _' G/ ~1 I d&=e+f+g % y4 v! E3 R2 t/ ^. x, o, Y5 s\end{align} / r+ B, i( |& o7 G( r3 g , D" q9 a9 N3 S: p! v\[ ( }- {2 ]7 U" j0 G8 | \left\{ $ Z2 r( _. W2 H1 u. [2 F
\begin{aligned} ) l$ T- Y' R8 r: n1 j8 e" Q ]
&a+b=c\\ 9 h* x0 B, \$ }- Q% \, u, N &d=e+f+g " W6 F' w1 V4 X/ S0 e
\end{aligned} / Q% k4 ?7 N2 y \right. / ]% C$ v1 Y+ O/ m4 J7 y' \
\] ( t9 C2 p: ~/ J/ Y% F ) Y8 F- T8 @* `) K/ `\end{document} . d7 X# |* Z8 } i