<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\chapter{\LaTeX{} çš„åŸºæœ¬æ¦‚å¿µ}\label{chap:basics}
\addtocontents{los}{\protect\addvspace{10pt}}

\begin{intro}
æ¬¢è¿Žä½¿ç”¨ \LaTeX{}ï¼æœ¬ç«&nbsp;å¼€å¤´ç”¨ç®€çŸ­çš„ç¯‡å¹…ä»‹ç»äº† \LaTeX{} çš„æ¥æºï¼Œ
ç„¶åŽä»‹ç»äº† \LaTeX{} æºä»£ç&nbsp;çš„å†™æ³•ï¼Œç¼–è¯‘ \LaTeX{} æºä»£ç&nbsp;ç”Ÿæˆæ–‡æ¡£çš„æ–¹æ³•ï¼Œä»¥åŠç†è§£æŽ¥ä¸‹æ¥çš„ç«&nbsp;èŠ‚çš„ä¸€äº›å¿…è¦çŸ¥è¯†ã€‚
\end{intro}

\section{æ¦‚è¿°}\label{sec:intro}

\subsection{\protect\TeX}\label{subsec:tex}

\index{Knuth@Knuth, Donald E. (\textit{é«˜å¾·çº³})}
\index{TeX@\TeX}
\TeX{} æ˜¯é«˜å¾·çº³ (Donald E.~Knuth) ä¸ºæŽ’ç‰ˆæ–‡å­—å’Œæ•°å­¦å…¬å¼è€Œå¼€å‘çš„è½¯ä»¶\cite{texbook}ã€‚
1977 å¹´ï¼Œæ­£åœ¨ç¼–å†™ã€Šè®¡ç®—æœºç¨‹åºè®¾è®¡è‰ºæœ¯ã€‹çš„é«˜å¾·çº³æ„è¯†åˆ°æ¯å†µæ„ˆä¸‹çš„æŽ’ç‰ˆè´¨é‡å°†å½±å“å…¶è‘—ä½œçš„å‘è¡Œï¼Œ
ä¸ºæ‰­è½¬è¿™ç§çŠ¶å†µï¼Œä»–ç€æ‰‹å¼€å‘ \TeX{}ï¼Œå‘æŽ˜å½“æ—¶åˆšåˆšç”¨äºŽå‡ºç‰ˆå·¥ä¸šçš„æ•°å­—å°åˆ·è®¾å¤‡çš„æ½œåŠ›ã€‚
1982 å¹´ï¼Œé«˜å¾·çº³å‘å¸ƒ \TeX{} æŽ’ç‰ˆå¼•æ“Žï¼Œè€ŒåŽåœ¨ 1989 å¹´åˆä¸ºæ›´å¥½åœ°æ”¯æŒ 8-bit å­—ç¬¦å’Œå¤šè¯­è¨€æŽ’ç‰ˆè€Œäºˆä»¥æ”¹è¿›ã€‚
\TeX{} ä»¥å…¶å“è¶Šçš„ç¨³å®šæ€§ã€è·¨å¹³å°èƒ½åŠ›å’Œå‡&nbsp;ä¹Žæ²¡æœ‰ bug çš„ç‰¹æ€§è€Œè‘—ç§°ã€‚
å®ƒçš„ç‰ˆæœ¬å·ä¸æ–­è¶‹è¿‘äºŽ $\pi$ï¼Œå½“å‰ä¸º 3.141592653ã€‚

\TeX{} è¯»ä½œâ€œTechâ€ï¼Œä¸Žæ±‰å­—â€œæ³°èµ«â€çš„å‘éŸ³ç›¸è¿‘ï¼Œå…¶ä¸­â€œchâ€ çš„å‘éŸ³ç±»ä¼¼äºŽâ€œhâ€ã€‚\TeX{} çš„æ‹¼å†™æ¥è‡ªå¸Œè…Šè¯è¯­
Ï„ÎµÏ‡Î½Î¹ÎºÎ·Ì (techniqueï¼ŒæŠ€æœ¯) å¼€å¤´çš„å‡&nbsp;ä¸ªå­—æ¯ï¼Œåœ¨ ASCII å­—ç¬¦çŽ¯å¢ƒä¸­å†™ä½œ \texttt{TeX}ã€‚

\subsection{\LaTeX}\label{subsec:latex}

\index{LaTeX@\LaTeX}
\index{LaTeX2e@\LaTeXe}
\LaTeX{} æ˜¯ä¸€ç§ä½¿ç”¨ \TeX{} ç¨‹åºä½œä¸ºæŽ’ç‰ˆå¼•æ“Žçš„æ&nbsp;¼å¼ï¼ˆformatï¼‰ï¼Œå¯ä»¥ç²—ç•¥åœ°å°†å®ƒç†è§£æˆæ˜¯å¯¹ \TeX{} çš„ä¸€å±‚å°è£…ã€‚
\LaTeX{} æœ€åˆçš„è®¾è®¡ç›®æ&nbsp;‡æ˜¯åˆ†ç¦»å†…å®¹ä¸Žæ&nbsp;¼å¼ï¼Œä»¥ä¾¿ä½œè€…èƒ½å¤Ÿä¸“æ³¨äºŽå†…å®¹åˆ›ä½œè€Œéžç‰ˆå¼è®¾è®¡ï¼Œå¹¶èƒ½ä»¥æ­¤å¾—åˆ°é«˜è´¨é‡æŽ’ç‰ˆçš„ä½œå“ã€‚
\LaTeX{} èµ·åˆç”± Leslie Lamport åšå£«\cite{manual}å¼€å‘ï¼Œç›®å‰ç”± \LaTeX{} å·¥ä½œç»„%
\footnote{\url{https://www.latex-project.org}}è¿›è¡Œç»´æŠ¤ã€‚

\LaTeX{} è¯»ä½œâ€œLah-techâ€ æˆ–è€…â€œLay-techâ€ï¼Œä¸Žæ±‰å­—â€œæ‹‰æ³°èµ«â€æˆ–â€œé›·æ³°èµ«â€çš„å‘éŸ³ç›¸è¿‘ï¼Œåœ¨ ASCII å­—ç¬¦çŽ¯å¢ƒå†™ä½œ \texttt{LaTeX}ã€‚
\LaTeXe{} æ˜¯ \LaTeX{} çš„å½“å‰ç‰ˆæœ¬ï¼Œæ„æ€æ˜¯è¶…å‡ºäº†ç¬¬äºŒç‰ˆï¼Œä½†è¿˜è¿œæœªè¾¾åˆ°ç¬¬ä¸‰ç‰ˆï¼Œåœ¨ ASCII å­—ç¬¦çŽ¯å¢ƒå†™ä½œ \texttt{LaTeX2e}ã€‚

\subsection{\LaTeX{} çš„ä¼˜ç¼ºç‚¹}\label{subec:advs}

ç»å¸¸æœ‰äººå–œæ¬¢å¯¹æ¯” \LaTeX{} å’Œä»¥ Microsoft Office Word ä¸ºä»£è¡¨çš„â€œæ‰€è§å³æ‰€å¾—â€%
ï¼ˆWhat You See Is What You Getï¼‰å­—å¤„ç†å·¥å…·ã€‚
è¿™ç§å¯¹æ¯”æ˜¯æ²¡æœ‰æ„ä¹‰çš„ï¼Œå›&nbsp;ä¸º \TeX{} æ˜¯ä¸€ä¸ªæŽ’ç‰ˆå¼•æ“Žï¼Œ\LaTeX{} æ˜¯å…¶å°è£…ï¼Œè€Œ Word æ˜¯å­—å¤„ç†å·¥å…·ã€‚
äºŒè€…çš„è®¾è®¡ç›®æ&nbsp;‡ä¸ä¸€è‡´ï¼Œä¹Ÿå„è‡ªæœ‰è‡ªå·±çš„é€‚ç”¨èŒƒå›´ã€‚

ä¸è¿‡ï¼Œè¿™é‡Œä»æ—§æ€»ç»“ \LaTeX{} çš„ä¸€äº›ä¼˜ç‚¹ï¼š
\begin{itemize}
  \item å…·æœ‰ä¸“ä¸šçš„æŽ’ç‰ˆè¾“å‡ºèƒ½åŠ›ï¼Œäº§ç”Ÿçš„æ–‡æ¡£çœ‹ä¸ŠåŽ»å°±åƒâ€œå°åˆ·å“â€ä¸€æ&nbsp;·ã€‚
  \item å…·æœ‰æ–¹ä¾¿è€Œå¼ºå¤§çš„æ•°å­¦å…¬å¼æŽ’ç‰ˆèƒ½åŠ›ï¼Œæ—&nbsp;å‡ºå…¶å³è€…ã€‚
  \item ç»å¤§å¤šæ•°æ—¶å€™ï¼Œç”¨æˆ·åªéœ€ä¸“æ³¨äºŽä¸€äº›ç»„ç»‡æ–‡æ¡£ç»“æž„çš„åŸºç¡€å‘½ä»¤ï¼Œæ—&nbsp;éœ€ï¼ˆæˆ–å¾ˆå°‘ï¼‰æ“å¿ƒæ–‡æ¡£çš„ç‰ˆé¢è®¾è®¡ã€‚
  \item å¾ˆå®¹æ˜“ç”Ÿæˆå¤æ‚çš„ä¸“ä¸šæŽ’ç‰ˆå…ƒç´&nbsp;ï¼Œå¦‚è„šæ³¨ã€äº¤å‰å¼•ç”¨ã€å‚è€ƒæ–‡çŒ®ã€ç›®å½•ç­‰ã€‚
  \item å¼ºå¤§çš„å¯æ‰©å±•æ€§ã€‚ä¸–ç•Œå„åœ°çš„äººå¼€å‘äº†æ•°ä»¥åƒè®¡çš„ \LaTeX{} å®åŒ…ç”¨äºŽè¡¥å……å’Œæ‰©å±• \LaTeX{} çš„åŠŸèƒ½ã€‚
  ä¸€äº›å¸¸ç”¨å®åŒ…åˆ—åœ¨äº†æœ¬æ‰‹å†Œé™„å½•ä¸­çš„ \ref{sec:pkg-list} å°èŠ‚ã€‚æ›´å¤šçš„å®åŒ…å‚è€ƒ \textit{The \LaTeX{} companion}\cite{companion}ã€‚
  \item èƒ½å¤Ÿä¿ƒä½¿ç”¨æˆ·å†™å‡ºç»“æž„è‰¯å¥½çš„æ–‡æ¡£â€”â€”è€Œè¿™ä¹Ÿæ˜¯ \LaTeX{} å­˜åœ¨çš„åˆè¡·ã€‚
  \item \LaTeX{} å’Œ \TeX{} åŠç›¸å…³è½¯ä»¶æ˜¯è·¨å¹³å°ã€å…è´¹ã€å¼€æºçš„ã€‚
  æ—&nbsp;è®ºç”¨æˆ·ä½¿ç”¨çš„æ˜¯ Windowsï¼ŒmacOSï¼ˆOS Xï¼‰ï¼ŒGNU/Linux è¿˜æ˜¯ FreeBSD ç­‰æ“ä½œç³»ç»Ÿï¼Œéƒ½èƒ½è½»æ¾èŽ·å¾—å’Œä½¿ç”¨è¿™ä¸€å¼ºå¤§çš„æŽ’ç‰ˆå·¥å…·ï¼Œå¹¶ä¸”èŽ·å¾—ç¨³å®šçš„è¾“å‡ºã€‚
\end{itemize}

\LaTeX{} çš„ç¼ºç‚¹ä¹Ÿæ˜¯æ˜¾è€Œæ˜“è§çš„ï¼š
\begin{itemize}
  \item å…¥é—¨é—¨æ§›é«˜ã€‚æœ¬æ‰‹å†Œçš„å‰¯æ&nbsp;‡é¢˜å«åšâ€œ\pageref{lshort-minutes}~åˆ†é’Ÿäº†è§£ \LaTeXeâ€ï¼Œ
  å®žé™…ä¸Šâ€œ\pageref{lshort-minutes}â€æ˜¯æœ¬æ‰‹å†Œæ­£æ–‡éƒ¨åˆ†ï¼ˆåŒ…æ‹¬é™„å½•ï¼‰çš„é¡µæ•°ã€‚å¦‚æžœçœŸçš„ä»¥å¹³å‡ä¸€é¡µä¸€åˆ†é’Ÿçš„é€Ÿåº¦çœ‹å®Œäº†æœ¬æ‰‹å†Œï¼Œ
  ä½&nbsp;åªæ˜¯ç²—çª¥é—¨å¾„è€Œå·²ï¼Œç¦»å­¦ä¼šå®ƒè¿˜å¾ˆè¿œã€‚
  \item ä¸å®¹æ˜“æŽ’æŸ¥é”™è¯¯ã€‚\LaTeX{} ä½œä¸ºä¸€ä¸ªä¾é&nbsp;ç¼–å†™ä»£ç&nbsp;å·¥ä½œçš„æŽ’ç‰ˆå·¥å…·ï¼Œå…¶ä½¿ç”¨çš„å®è¯­è¨€æ¯” C++ æˆ– Python ç­‰ç¨‹åºè®¾è®¡è¯­è¨€åœ¨é”™è¯¯æŽ’æŸ¥æ–¹é¢å›°éš¾å¾—å¤šã€‚
  å®ƒè™½ç„¶èƒ½å¤Ÿæç¤ºé”™è¯¯ï¼Œä½†ä¸æä¾›è°ƒè¯•çš„æœºåˆ¶ï¼Œæœ‰æ—¶é”™è¯¯æç¤ºè¿˜å¾ˆéš¾ç†è§£ã€‚
  \item ä¸å®¹æ˜“å®šåˆ¶æ&nbsp;·å¼ã€‚\LaTeX{} æä¾›äº†ä¸€ä¸ªåŸºæœ¬ä¸Šè‰¯å¥½çš„æ&nbsp;·å¼ï¼Œä¸ºäº†è®©ç”¨æˆ·ä¸åŽ»å…³æ³¨æ&nbsp;·å¼è€Œä¸“æ³¨äºŽæ–‡æ¡£ç»“æž„ã€‚
  ä½†å¦‚æžœæƒ³è¦æ”¹è¿› \LaTeX{} ç”Ÿæˆçš„æ–‡æ¡£æ&nbsp;·å¼åˆ™æ˜¯ååˆ†å›°éš¾çš„ã€‚
  \item ç›¸æ¯”â€œæ‰€è§å³æ‰€å¾—â€çš„æ¨¡å¼æœ‰ä¸€äº›ä¸ä¾¿ï¼Œä¸ºäº†æŸ¥çœ‹ç”Ÿæˆæ–‡æ¡£çš„æ•ˆæžœï¼Œç”¨æˆ·æ€»è¦ä¸åœåœ°ç¼–è¯‘ã€‚
\end{itemize}

\subsection{å‘½ä»¤è¡ŒåŸºç¡€}

\LaTeX{} å’Œ \TeX{} åŠç›¸å…³è½¯ä»¶å¤§å¤šä»…æä¾›äº†å‘½ä»¤è¡ŒæŽ¥å£ï¼Œè€Œä¸åƒ Wordã€Adobe InDesign ä¸€æ&nbsp;·æœ‰å›¾å½¢ç”¨æˆ·ç•Œé¢ã€‚
å‘½ä»¤è¡Œç¨‹åºçš„ç»“æž„å¾€å¾€æ¯”è¾ƒç®€å•ï¼Œå®ƒä»¬æŽ¥å—ç”¨æˆ·è¾“å…¥ï¼Œè¯»å–ç›¸å…³æ–‡ä»¶ï¼Œè¿›è¡Œä¸€äº›æ“ä½œå’Œè¿ç®—åŽè¾“å‡ºç›®æ&nbsp;‡æ–‡ä»¶ï¼Œ
æœ‰æ—¶è¿˜ä¼šå°†æç¤ºä¿¡æ¯ã€è¿è¡Œç»“æžœæ˜¾ç¤ºåœ¨å±å¹•ä¸Šã€‚åœ¨ Windows ç³»ç»Ÿä¸Šï¼Œå¦‚éœ€è¿›å…¥å‘½ä»¤è¡Œï¼Œå¯åœ¨å¼€å§‹èœå•ä¸­æœç´¢
â€œå‘½ä»¤æç¤ºç¬¦â€ï¼Œä¹Ÿå¯åœ¨â€œè¿è¡Œâ€çª—å£ä¸­è¾“å…¥ \texttt{cmd} æ‰“å¼€ï¼›Linux æˆ– macOS ç­‰ *nix %
\footnote{ç±» Unix æ“ä½œç³»ç»Ÿï¼ŒåŒ…å« Linuxã€macOSï¼ˆOS Xï¼‰ã€‚}
ç³»ç»Ÿä¸­å¯æœç´¢â€œTerminalâ€æ‰“å¼€ç»ˆç«¯ã€‚éƒ¨åˆ†ç³»ç»Ÿä¹Ÿæä¾›äº†ä¸€äº›å¿«æ·æ–¹å¼ï¼Œå…·ä½“è¯·å‚è€ƒç›¸å…³æ‰‹å†Œã€‚

ä¸Žå¸¸è§„è½¯ä»¶ç±»ä¼¼ï¼Œå‘½ä»¤è¡Œç¨‹åºä¹Ÿéƒ½æ˜¯å¯æ‰§è¡Œç¨‹åºï¼Œåœ¨ Windows ä¸ŠåŽç¼€åä¸º \texttt{.exe}ï¼Œè€Œåœ¨ç±» Unix ç³»ç»Ÿä¸Š
åˆ™éœ€è¦å¸¦æœ‰ \texttt{x} æƒé™ã€‚åœ¨å¤§å¤šæ•°å‘½ä»¤è¡ŒçŽ¯å¢ƒä¸­ï¼Œç³»ç»Ÿä¼šæ&nbsp;¹æ®\textbf{çŽ¯å¢ƒå˜é‡} \texttt{PATH} ä¸­å­˜å‚¨
çš„è·¯å¾„æ¥æœç´¢å¯ä¾›æ‰§è¡Œçš„ç¨‹åºã€‚å›&nbsp;æ­¤åœ¨è¿è¡Œä¹‹å‰ï¼Œéœ€ç¡®ä¿ \LaTeX ã€\TeX{} åŠç›¸å…³ç¨‹åºæ‰€åœ¨è·¯å¾„å·²åŒ…å«åœ¨
\texttt{PATH} ä¸­ã€‚

åœ¨å‘½ä»¤è¡Œä¸­è¿è¡Œç¨‹åºæ—¶ï¼Œéœ€è¦å…ˆè¾“å…¥ç¨‹åºåï¼Œå…¶åŽå¯åŠ&nbsp;ä¸€ç³»åˆ—ç”¨ç©ºæ&nbsp;¼åˆ†éš”çš„å‚æ•°ï¼Œå¹¶æŒ‰ä¸‹ Enter é”®æ‰§è¡Œã€‚
ä¸€èˆ¬æƒ…å†µä¸‹ï¼Œå‘½ä»¤è¡Œç¨‹åºæ‰§è¡Œå®Œæ¯•ä¼šè‡ªè¡Œé€€å‡ºã€‚è‹¥é‡åˆ°é”™è¯¯æˆ–ä¸­æ–­ï¼Œå¯è¾“å…¥ Ctrl+C ä»¥å¼ºåˆ¶ç»“æŸã€‚

ä½¿ç”¨å‘½ä»¤è¡Œç¨‹åºè¾“å…¥ã€è¾“å‡ºæ–‡ä»¶æ—¶ï¼Œéœ€ç¡®ä¿æ–‡ä»¶è·¯å¾„æ­£ç¡®ã€‚é€šå¸¸éœ€è¦å…ˆåˆ‡æ¢åˆ°æ–‡ä»¶æ‰€åœ¨ç›®å½•ï¼Œå†æ‰§è¡Œæœ‰å…³ç¨‹åºã€‚
åˆ‡æ¢è·¯å¾„å¯ä»¥æ‰§è¡Œ
\begin{command}
\verb|cd| \Arg{path}
\end{command}
æ³¨æ„ \Arg{path} ä¸­çš„å¤šçº§ç›®å½•åœ¨ Windows ç³»ç»Ÿä¸Šä½¿ç”¨åæ–œçº¿ \verb|\| åˆ†éš”ï¼Œè€Œåœ¨ç±» Unix ç³»ç»Ÿä¸Šä½¿ç”¨æ­£æ–œçº¿
\verb|/| åˆ†éš”ã€‚å¦‚æžœ \Arg{path} ä¸­å¸¦æœ‰ç©ºæ&nbsp;¼ï¼Œåˆ™éœ€åŠ&nbsp;ä¸Šå¼•å· \verb|"|ã€‚æ­¤å¤–ï¼Œåœ¨ Windows ç³»ç»Ÿä¸Šå¦‚æžœè¦åˆ‡æ¢
åˆ°å…¶ä»–åˆ†åŒºï¼Œè¿˜éœ€åŠ&nbsp;ä¸Š \verb|/d| é€‰é¡¹ï¼Œä¾‹å¦‚ \verb|cd /d "C:\Program Files (x86)\"|ã€‚

è®¸å¤šç”¨æˆ·ä¼šä½¿ç”¨ TeXworks æˆ– TeXstudio ç­‰ç¼–è¾‘å™¨æ¥ç¼–å†™ \LaTeX{} æ–‡æ¡£ã€‚è¿™äº›ç¼–è¾‘å™¨æä¾›çš„ç¼–è¯‘åŠŸèƒ½ï¼Œ
å®žé™…ä¸Šåªæ˜¯å¯¹ç‰¹å®šå‘½ä»¤è¡Œç¨‹åºçš„å°è£…ï¼Œè€Œå¹¶éžé­”æ³•ã€‚

\section{ç¬¬ä¸€æ¬¡ä½¿ç”¨ \LaTeX}\label{sec:run}

æºä»£ç&nbsp;~\ref{code:hello-world}~æ˜¯ä¸€ä»½æœ€çŸ­çš„ \LaTeX{} æºä»£ç&nbsp;ç¤ºä¾‹ã€‚

\begin{sourcecode}[htp]
\begin{Verbatim}
\documentclass{article}
\begin{document}
``Hello world!'' from \LaTeX.
\end{document}
\end{Verbatim}
\caption{\LaTeX{} çš„ä¸€ä¸ªæœ€ç®€å•çš„æºä»£ç&nbsp;ç¤ºä¾‹ã€‚}\label{code:hello-world}
\end{sourcecode}

è¿™é‡Œé¦–å…ˆä»‹ç»å¦‚ä½•ç¼–è¯‘ä½¿ç”¨è¿™ä»½æºä»£ç&nbsp;ï¼Œåœ¨åŽç»­å°èŠ‚ä¸­å†ä»‹ç»æºä»£ç&nbsp;çš„ç»†èŠ‚ã€‚
ä½&nbsp;å¯ä»¥å°†è¿™ä»½æºä»£ç&nbsp;ä¿å­˜ä¸º \texttt{helloworld.tex}ï¼Œè€ŒåŽç¼–è¯‘ã€‚å…·ä½“æ¥è¯´:
\begin{itemize}
  \item å¦‚æžœä½¿ç”¨ TeXworks æˆ– TeXstudio ç­‰ç¼–è¾‘å™¨ï¼Œä½&nbsp;å¯ä»¥ä½¿ç”¨ç¼–è¾‘å™¨æä¾›çš„â€œç¼–è¯‘â€æŒ‰é’®æˆ–è€…â€œæŽ’ç‰ˆâ€
  æŒ‰é’®ã€‚å»ºè®®ä½¿ç”¨ \hologo{pdfLaTeX} æˆ– \hologo{XeLaTeX} ä½œä¸ºé»˜è®¤çš„ç¼–è¯‘æ–¹å¼ï¼ˆä¸åŒç¼–è¯‘æ–¹å¼çš„å·®åˆ«ï¼Œ
  è§~\ref{sec:concepts}~èŠ‚ï¼‰ã€‚
  \item å¦‚æžœä½¿ç”¨å‘½ä»¤è¡Œæ–¹å¼è¿›è¡Œç¼–è¯‘ï¼Œåˆ™éœ€æ‰“å¼€ Windows å‘½ä»¤æç¤ºç¬¦æˆ–è€… *nix çš„ç»ˆç«¯ï¼Œ
  åœ¨æºä»£ç&nbsp;æ‰€åœ¨çš„ç›®å½•ä¸‹è¾“å…¥ï¼š
\begin{verbatim}
pdflatex helloworld
\end{verbatim}
æˆ–è€…
\begin{verbatim}
xelatex helloworld
\end{verbatim}
\end{itemize}

å¦‚æžœç¼–è¯‘æˆåŠŸï¼Œå¯ä»¥åœ¨ \texttt{helloworld.tex} æ‰€åœ¨ç›®å½•çœ‹åˆ°ç”Ÿæˆçš„ \texttt{helloworld.pdf} ä»¥åŠä¸€äº›å…¶å®ƒæ–‡ä»¶ã€‚

æºä»£ç&nbsp;~\ref{code:hello-world-chinese}~æ˜¯åœ¨ \LaTeX{} æŽ’ç‰ˆä¸­æ–‡çš„ä¸€ä¸ªæœ€ç®€ç¤ºä¾‹ã€‚
ç¼–è¯‘çš„æ–¹å¼ä¸Žä¸Šä¸€ä»½æºä»£ç&nbsp;ç›¸åŒï¼Œä½†éœ€ä½¿ç”¨ \hologo{XeLaTeX} ç¼–è¯‘æ–¹å¼%
\footnote{æ³¨æ„ä¸¤ä¸ªé—®é¢˜ï¼š1. æ–‡æ¡£ä¿å­˜ä¸º UTF-8 ç¼–ç&nbsp;ï¼›2. æŸäº›å‘è¡Œç‰ˆéœ€è¦è¡¥å……å®‰è£…è¾ƒå¤šå®åŒ…ï¼ˆå¦‚ \hologo{MiKTeX}ï¼‰ã€‚}ã€‚
ä¸­æ–‡æ”¯æŒçš„è¯¦ç»†å†…å®¹è§ \ref{sec:chinese} èŠ‚ã€‚

\begin{sourcecode}[htp]
  \begin{Verbatim}
  \documentclass{ctexart}
  \begin{document}
  â€œä½&nbsp;å¥½ï¼Œä¸–ç•Œï¼â€æ¥è‡ª \LaTeX{} çš„é—®å€™ã€‚
  \end{document}
  \end{Verbatim}
  \caption{åœ¨\LaTeX{} ä¸­æŽ’ç‰ˆä¸­æ–‡çš„æœ€ç®€æºä»£ç&nbsp;ç¤ºä¾‹ã€‚}\label{code:hello-world-chinese}
\end{sourcecode}

\section{\LaTeX{} å‘½ä»¤å’Œä»£ç&nbsp;ç»“æž„}\label{sec:src}

\LaTeX{} çš„æºä»£ç&nbsp;ä¸ºæ–‡æœ¬æ–‡ä»¶ã€‚è¿™äº›æ–‡æœ¬é™¤äº†æ–‡å­—æœ¬èº«ï¼Œè¿˜åŒ…æ‹¬å„ç§å‘½ä»¤ï¼Œ
ç”¨åœ¨æŽ’ç‰ˆå…¬å¼ã€åˆ’åˆ†æ–‡æ¡£ç»“æž„ã€æŽ§åˆ¶æ&nbsp;·å¼ç­‰ç­‰ä¸åŒçš„åœ°æ–¹ã€‚

\subsection{\LaTeX{} å‘½ä»¤å’ŒçŽ¯å¢ƒ}\label{subsec:cmds}

\index{LaTeX macro@\LaTeX{} å‘½ä»¤}
\LaTeX{} ä¸­å‘½ä»¤\footnote{ä¹Ÿå«ä½œæŽ§åˆ¶åºåˆ—ï¼ˆcontrol sequenceï¼‰ã€‚}ä»¥åæ–œçº¿ \texttt{\textbackslash} å¼€å¤´ï¼Œä¸ºä»¥ä¸‹ä¸¤ç§å½¢å¼ä¹‹ä¸€ï¼š
\begin{itemize}
  \item åæ–œçº¿å’ŒåŽé¢çš„ä¸€ä¸²å­—æ¯ï¼Œå¦‚ \cmd{LaTeX}ã€‚å®ƒä»¬ä»¥ä»»æ„éžå­—æ¯ç¬¦å·ï¼ˆç©ºæ&nbsp;¼ã€æ•°å­—ã€æ&nbsp;‡ç‚¹ç­‰ï¼‰ä¸ºç•Œé™ã€‚
  \item åæ–œçº¿å’ŒåŽé¢çš„å•ä¸ªéžå­—æ¯ç¬¦å·ï¼Œå¦‚ \cmd{\$}ã€‚
\end{itemize}

è¦æ³¨æ„ \LaTeX{} å‘½ä»¤æ˜¯\textbf{å¯¹å¤§å°å†™æ•æ„Ÿ}çš„ï¼Œæ¯”å¦‚è¾“å…¥ \cmd{LaTeX} å‘½ä»¤å¯ä»¥ç”Ÿæˆé”™è½æœ‰è‡´çš„ \LaTeX{} å­—æ¯ç»„åˆï¼Œ
ä½†è¾“å…¥ \cmd{Latex} æˆ–è€… \cmd{LaTex} ä»€ä¹ˆéƒ½å¾—ä¸åˆ°ï¼Œè¿˜ä¼šæŠ¥é”™ï¼›å®ƒä»¬ä¸Ž \cmd{LaTeX} æ˜¯ä¸åŒçš„å‘½ä»¤ã€‚

å­—æ¯å½¢å¼çš„ \LaTeX{} å‘½ä»¤å¿½ç•¥å…¶åŽçš„æ‰€æœ‰è¿žç»­ç©ºæ&nbsp;¼ã€‚
å¦‚æžœè¦äººä¸ºå¼•å…¥ç©ºæ&nbsp;¼ï¼Œéœ€è¦åœ¨å‘½ä»¤åŽé¢åŠ&nbsp;ä¸€å¯¹èŠ±æ‹¬å·é˜»æ­¢å…¶å¿½ç•¥ç©ºæ&nbsp;¼%
\footnote{å¦å¤–ä¹Ÿå¯ä»¥åœ¨å‘½ä»¤åŽé¢ç´§è·Ÿä¸€ä¸ª \cmd{\textvisiblespace} å‘½ä»¤ï¼ˆåæ–œçº¿åŠ&nbsp;ç©ºæ&nbsp;¼ï¼‰ï¼Œä»£è¡¨æ’å…¥ä¸€ä¸ªé—´è·ã€‚
æ¯”å¦‚ \cmd{TeX}\cmd{\textvisiblespace}\texttt{user} çš„è¾“å‡ºæ•ˆæžœå°±æ˜¯ \TeX{} userã€‚}ï¼š
\begin{example}
Shall we call ourselves
\TeX users

or \TeX{} users?
\end{example}

\pinyinindex{canshu}{å‚æ•°}
ä¸€äº› \LaTeX{} å‘½ä»¤å¯ä»¥æŽ¥æ”¶ä¸€äº›å‚æ•°ï¼Œå‚æ•°çš„å†…å®¹ä¼šå½±å“å‘½ä»¤çš„æ•ˆæžœã€‚
\LaTeX{} çš„å‚æ•°åˆ†ä¸ºå¯é€‰å‚æ•°å’Œå¿…é€‰å‚æ•°ã€‚
å¯é€‰å‚æ•°ä»¥æ–¹æ‹¬å· \texttt[ å’Œ \texttt] åŒ…è£¹ï¼›å¿…é€‰å‚æ•°ä¸€èˆ¬ä»¥èŠ±æ‹¬å· \texttt\{ å’Œ \texttt\} åŒ…è£¹%
\footnote{ä»¥å•ä¸ªå­—ç¬¦ä½œä¸ºå‘½ä»¤çš„å‚æ•°æ—¶ï¼Œå¯ä»¥ä¸åŠ&nbsp;æ‹¬å·ã€‚ä¾‹å¦‚ï¼Œåœ¨æ•°å­¦çŽ¯å¢ƒä¸‹ï¼Œ
\cmd{frac}\texttt{12} å’Œ \cmd{frac}\texttt{\{1\}\{2\}} çš„æ•ˆæžœæ˜¯ä¸€æ&nbsp;·çš„ã€‚}ã€‚
è¿˜æœ‰äº›å‘½ä»¤å¯ä»¥å¸¦ä¸€ä¸ªæ˜Ÿå· \texttt*ï¼Œå¸¦æ˜Ÿå·å’Œä¸å¸¦æ˜Ÿå·çš„å‘½ä»¤æ•ˆæžœæœ‰ä¸€å®šå·®å¼‚ã€‚
åˆæ¬¡æŽ¥è§¦è¿™äº›æ¦‚å¿µæ—¶ï¼Œå¯ä»¥ç²—ç•¥åœ°æŠŠæ˜Ÿå·çœ‹ä½œä¸€ç§ç‰¹æ®Šçš„å¯é€‰å‚æ•°ã€‚

\index{LaTeX environment@\LaTeX{} çŽ¯å¢ƒ}
\cmdindex{begin,end}
\LaTeX{} ä¸­è¿˜åŒ…æ‹¬\textbf{çŽ¯å¢ƒ}ï¼Œç”¨ä»¥ä»¤ä¸€äº›æ•ˆæžœåœ¨å±€éƒ¨ç”Ÿæ•ˆï¼Œæˆ–æ˜¯ç”Ÿæˆç‰¹æ®Šçš„æ–‡æ¡£å…ƒç´&nbsp;ã€‚
\LaTeX{} çŽ¯å¢ƒçš„ç”¨æ³•ä¸ºä¸€å¯¹å‘½ä»¤ \cmd{begin} å’Œ \cmd{end}ï¼š
\begin{command}
\cmd{begin}\marg{environment name}\oarg{optional arguments}\marg{mandatory arguments} \\
\ldots \\
\cmd{end}\marg{environment name}
\end{command}

å…¶ä¸­ \Arg{environment name} ä¸ºçŽ¯å¢ƒåï¼Œ\cmd{begin} å’Œ \cmd{end} ä¸­å¡«å†™çš„çŽ¯å¢ƒååº”å½“ä¸€è‡´ã€‚
ç±»ä¼¼å‘½ä»¤ï¼Œ\marg{mandatory arguments} å’Œ \oarg{optional arguments} ä¸ºçŽ¯å¢ƒæ‰€éœ€çš„å¿…é€‰å’Œå¯é€‰å‚æ•°ã€‚
\LaTeX{} çŽ¯å¢ƒå¯èƒ½éœ€è¦ä¸€ä¸ªæˆ–å¤šä¸ªå¿…é€‰/å¯é€‰å‚æ•°ï¼Œä¹Ÿå¯èƒ½å®Œå…¨ä¸éœ€è¦å‚æ•°ã€‚
éƒ¨åˆ†çŽ¯å¢ƒå…è®¸åµŒå¥—ä½¿ç”¨ã€‚

\pinyinindex{fenzu}{åˆ†ç»„}
æœ‰äº›å‘½ä»¤ï¼ˆå¦‚ \cmd{bfseries}ï¼‰ä¼šå¯¹å…¶åŽæ‰€æœ‰å†…å®¹äº§ç”Ÿä½œç”¨ã€‚è‹¥è¦é™åˆ¶å…¶ä½œç”¨èŒƒå›´ï¼Œåˆ™éœ€è¦ä½¿ç”¨\textbf{åˆ†ç»„}ã€‚
\LaTeX{} ä½¿ç”¨ä¸€å¯¹èŠ±æ‹¬å· \verb|{| å’Œ \verb|}| ä½œä¸ºåˆ†ç»„ï¼Œåœ¨åˆ†ç»„ä¸­ä½¿ç”¨çš„å‘½ä»¤è¢«é™åˆ¶åœ¨åˆ†ç»„å†…ï¼Œä¸ä¼šå½±å“åˆ°åˆ†ç»„å¤–çš„å†…å®¹%
\footnote{ä¸ªåˆ«å‘½ä»¤åœ¨åˆ†ç»„å†…ä»ç„¶ä¼šäº§ç”Ÿå…¨å±€ä½œç”¨ï¼Œä¾‹å¦‚ç¬¬ \ref{sec:counters} èŠ‚ä»‹ç»çš„ \cmd{setcounter} ç­‰å‘½ä»¤ã€‚}ã€‚
ä¸Šæ–‡æåˆ°çš„ \LaTeX{} çŽ¯å¢ƒéšå«äº†ä¸€ä¸ªåˆ†ç»„ï¼Œåœ¨çŽ¯å¢ƒä¸­çš„å‘½ä»¤è¢«åŒ…è£¹åœ¨åˆ†ç»„å†…ã€‚
\ref{subsec:fontshape} å’Œ \ref{subsec:fontsize} å°èŠ‚ä¸­ä»‹ç»çš„ä¿®æ”¹å­—ä½“å’Œå­—å·çš„å‘½ä»¤ç”¨æ³•ï¼Œå³å±žæ­¤ç±»ã€‚

\subsection{\LaTeX{} æºä»£ç&nbsp;ç»“æž„}\label{subsec:struct}

\cmdindex{documentclass}
\envindex{document}
\pinyinindex{wendanglei}{æ–‡æ¡£ç±»}
\pinyinindex{hongbao}{å®åŒ…}
\LaTeX{} æºä»£ç&nbsp;ä»¥ä¸€ä¸ª \cmd{document\-class} å‘½ä»¤ä½œä¸ºå¼€å¤´ï¼Œå®ƒæŒ‡å®šäº†æ–‡æ¡£ä½¿ç”¨çš„\textbf{æ–‡æ¡£ç±»}ã€‚
\env{doc\-u\-ment} çŽ¯å¢ƒå½“ä¸­çš„å†…å®¹æ˜¯æ–‡æ¡£æ­£æ–‡ã€‚

\cmdindex{usepackage}
\pinyinindex{daoyanqu}{å¯¼è¨€åŒº}
åœ¨ \cmd{documentclass} å’Œ \cmd{begin}\marg*{document} ä¹‹é—´çš„ä½ç½®ç§°ä¸º\textbf{å¯¼è¨€åŒº}ã€‚
åœ¨å¯¼è¨€åŒºä¸­å¸¸ä¼šä½¿ç”¨ \cmd{use\-package} å‘½ä»¤è°ƒç”¨\textbf{å®åŒ…}ï¼Œè¿˜ä¼šè¿›è¡Œæ–‡æ¡£çš„å…¨å±€è®¾ç½®ã€‚
\begin{verbatim}
\documentclass{...}  % ... ä¸ºæŸæ–‡æ¡£ç±»
% å¯¼è¨€åŒº
\begin{document}
% æ­£æ–‡å†…å®¹
\end{document}
% æ­¤åŽå†…å®¹ä¼šè¢«å¿½ç•¥
\end{verbatim}

\section{\LaTeX{} å®åŒ…å’Œæ–‡æ¡£ç±»}\label{sec:latex-pkgs}

æœ¬èŠ‚å°†ä»”ç»†è§£é‡Šåœ¨ \ref{subsec:struct} å°èŠ‚ä¸­å‡ºçŽ°çš„å®åŒ…å’Œæ–‡æ¡£ç±»çš„æ¦‚å¿µä»¥åŠè¯¦ç»†ç”¨æ³•ã€‚

\subsection{æ–‡æ¡£ç±»}\label{subsec:classes}

\pinyinindex{wendanglei}{æ–‡æ¡£ç±»}
\textbf{æ–‡æ¡£ç±»}è§„å®šäº† \LaTeX{} æºä»£ç&nbsp;æ‰€è¦ç”Ÿæˆçš„æ–‡æ¡£çš„æ€§è´¨â€”â€”æ™®é€šæ–‡ç«&nbsp;ã€ä¹¦ç±ã€æ¼”ç¤ºæ–‡ç¨¿ã€
ä¸ªäººç®€åŽ†ç­‰ç­‰ã€‚\LaTeX{} æºä»£ç&nbsp;çš„å¼€å¤´é¡»ç”¨\cmd{document\-class}æŒ‡å®šæ–‡æ¡£ç±»ï¼š
\begin{command}
\cmd{documentclass}\oarg{options}\marg{class-name}
\end{command}

\clsindex{article,report,book}
\clsindex{ctexart,ctexrep,ctexbook}
å…¶ä¸­ \Arg{class-name} ä¸ºæ–‡æ¡£ç±»çš„åç§°ï¼Œå¦‚ \LaTeX{} æä¾›çš„ \cls{article}ã€\cls{report}ã€\cls{book}ï¼Œ
åœ¨å…¶åŸºç¡€ä¸Šæ´¾ç”Ÿçš„ä¸€äº›æ–‡æ¡£ç±»ï¼Œå¦‚æ”¯æŒä¸­æ–‡æŽ’ç‰ˆçš„ \cls{ctexart}ã€\cls{ctexrep}ã€\cls{ctexbook}ï¼Œ
æˆ–è€…æœ‰å…¶å®ƒåŠŸèƒ½çš„ä¸€äº›æ–‡æ¡£ç±»ï¼Œå¦‚ \cls{moderncv}ã€\cls{beamer} ç­‰ã€‚
\LaTeX{} æä¾›çš„åŸºç¡€æ–‡æ¡£ç±»è§è¡¨ \ref{tbl:ltx-classes}ï¼Œå…¶ä¸­å‰ä¸‰ä¸ªä¹&nbsp;æƒ¯ä¸Šç§°ä¸ºâ€œæ&nbsp;‡å‡†æ–‡æ¡£ç±»â€ã€‚

\begin{table}[htp]
\centering
\caption{\LaTeX{} æä¾›çš„åŸºç¡€æ–‡æ¡£ç±»}\label{tbl:ltx-classes}
\begin{tabular}{lp{30em}}
 \hline
 \cls{article} &amp; æ–‡ç«&nbsp;æ&nbsp;¼å¼çš„æ–‡æ¡£ç±»ï¼Œå¹¿æ³›ç”¨äºŽç§‘æŠ€è®ºæ–‡ã€æŠ¥å‘Šã€è¯´æ˜Žæ–‡æ¡£ç­‰ã€‚\\
 \cls{report}  &amp; é•¿ç¯‡æŠ¥å‘Šæ&nbsp;¼å¼çš„æ–‡æ¡£ç±»ï¼Œå…·æœ‰ç«&nbsp;èŠ‚ç»“æž„ï¼Œç”¨äºŽç»¼è¿°ã€é•¿ç¯‡è®ºæ–‡ã€ç®€å•çš„ä¹¦ç±ç­‰ã€‚\\
 \cls{book}    &amp; ä¹¦ç±æ–‡æ¡£ç±»ï¼ŒåŒ…å«ç«&nbsp;èŠ‚ç»“æž„å’Œå‰è¨€ã€æ­£æ–‡ã€åŽè®°ç­‰ç»“æž„ã€‚\\
 \hline
 \cls{proc}    &amp; åŸºäºŽ \cls{article} æ–‡æ¡£ç±»çš„ä¸€ä¸ªç®€å•çš„å­¦æœ¯æ–‡æ¡£æ¨¡æ¿ã€‚\\
 \cls{slides}  &amp; å¹»ç¯æ&nbsp;¼å¼çš„æ–‡æ¡£ç±»ï¼Œä½¿ç”¨æ—&nbsp;è¡¬çº¿å­—ä½“ã€‚\\
 \cls{minimal} &amp; ä¸€ä¸ªæžå…¶ç²¾ç®€çš„æ–‡æ¡£ç±»ï¼Œåªè®¾å®šäº†çº¸å¼&nbsp;å¤§å°å’ŒåŸºæœ¬å­—å·ï¼Œ
                 ç”¨ä½œä»£ç&nbsp;æµ‹è¯•çš„æœ€å°å·¥ä½œç¤ºä¾‹ï¼ˆMinimal Working Exampleï¼‰ã€‚ \\
 \hline
\end{tabular}
\end{table}

\pinyinindex{xuanxiang}{é€‰é¡¹ï¼ˆå®åŒ…/æ–‡æ¡£ç±»ï¼‰}
å¯é€‰å‚æ•° \Arg{options} ä¸ºæ–‡æ¡£ç±»æŒ‡å®šé€‰é¡¹ï¼Œä»¥å…¨å±€åœ°è§„å®šä¸€äº›æŽ’ç‰ˆçš„å‚æ•°ï¼Œå¦‚å­—å·ã€çº¸å¼&nbsp;å¤§å°ã€å•åŒé¢ç­‰ç­‰ã€‚
æ¯”å¦‚è°ƒç”¨ \cls{article} æ–‡æ¡£ç±»æŽ’ç‰ˆæ–‡ç«&nbsp;ï¼ŒæŒ‡å®šçº¸å¼&nbsp;ä¸º A4 å¤§å°ï¼ŒåŸºæœ¬å­—å·ä¸º 11ptï¼ŒåŒé¢æŽ’ç‰ˆï¼š
\begin{verbatim}
\documentclass[11pt,twoside,a4paper]{article}
\end{verbatim}

\LaTeX{} çš„ä¸‰ä¸ªæ&nbsp;‡å‡†æ–‡æ¡£ç±»å¯æŒ‡å®šçš„é€‰é¡¹åŒ…æ‹¬ï¼š
\begin{description}
\item[\texttt{10pt, 11pt, 12pt}] \quad æŒ‡å®šæ–‡æ¡£çš„åŸºæœ¬å­—å·ã€‚é»˜è®¤ä¸º \texttt{10pt}ã€‚
\item[\texttt{a4paper, letterpaper, \ldots}] \quad æŒ‡å®šçº¸å¼&nbsp;å¤§å°ï¼Œé»˜è®¤ä¸ºç¾Žå¼ä¿¡çº¸ \texttt{letterpaper}
ï¼ˆ$8.5\,\text{in}\times11\,\text{in}$ï¼Œå¤§çº¦ç›¸å½“äºŽ $21.6\,\text{cm}\times28.0\,\text{cm}$ï¼‰ã€‚
å¯æŒ‡å®šé€‰é¡¹è¿˜åŒ…æ‹¬ \texttt{a5paper}ï¼Œ\texttt{b5paper}ï¼Œ\texttt{executivepaper} å’Œ \texttt{legalpaper}ã€‚
æœ‰å…³çº¸å¼&nbsp;å¤§å°çš„æ›´å¤šç»†èŠ‚ï¼Œè¯·å‚è€ƒ \ref{subsec:geometry} å°èŠ‚ã€‚
\item[\texttt{twoside, oneside}] \quad æŒ‡å®šå•é¢/åŒé¢æŽ’ç‰ˆã€‚åŒé¢æŽ’ç‰ˆæ—¶ï¼Œå¥‡å¶é¡µçš„é¡µçœ‰é¡µè„šã€é¡µè¾¹è·ä¸åŒã€‚
\cls{article} å’Œ \cls{report} é»˜è®¤ä¸º \texttt{oneside}ï¼Œ\cls{book} é»˜è®¤ä¸º \texttt{twoside}ã€‚
\item[\texttt{onecolumn, twocolumn}] \quad æŒ‡å®šå•æ&nbsp;/åŒæ&nbsp;æŽ’ç‰ˆã€‚é»˜è®¤ä¸º \texttt{onecolumn}ã€‚
\item[\texttt{openright, openany}] \quad æŒ‡å®šæ–°çš„ä¸€ç«&nbsp; \cmd{chapter} æ˜¯åœ¨å¥‡æ•°é¡µï¼ˆå³ä¾§ï¼‰å¼€å§‹ï¼Œè¿˜æ˜¯ç›´æŽ¥ç´§è·Ÿç€ä¸Šä¸€é¡µå¼€å§‹ã€‚
\cls{report} é»˜è®¤ä¸º \texttt{openany}ï¼Œ\cls{book} é»˜è®¤ä¸º \texttt{openright}ã€‚å¯¹ \cls{article} æ—&nbsp;æ•ˆã€‚
\item[\texttt{landscape}] \quad æŒ‡å®šæ¨ªå‘æŽ’ç‰ˆã€‚é»˜è®¤ä¸ºçºµå‘ã€‚
\item[\texttt{titlepage, notitlepage}] æŒ‡å®šæ&nbsp;‡é¢˜å‘½ä»¤ \cmd{maketitle} æ˜¯å¦ç”Ÿæˆå•ç‹¬çš„æ&nbsp;‡é¢˜é¡µã€‚
\cls{article} é»˜è®¤ä¸º \texttt{notitlepage}ï¼Œ\cls{report} å’Œ \cls{book} é»˜è®¤ä¸º \texttt{titlepage}ã€‚
\item[\texttt{fleqn}] \quad ä»¤è¡Œé—´å…¬å¼å·¦å¯¹é½ã€‚é»˜è®¤ä¸ºå±…ä¸­å¯¹é½ã€‚
\item[\texttt{leqno}] \quad å°†å…¬å¼ç¼–å·æ”¾åœ¨å·¦è¾¹ã€‚é»˜è®¤ä¸ºå³è¾¹ã€‚
\item[\texttt{draft, final}] \quad æŒ‡å®šè‰ç¨¿/ç»ˆç¨¿æ¨¡å¼ã€‚
è‰ç¨¿æ¨¡å¼ä¸‹ï¼Œæ–­è¡Œä¸è‰¯ï¼ˆæº¢å‡ºï¼‰çš„åœ°æ–¹ä¼šåœ¨è¡Œå°¾æ·»åŠ&nbsp;ä¸€ä¸ªé»‘è‰²æ–¹å—ï¼›æ’å›¾ã€è¶…é“¾æŽ¥ç­‰åŠŸèƒ½ä¹Ÿä¼šå—è¿™ä¸€ç»„é€‰é¡¹å½±å“ï¼Œå…·ä½“è§åŽæ–‡ã€‚é»˜è®¤ä¸º \texttt{final}ã€‚
\end{description}

\subsection{å®åŒ…}\label{subsec:packages}

\cmdindex{usepackage}
\pinyinindex{hongbao}{å®åŒ…}
\pinyinindex{xuanxiang}{é€‰é¡¹ï¼ˆå®åŒ…/æ–‡æ¡£ç±»ï¼‰}
åœ¨ä½¿ç”¨ \LaTeX{} æ—¶ï¼Œæ—¶å¸¸éœ€è¦ä¾èµ–ä¸€äº›æ‰©å±•æ¥å¢žå¼ºæˆ–è¡¥å…… \LaTeX{} çš„åŠŸèƒ½ï¼Œæ¯”å¦‚æŽ’ç‰ˆå¤æ‚çš„è¡¨æ&nbsp;¼ã€æ’å…¥å›¾ç‰‡ã€å¢žåŠ&nbsp;é¢œè‰²ç”šè‡³è¶…é“¾æŽ¥ç­‰ç­‰ã€‚
è¿™äº›æ‰©å±•ç§°ä¸º\textbf{å®åŒ…}ã€‚è°ƒç”¨å®åŒ…çš„æ–¹æ³•éžå¸¸ç±»ä¼¼è°ƒç”¨æ–‡æ¡£ç±»çš„æ–¹æ³•ï¼š
\begin{command}
\cmd{usepackage}\oarg{options}\marg{package-name}
\end{command}

\cmd{usepackage}~å¯ä»¥ä¸€æ¬¡æ€§è°ƒç”¨å¤šä¸ªå®åŒ…ï¼Œåœ¨ \Arg{package-name} ä¸­ç”¨é€—å·éš”å¼€ã€‚è¿™ç§ç”¨æ³•ä¸€èˆ¬ä¸è¦æŒ‡å®šé€‰é¡¹%
\footnote{ä½¿ç”¨å¤šä¸ªå®åŒ…æ—¶æŒ‡å®šé€‰é¡¹ï¼Œç›¸å½“äºŽç»™æ¯ä¸ªå®åŒ…æŒ‡å®šåŒæ&nbsp;·çš„é€‰é¡¹ã€‚å¦‚æžœæœ‰æŸä¸ªå®åŒ…ä¸èƒ½è¯†åˆ«æŒ‡å®šçš„é€‰é¡¹ï¼Œåˆ™ä¼šå‡ºé”™ã€‚}ï¼š
\begin{verbatim}
% ä¸€æ¬¡æ€§è°ƒç”¨ä¸‰ä¸ªæŽ’ç‰ˆè¡¨æ&nbsp;¼å¸¸ç”¨çš„å®åŒ…
\usepackage{tabularx, makecell, multirow}
\end{verbatim}

é™„å½• \ref{sec:pkg-list} æ±‡æ€»äº†å¸¸ç”¨çš„ä¸€äº›å®åŒ…ã€‚æˆ‘ä»¬åœ¨æ‰‹å†ŒæŽ¥ä¸‹æ¥çš„ç«&nbsp;èŠ‚ä¸­ï¼Œä¹Ÿä¼šç©¿æ’ä»‹ç»ä¸€äº›æœ€å¸¸ç”¨çš„å®åŒ…çš„ä½¿ç”¨æ–¹æ³•ã€‚

åœ¨ä½¿ç”¨å®åŒ…å’Œæ–‡æ¡£ç±»ä¹‹å‰ï¼Œä¸€å®šè¦é¦–å…ˆç¡®è®¤å®ƒä»¬æ˜¯å¦å®‰è£…åœ¨ä½&nbsp;çš„è®¡ç®—æœºä¸­ï¼Œå¦åˆ™ \cmd{use\-package} ç­‰å‘½ä»¤ä¼šæŠ¥é”™è¯¯ã€‚
è¯¦è§é™„å½• \ref{sec:pkg-manager}ã€‚

å®åŒ…ï¼ˆåŒ…æ‹¬å‰é¢æ‰€è¯´çš„æ–‡æ¡£ç±»ï¼‰å¯èƒ½å®šä¹‰äº†è®¸å¤šå‘½ä»¤å’ŒçŽ¯å¢ƒï¼Œæˆ–è€…ä¿®æ”¹äº† \LaTeX{} å·²æœ‰çš„å‘½ä»¤å’ŒçŽ¯å¢ƒã€‚
å®ƒä»¬çš„ç”¨æ³•è¯´æ˜Žè®°åœ¨ç›¸åº”å®åŒ…å’Œæ–‡æ¡£ç±»çš„å¸®åŠ©æ–‡æ¡£ã€‚åœ¨ Windows å‘½ä»¤æç¤ºç¬¦æˆ–è€… Linux ç»ˆç«¯ä¸‹è¾“å…¥å‘½ä»¤å¯æŸ¥é˜…ç›¸åº”æ–‡æ¡£ï¼š
\begin{command}
\texttt{texdoc} \Arg{pkg-name}
\end{command}

å…¶ä¸­ \Arg{pkg-name} æ˜¯å®åŒ…æˆ–è€…æ–‡æ¡£ç±»çš„åç§°ã€‚æ›´å¤šèŽ·å¾—å¸®åŠ©çš„æ–¹æ³•è§é™„å½• \ref{sec:texdoc}ã€‚

\section{\LaTeX{} ç”¨åˆ°çš„æ–‡ä»¶ä¸€è§ˆ}\label{sec:latex-files}

é™¤äº†æºä»£ç&nbsp;æ–‡ä»¶ \texttt{.tex} ä»¥å¤–ï¼Œæˆ‘ä»¬åœ¨ä½¿ç”¨ \LaTeX{} æ—¶è¿˜å¯èƒ½æŽ¥è§¦åˆ°å„ç§æ&nbsp;¼å¼çš„æ–‡ä»¶ã€‚
æœ¬èŠ‚ç®€å•ä»‹ç»ä¸€ä¸‹åœ¨ä½¿ç”¨ \LaTeX{} æ—¶èƒ½å¤Ÿç»å¸¸è§åˆ°çš„æ–‡ä»¶ã€‚

æ¯ä¸ªå®åŒ…å’Œæ–‡æ¡£ç±»éƒ½æ˜¯å¸¦ç‰¹å®šæ‰©å±•åçš„æ–‡ä»¶ï¼Œé™¤æ­¤ä¹‹å¤–ä¹Ÿæœ‰ä¸€äº›æ–‡ä»¶å‡ºçŽ°äºŽ \LaTeX{} æ¨¡æ¿ä¸­ï¼š
\begin{description}
  \item[\texttt{.sty}] å®åŒ…æ–‡ä»¶ã€‚å®åŒ…çš„åç§°ä¸Žæ–‡ä»¶åä¸€è‡´ã€‚
  \item[\texttt{.cls}] æ–‡æ¡£ç±»æ–‡ä»¶ã€‚æ–‡æ¡£ç±»åç§°ä¸Žæ–‡ä»¶åä¸€è‡´ã€‚
  \item[\texttt{.bib}] \hologo{BibTeX} å‚è€ƒæ–‡çŒ®æ•°æ®åº“æ–‡ä»¶ã€‚
  \item[\texttt{.bst}] \hologo{BibTeX} ç”¨åˆ°çš„å‚è€ƒæ–‡çŒ®æ&nbsp;¼å¼æ¨¡æ¿ã€‚è¯¦è§ \ref{subsec:bibtex-use} å°èŠ‚ã€‚
\end{description}

\LaTeX{} åœ¨ç¼–è¯‘è¿‡ç¨‹ä¸­é™¤äº†ç”Ÿæˆ \texttt{.dvi} æˆ– \texttt{.pdf} æ&nbsp;¼å¼çš„æ–‡æ¡£å¤–%
\footnote{\hologo{XeLaTeX} è¿˜å¯èƒ½ç”Ÿæˆ \texttt{.xdv} æ–‡ä»¶ã€‚}ï¼Œè¿˜å¯èƒ½ä¼šç”Ÿæˆç›¸å½“å¤šçš„è¾…åŠ©æ–‡ä»¶å’Œæ—¥å¿—ã€‚
ä¸€äº›åŠŸèƒ½å¦‚äº¤å‰å¼•ç”¨ã€å‚è€ƒæ–‡çŒ®ã€ç›®å½•ã€ç´¢å¼•ç­‰ï¼Œéœ€è¦å…ˆé€šè¿‡ç¼–è¯‘ç”Ÿæˆè¾…åŠ©æ–‡ä»¶ï¼Œ
ç„¶åŽå†æ¬¡ç¼–è¯‘æ—¶è¯»å…¥è¾…åŠ©æ–‡ä»¶å¾—åˆ°æ­£ç¡®çš„ç»“æžœï¼Œæ‰€ä»¥å¤æ‚çš„ \LaTeX{} æºä»£ç&nbsp;å¯èƒ½è¦ç¼–è¯‘å¤šæ¬¡ï¼š
\begin{description}
  \item[\texttt{.log}] æŽ’ç‰ˆå¼•æ“Žç”Ÿæˆçš„æ—¥å¿—æ–‡ä»¶ï¼Œä¾›æŽ’æŸ¥é”™è¯¯ä½¿ç”¨ã€‚
  \item[\texttt{.aux}] \LaTeX{} ç”Ÿæˆçš„ä¸»è¾…åŠ©æ–‡ä»¶ï¼Œè®°å½•äº¤å‰å¼•ç”¨ã€ç›®å½•ã€å‚è€ƒæ–‡çŒ®çš„å¼•ç”¨ç­‰ã€‚
  \item[\texttt{.toc}] \LaTeX{} ç”Ÿæˆçš„ç›®å½•è®°å½•æ–‡ä»¶ã€‚
  \item[\texttt{.lof}] \LaTeX{} ç”Ÿæˆçš„å›¾ç‰‡ç›®å½•è®°å½•æ–‡ä»¶ã€‚
  \item[\texttt{.lot}] \LaTeX{} ç”Ÿæˆçš„è¡¨æ&nbsp;¼ç›®å½•è®°å½•æ–‡ä»¶ã€‚
  \item[\texttt{.bbl}] \hologo{BibTeX} ç”Ÿæˆçš„å‚è€ƒæ–‡çŒ®è®°å½•æ–‡ä»¶ã€‚
  \item[\texttt{.blg}] \hologo{BibTeX} ç”Ÿæˆçš„æ—¥å¿—æ–‡ä»¶ã€‚
  \item[\texttt{.idx}] \LaTeX{} ç”Ÿæˆçš„ä¾› makeindex å¤„ç†çš„ç´¢å¼•è®°å½•æ–‡ä»¶ã€‚
  \item[\texttt{.ind}] makeindex å¤„ç† \texttt{.idx} ç”Ÿæˆçš„ç”¨äºŽæŽ’ç‰ˆçš„æ&nbsp;¼å¼åŒ–ç´¢å¼•æ–‡ä»¶ã€‚
  \item[\texttt{.ilg}] makeindex ç”Ÿæˆçš„æ—¥å¿—æ–‡ä»¶ã€‚
  \item[\texttt{.out}] \pkg{hyperref} å®åŒ…ç”Ÿæˆçš„ PDF ä¹¦ç­¾è®°å½•æ–‡ä»¶ã€‚
\end{description}

\section{æ–‡ä»¶çš„ç»„ç»‡æ–¹å¼}\label{sec:latex-multi-files}

å½“ç¼–å†™é•¿ç¯‡æ–‡æ¡£æ—¶ï¼Œä¾‹å¦‚å½“ç¼–å†™ä¹¦ç±ã€æ¯•ä¸šè®ºæ–‡æ—¶ï¼Œå•ä¸ªæºæ–‡ä»¶ä¼šä½¿ä¿®æ”¹ã€æ&nbsp;¡å¯¹å˜å¾—ååˆ†å›°éš¾ã€‚
å°†æºæ–‡ä»¶åˆ†å‰²æˆè‹¥å¹²ä¸ªæ–‡ä»¶ï¼Œä¾‹å¦‚å°†æ¯ç«&nbsp;å†…å®¹å•ç‹¬å†™åœ¨ä¸€ä¸ªæ–‡ä»¶ä¸­ï¼Œä¼šå¤§å¤§ç®€åŒ–ä¿®æ”¹å’Œæ&nbsp;¡å¯¹çš„å·¥ä½œã€‚
å¯å‚è€ƒæºä»£ç&nbsp; \ref{code:book-struct} çš„å†™æ³•ã€‚

\cmdindex{include}
\LaTeX{} æä¾›äº†å‘½ä»¤ \cmd{include} ç”¨æ¥åœ¨æºä»£ç&nbsp;é‡Œæ’å…¥æ–‡ä»¶ï¼š
\begin{command}
\cmd{include}\marg{filename}
\end{command}
\Arg{filename} ä¸ºæ–‡ä»¶åï¼ˆä¸å¸¦ \texttt{.tex} æ‰©å±•åï¼‰%
\footnote{\LaTeX{} 2020-10-01 ç‰ˆæœ¬ä¹‹åŽå…è®¸æ·»åŠ&nbsp;æ‰©å±•åã€‚}ï¼Œ
å¦‚æžœå’Œè¦ç¼–è¯‘çš„ä¸»æ–‡ä»¶ä¸åœ¨ä¸€ä¸ªç›®å½•ä¸­ï¼Œåˆ™è¦åŠ&nbsp;ä¸Šç›¸å¯¹æˆ–ç»å¯¹è·¯å¾„ï¼Œä¾‹å¦‚ï¼š
\begin{verbatim}
\include{chapters/file} % ç›¸å¯¹è·¯å¾„
\include{/home/Bob/file} % *nixï¼ˆåŒ…å« Linuxã€macOSï¼‰ç»å¯¹è·¯å¾„
\include{D:/file} % Windows ç»å¯¹è·¯å¾„ï¼Œç”¨æ­£æ–œçº¿
\end{verbatim}

\cmdindex{input}
å€¼å¾—æ³¨æ„çš„æ˜¯ \cmd{include} åœ¨è¯»å…¥ \Arg{filename} ä¹‹å‰ä¼šå¦èµ·ä¸€é¡µã€‚æœ‰çš„æ—¶å€™æˆ‘ä»¬å¹¶ä¸éœ€è¦è¿™æ&nbsp;·ï¼Œè€Œæ˜¯ç”¨
\cmd{input} å‘½ä»¤ï¼Œå®ƒçº¯ç²¹æ˜¯æŠŠæ–‡ä»¶é‡Œçš„å†…å®¹æ’å…¥ï¼š
\begin{command}
\cmd{input}\marg{filename}
\end{command}

å½“å¯¼è¨€åŒºå†…å®¹è¾ƒå¤šæ—¶ï¼Œå¸¸å¸¸å°†å…¶å•ç‹¬æ”¾ç½®åœ¨ä¸€ä¸ª \texttt{.tex} æ–‡ä»¶ä¸­ï¼Œå†ç”¨ \cmd{input} å‘½ä»¤æ’å…¥ã€‚
å¤æ‚çš„å›¾ã€è¡¨ã€ä»£ç&nbsp;ç­‰ä¹Ÿä¼šç”¨ç±»ä¼¼çš„æ‰‹æ®µå¤„ç†ã€‚

\cmdindex{includeonly}
\LaTeX{} è¿˜æä¾›äº†ä¸€ä¸ª \cmd{includeonly} å‘½ä»¤æ¥ç»„ç»‡æ–‡ä»¶ï¼Œç”¨äºŽ\textbf{å¯¼è¨€åŒº}ï¼ŒæŒ‡å®šåªè½½å…¥æŸäº›æ–‡ä»¶ã€‚
å¯¼è¨€åŒºä½¿ç”¨äº† \cmd{includeonly} åŽï¼Œæ­£æ–‡ä¸­ä¸åœ¨å…¶åˆ—è¡¨èŒƒå›´çš„ \cmd{include} å‘½ä»¤ä¸ä¼šèµ·æ•ˆï¼š
\begin{command}
\cmd{includeonly}\marg*{\Arg{filename1},\Arg{filename2},\ldots}
\end{command}

éœ€è¦æ³¨æ„çš„æ˜¯ï¼Œä½¿ç”¨ \cmd{include} å’Œ \cmd{input} å‘½ä»¤è½½å…¥çš„æ–‡ä»¶åæœ€å¥½ä¸è¦åŠ&nbsp;ç©ºæ&nbsp;¼å’Œç‰¹æ®Šå­—ç¬¦ï¼Œä¹Ÿå°½é‡
é¿å…ä½¿ç”¨ä¸­æ–‡åï¼Œå¦åˆ™å¾ˆå¯èƒ½ä¼šå‡ºé”™%
\footnote{\LaTeX{} åœ¨ 2019 åˆ° 2020 å¹´é—´åšå‡ºäº†ä¸€ç³»åˆ—æ›´æ–°ï¼Œæ–‡ä»¶åä¸­åŒ…å«æ“ä½œç³»ç»Ÿæ‰€å…è®¸çš„å­—ç¬¦æ—¶
å‡ä¸å†å‡ºé”™ã€‚ä½†ä¿é™©èµ·è§ï¼Œä»ç„¶å»ºè®®ä½¿ç”¨æ‹‰ä¸å­—æ¯ã€æ•°å­—ã€è¿žå­—ç¬¦ç­‰è¾ƒä¸ºå®‰å…¨çš„å­—ç¬¦ç»„æˆæ–‡ä»¶åã€‚}ã€‚

\pkgindex{syntonly}
æœ€åŽä»‹ç»ä¸€ä¸ªå®žç”¨çš„å·¥å…·å®åŒ… \pkg{syntonly}ã€‚åŠ&nbsp;è½½è¿™ä¸ªå®åŒ…åŽï¼Œåœ¨å¯¼è¨€åŒºä½¿ç”¨ \cmd{syntaxonly} å‘½ä»¤ï¼Œ
å¯ä»¤ \LaTeX{} ç¼–è¯‘åŽä¸ç”Ÿæˆ DVI æˆ–è€… PDF æ–‡æ¡£ï¼ŒåªæŽ’æŸ¥é”™è¯¯ï¼Œç¼–è¯‘é€Ÿåº¦ä¼šå¿«ä¸å°‘ï¼š
\begin{verbatim}
\usepackage{syntonly}
\syntaxonly
\end{verbatim}

å¦‚æžœæƒ³ç”Ÿæˆæ–‡æ¡£ï¼Œåˆ™ç”¨ \texttt\% æ³¨é‡ŠæŽ‰ \cmd{syntaxonly} å‘½ä»¤å³å¯ã€‚

\section{\LaTeX{} å’Œ \TeX{} ç›¸å…³çš„æœ¯è¯­å’Œæ¦‚å¿µ}\label{sec:concepts}

\pinyinindex{paibanyinqing}{æŽ’ç‰ˆå¼•æ“Ž}
\index{pdfTeX@\hologo{pdfTeX}}
\index{XeTeX@\hologo{XeTeX}}
åœ¨æœ¬ç«&nbsp;çš„æœ€åŽæœ‰å¿…è¦æ¾„æ¸…å‡&nbsp;ä¸ªæ¦‚å¿µï¼š
\begin{description}
  \item[å¼•æ“Ž] å…¨ç§°ä¸ºæŽ’ç‰ˆå¼•æ“Žï¼Œæ˜¯ç¼–è¯‘æºä»£ç&nbsp;å¹¶ç”Ÿæˆæ–‡æ¡£çš„ç¨‹åºï¼Œå¦‚ \hologo{pdfTeX}ã€\hologo{XeTeX} ç­‰ã€‚æœ‰æ—¶ä¹Ÿç§°ä¸ºç¼–è¯‘å™¨ã€‚
  \item[æ&nbsp;¼å¼] æ˜¯å®šä¹‰äº†ä¸€ç»„å‘½ä»¤çš„ä»£ç&nbsp;é›†ã€‚\LaTeX{} å°±æ˜¯æœ€å¹¿æ³›åº”ç”¨çš„ä¸€ä¸ªæ&nbsp;¼å¼ï¼Œé«˜å¾·çº³æœ¬äººè¿˜ç¼–å†™äº†ä¸€ä¸ªç®€å•çš„ \hologo{plainTeX} æ&nbsp;¼å¼ï¼Œ
  æ²¡æœ‰å®šä¹‰è¯¸å¦‚ \cmd{document\-class} å’Œ \cmd{section} ç­‰ç­‰å‘½ä»¤ã€‚
  \item[ç¼–è¯‘å‘½ä»¤] æ˜¯å®žé™…è°ƒç”¨çš„ã€ç»“åˆäº†å¼•æ“Žå’Œæ&nbsp;¼å¼çš„å‘½ä»¤ã€‚å¦‚ \texttt{xelatex} å‘½ä»¤æ˜¯ç»“åˆ \hologo{XeTeX}
  å¼•æ“Žå’Œ \LaTeX{} æ&nbsp;¼å¼çš„ä¸€ä¸ªç¼–è¯‘å‘½ä»¤ã€‚
\end{description}
å¸¸è§çš„å¼•æ“Žã€æ&nbsp;¼å¼å’Œç¼–è¯‘å‘½ä»¤çš„å…³ç³»æ€»ç»“äºŽè¡¨ \ref{tbl:engine-format-command}ã€‚

\begin{table}[htp]
  \centering
  \caption{\TeX{} å¼•æ“Žã€æ&nbsp;¼å¼åŠå…¶å¯¹åº”çš„ç¼–è¯‘å‘½ä»¤ã€‚}
  \label{tbl:engine-format-command}
  \begin{tabular}{cccc}
   \hline
                        &amp; \textbf{æ–‡æ¡£æ&nbsp;¼å¼} &amp; \textbf{\hologo{plainTeX} æ&nbsp;¼å¼} &amp; \textbf{\LaTeX{} æ&nbsp;¼å¼} \\
   \hline
   \TeX{} å¼•æ“Ž           &amp; DVI       &amp; \texttt{tex}     &amp; N/A \\
   \hologo{pdfTeX} å¼•æ“Ž &amp; DVI       &amp; \texttt{etex}    &amp; \texttt{latex} \\
                        &amp; PDF       &amp; \texttt{pdftex}  &amp; \texttt{pdflatex} \\
   \hologo{XeTeX} å¼•æ“Ž  &amp; PDF       &amp; \texttt{xetex}   &amp; \texttt{xelatex} \\
   \hologo{LuaTeX} å¼•æ“Ž &amp; PDF       &amp; \texttt{luatex}  &amp; \texttt{lualatex} \\
   \hline
  \end{tabular}
\end{table}

\texttt{latex} ç¼–è¯‘å‘½ä»¤å’Œ \LaTeX{} æ&nbsp;¼å¼å¾€å¾€å®¹æ˜“æ··æ·†ï¼Œåœ¨è®¨è®ºå…³äºŽ \LaTeX{} çš„æ—¶å€™éœ€è¦æ˜Žç¡®ã€‚
ä¸ºé¿å…æ··æ·†ï¼Œæœ¬æ‰‹å†Œä¸­çš„ \LaTeX{} ä¸€å¾‹æŒ‡çš„æ˜¯\textbf{æ&nbsp;¼å¼}ï¼Œ\textbf{ç¼–è¯‘å‘½ä»¤}åˆ™ç”¨ç­‰å®½å­—ä½“ \texttt{latex} è¡¨ç¤ºã€‚

åœ¨æ­¤ä»‹ç»ä¸€ä¸‹å‡&nbsp;ä¸ªç¼–è¯‘å‘½ä»¤çš„åŸºæœ¬ç‰¹ç‚¹ï¼š
\begin{description}
  \item[\texttt{latex}]
  è™½ç„¶åä¸º \texttt{latex} å‘½ä»¤ï¼Œåº•å±‚è°ƒç”¨çš„å¼•æ“Žå…¶å®žæ˜¯ \hologo{pdfTeX}ã€‚
  è¯¥å‘½ä»¤ç”Ÿæˆ \texttt{dvi}ï¼ˆDevice Independentï¼‰æ&nbsp;¼å¼çš„æ–‡æ¡£ï¼Œ
  ç”¨ \texttt{dvipdfmx} å‘½ä»¤å¯ä»¥å°†å…¶è½¬ä¸º \texttt{pdf}ã€‚
  \item[\texttt{pdflatex}]
  åº•å±‚è°ƒç”¨çš„å¼•æ“Žä¹Ÿæ˜¯ \hologo{pdfTeX}ï¼Œå¯ä»¥ç›´æŽ¥ç”Ÿæˆ \texttt{pdf} æ&nbsp;¼å¼çš„æ–‡æ¡£ã€‚
  \item[\texttt{xelatex}]
  åº•å±‚è°ƒç”¨çš„å¼•æ“Žæ˜¯ \hologo{XeTeX}ï¼Œæ”¯æŒ UTF-8 ç¼–ç&nbsp;å’Œå¯¹ TrueType/OpenType å­—ä½“çš„è°ƒç”¨ã€‚
  å½“å‰è¾ƒä¸ºæ–¹ä¾¿çš„ä¸­æ–‡æŽ’ç‰ˆè§£å†³æ–¹æ¡ˆåŸºäºŽ \texttt{xelatex}ï¼Œè¯¦è§ \ref{sec:chinese} èŠ‚ã€‚
  \item[\texttt{lualatex}]
  åº•å±‚è°ƒç”¨çš„å¼•æ“Žæ˜¯ \hologo{LuaTeX}\footnote{ä»Ž \TeX{} Live 2020 å¼€å§‹ï¼Œ\texttt{lualatex} è°ƒç”¨çš„
  å¼•æ“Žå˜ä¸º LuaHB\TeXã€‚LuaHB\TeX{} æ˜¯ \hologo{LuaTeX} ä¸Ž HarfBuzz åº“çš„ç»“åˆï¼Œå¯¹å¤æ‚è¯­è¨€çš„æ”¯æŒæ›´å¥½ã€‚}ï¼Œ
  è¿™ä¸ªå¼•æ“Žåœ¨ \hologo{pdfTeX} å¼•æ“ŽåŸºç¡€ä¸Šå‘å±•è€Œæ¥ï¼Œ
  é™¤äº†æ”¯æŒ UTF-8 ç¼–ç&nbsp;å’Œå¯¹ TrueType/OpenType å­—ä½“çš„è°ƒç”¨å¤–ï¼Œè¿˜æ”¯æŒé€šè¿‡ Lua è¯­è¨€æ‰©å±• \TeX{} çš„åŠŸèƒ½ã€‚
  \texttt{lualatex} ç¼–è¯‘å‘½ä»¤ä¸‹çš„ä¸­æ–‡æŽ’ç‰ˆæ”¯æŒéœ€è¦å€ŸåŠ© \pkg{luatexja} å®åŒ…ã€‚
\end{description}

\endinput
</pre></body></html>