<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\chapter{æ–‡æ¡£å…ƒç´&nbsp;}\label{chap:elements}
\addtocontents{los}{\protect\addvspace{10pt}}

\begin{intro}
åœ¨çŸ¥é“äº†å¦‚ä½•è¾“å…¥æ–‡å­—åŽï¼Œæˆ‘ä»¬å°†åœ¨æœ¬ç«&nbsp;äº†è§£ä¸€ä¸ªç»“æž„åŒ–çš„æ–‡æ¡£æ‰€ä¾èµ–çš„å„ç§å…ƒç´&nbsp;â€”â€”ç«&nbsp;èŠ‚ã€ç›®å½•ã€åˆ—è¡¨ã€å›¾è¡¨ã€äº¤å‰å¼•ç”¨ã€è„šæ³¨ç­‰ç­‰ã€‚
\end{intro}

\section{ç«&nbsp;èŠ‚å’Œç›®å½•}\label{sec:secs}

\subsection{ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜}\label{subsec:secs}

\cmdindex{part,chapter,section,subsection,subsubsection,paragraph,subparagraph}
\clsindex{article,report,book}

ä¸€ç¯‡ç»“æž„åŒ–çš„ã€æ¡ç†æ¸…æ™°æ–‡æ¡£ä¸€å®šæ˜¯å±‚æ¬¡åˆ†æ˜Žçš„ï¼Œé€šè¿‡ä¸åŒçš„å‘½ä»¤åˆ†å‰²ä¸ºç«&nbsp;ã€èŠ‚ã€å°èŠ‚ã€‚ä¸‰ä¸ªæ&nbsp;‡å‡†æ–‡æ¡£ç±» \cls{article}ã€\cls{report} å’Œ \cls{book}%
\footnote{åƒä¸‡æ³¨æ„æ˜¯\textbf{æ&nbsp;‡å‡†æ–‡æ¡£ç±»}ï¼Œå…¶å®ƒæ–‡æ¡£ç±»ï¼Œå¦‚æžœä¸æ˜¯ä»Žæ&nbsp;‡å‡†æ–‡æ¡£ç±»è¡ç”Ÿè€Œæ¥ï¼Œ
å¾ˆå¯èƒ½æ²¡æœ‰å®šä¹‰æˆ–åªå®šä¹‰äº†ä¸€éƒ¨åˆ†å‘½ä»¤ï¼Œå¦‚ \cls{beamer} æˆ– \cls{moderncv} ç­‰ã€‚}%
æä¾›äº†åˆ’åˆ†ç«&nbsp;èŠ‚çš„å‘½ä»¤ï¼š
\begin{command}
\cmd{chapter}\marg{title} \quad
\cmd{section}\marg{title} \quad
\cmd{subsection}\marg{title} \\
\cmd{subsubsection}\marg{title} \quad
\cmd{paragraph}\marg{title} \quad
\cmd{subparagraph}\marg{title}
\end{command}
å…¶ä¸­ \cmd{chapter} \textbf{åªåœ¨ \cls{report} å’Œ \cls{book} æ–‡æ¡£ç±»æœ‰å®šä¹‰}ã€‚è¿™äº›å‘½ä»¤ç”Ÿæˆç«&nbsp;èŠ‚æ&nbsp;‡é¢˜ï¼Œå¹¶èƒ½å¤Ÿè‡ªåŠ¨ç¼–å·ã€‚
é™¤æ­¤ä¹‹å¤– \LaTeX{} è¿˜æä¾›äº† \cmd{part} å‘½ä»¤ï¼Œç”¨æ¥å°†æ•´ä¸ªæ–‡æ¡£åˆ†å‰²ä¸ºå¤§çš„åˆ†å—ï¼Œä½†ä¸å½±å“ \cmd{chapter} æˆ– \cmd{section} ç­‰çš„ç¼–å·ã€‚

ä¸Šè¿°å‘½ä»¤é™¤äº†ç”Ÿæˆå¸¦ç¼–å·çš„æ&nbsp;‡é¢˜ä¹‹å¤–ï¼Œè¿˜å‘ç›®å½•ä¸­æ·»åŠ&nbsp;æ¡ç›®ï¼Œå¹¶å½±å“é¡µçœ‰é¡µè„šçš„å†…å®¹ï¼ˆè¯¦è§ \ref{sec:pagestyle} èŠ‚ï¼‰ã€‚æ¯ä¸ªå‘½ä»¤æœ‰ä¸¤ç§å˜ä½“ï¼š
\begin{itemize}
  \item å¸¦å¯é€‰å‚æ•°çš„å˜ä½“ï¼š\cmd{section}\oarg{short title}\marg{title}\par
  æ&nbsp;‡é¢˜ä½¿ç”¨ \Arg{title} å‚æ•°ï¼Œåœ¨ç›®å½•å’Œé¡µçœ‰é¡µè„šä¸­ä½¿ç”¨ \Arg{short title} å‚æ•°ï¼›
  \item å¸¦æ˜Ÿå·çš„å˜ä½“ï¼š\cmd{section*}\marg{title}\par
  æ&nbsp;‡é¢˜ä¸å¸¦ç¼–å·ï¼Œä¹Ÿä¸ç”Ÿæˆç›®å½•é¡¹å’Œé¡µçœ‰é¡µè„šã€‚
\end{itemize}

è¾ƒä½Žå±‚æ¬¡å¦‚ \cmd{paragraph} å’Œ \cmd{subparagraph} å³ä½¿ä¸ç”¨å¸¦æ˜Ÿå·çš„å˜ä½“ï¼Œç”Ÿæˆçš„æ&nbsp;‡é¢˜é»˜è®¤ä¹Ÿä¸å¸¦ç¼–å·ï¼Œäº‹å®žä¸Šï¼Œé™¤ \cmd{part} å¤–ï¼š
\begin{itemize}
  \item \cls{article} æ–‡æ¡£ç±»å¸¦ç¼–å·çš„å±‚çº§ä¸º \cmd{section}ã€\cmd{subsection}ã€\cmd{sub\-sub\-section} ä¸‰çº§ï¼›
  \item \cls{report} å’Œ \cls{book} æ–‡æ¡£ç±»å¸¦ç¼–å·çš„å±‚çº§ä¸º \cmd{chapter}ã€\cmd{section}ã€\cmd{sub\-section} ä¸‰çº§ã€‚
\end{itemize}
å¯¹æ­¤çš„è¯¦ç»†è§£é‡Šå’Œè°ƒæ•´æ–¹æ³•è§ \ref{subsec:latex-counts} å°èŠ‚ã€‚

\pkgindex{titlesec}
\LaTeX{} åŠæ&nbsp;‡å‡†æ–‡æ¡£ç±»å¹¶æœªæä¾›ä¸º \cmd{section} ç­‰ç«&nbsp;èŠ‚å‘½ä»¤å®šåˆ¶æ&nbsp;¼å¼çš„åŠŸèƒ½ï¼Œè¿™ä¸€åŠŸèƒ½ç”± \pkg{titlesec} å®åŒ…æä¾›ã€‚è¯¦æƒ…è¯·å‚è€ƒå®åŒ…çš„å¸®åŠ©æ–‡æ¡£ã€‚

\subsection{ç›®å½•}\label{sec:toc}

\cmdindex{tableofcontents}
\pkgindex{tocbibind,tocloft,titletoc}
åœ¨ \LaTeX{} ä¸­ç”Ÿæˆç›®å½•éžå¸¸å®¹æ˜“ï¼Œåªéœ€åœ¨åˆé€‚çš„åœ°æ–¹ä½¿ç”¨å‘½ä»¤ï¼š
\begin{command}
\cmd{tableofcontents}
\end{command}

è¿™ä¸ªå‘½ä»¤ä¼šç”Ÿæˆå•ç‹¬çš„ä¸€ç«&nbsp;ï¼ˆ\cls{report}/\cls{book}ï¼‰æˆ–ä¸€èŠ‚ï¼ˆ\cls{article}ï¼‰ï¼Œæ&nbsp;‡é¢˜é»˜è®¤ä¸ºâ€œContentsâ€ï¼Œå¯é€šè¿‡ \ref{sec:latex-settings} èŠ‚ç»™å‡ºçš„æ–¹æ³•å®šåˆ¶æ&nbsp;‡é¢˜ã€‚
\cmd{tableof\-contents} ç”Ÿæˆçš„ç«&nbsp;èŠ‚é»˜è®¤ä¸å†™å…¥ç›®å½•ï¼ˆ\cmd{section*} æˆ– \cmd{chapter*}ï¼‰ï¼Œå¯ä½¿ç”¨ \pkg{tocbibind} ç­‰å®åŒ…ä¿®æ”¹è®¾ç½®ã€‚

æ­£ç¡®ç”Ÿæˆç›®å½•é¡¹ï¼Œä¸€èˆ¬éœ€è¦ç¼–è¯‘ä¸¤æ¬¡æºä»£ç&nbsp;ã€‚

\cmdindex{addcontentsline}
æœ‰æ—¶æˆ‘ä»¬ä½¿ç”¨äº† \cmd{chapter*} æˆ– \cmd{section*} è¿™æ&nbsp;·ä¸ç”Ÿæˆç›®å½•é¡¹çš„ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜å‘½ä»¤ï¼Œ
è€Œåˆæƒ³æ‰‹åŠ¨ç”Ÿæˆè¯¥ç«&nbsp;èŠ‚çš„ç›®å½•é¡¹ï¼Œå¯ä»¥åœ¨æ&nbsp;‡é¢˜å‘½ä»¤åŽé¢ä½¿ç”¨ï¼š
\begin{command}
\cmd{addcontentsline}\marg*{toc}\marg{level}\marg{title}
\end{command}

å…¶ä¸­ \Arg{level} ä¸ºç«&nbsp;èŠ‚å±‚æ¬¡ \texttt{chapter} æˆ– \texttt{section} ç­‰ï¼Œ\Arg{title} ä¸ºå‡ºçŽ°äºŽç›®å½•é¡¹çš„ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜ã€‚

\pkg{titletoc}ã€\pkg{tocloft} ç­‰å®åŒ…æä¾›äº†å…·ä½“å®šåˆ¶ç›®å½•é¡¹æ&nbsp;¼å¼çš„åŠŸèƒ½ï¼Œè¯¦æƒ…è¯·å‚è€ƒå®åŒ…çš„å¸®åŠ©æ–‡æ¡£ã€‚

\subsection{æ–‡æ¡£ç»“æž„çš„åˆ’åˆ†}\label{sec:matters}

\cmdindex{appendix}
æ‰€æœ‰æ&nbsp;‡å‡†æ–‡æ¡£ç±»éƒ½æä¾›äº†ä¸€ä¸ª \cmd{appendix} å‘½ä»¤å°†æ­£æ–‡å’Œé™„å½•åˆ†å¼€%
\footnote{æœ‰çš„å‚è€ƒæ–‡æ¡£å¯èƒ½ä½¿ç”¨ \cmd{begin}\marg*{appendix} \ldots{} \cmd{end}\marg*{appendix} è¿™æ&nbsp;·çš„å†™æ³•ï¼Œ
è™½ç„¶æœ‰æ•ˆï¼Œä½†å¹¶ä¸è§„èŒƒï¼Œåªè¦ä½¿ç”¨ \cmd{appendix} å‘½ä»¤å°±å¤Ÿäº†ã€‚}ï¼Œ
ä½¿ç”¨ \cmd{appendix} åŽï¼Œæœ€é«˜ä¸€çº§ç«&nbsp;èŠ‚æ”¹ä¸ºä½¿ç”¨æ‹‰ä¸å­—æ¯ç¼–å·ï¼Œä»Ž A å¼€å§‹ã€‚

\clsindex{book}
\cmdindex{frontmatter,mainmatter,backmatter}
\cls{book} æ–‡æ¡£ç±»è¿˜æä¾›äº†å‰è¨€ã€æ­£æ–‡ã€åŽè®°ç»“æž„çš„åˆ’åˆ†å‘½ä»¤ï¼š
\begin{description}
  \item[\cmd{frontmatter}] å‰è¨€éƒ¨åˆ†ï¼Œé¡µç&nbsp;ä½¿ç”¨å°å†™ç½—é©¬æ•°å­—ï¼›å…¶åŽçš„ \cmd{chapter} ä¸ç¼–å·ã€‚
  \item[\cmd{mainmatter}] æ­£æ–‡éƒ¨åˆ†ï¼Œé¡µç&nbsp;ä½¿ç”¨é˜¿æ‹‰ä¼¯æ•°å­—ï¼Œä»Ž 1 å¼€å§‹è®¡æ•°ï¼›å…¶åŽçš„ç«&nbsp;èŠ‚ç¼–å·æ­£å¸¸ã€‚
  \item[\cmd{backmatter}] åŽè®°éƒ¨åˆ†ï¼Œé¡µç&nbsp;æ&nbsp;¼å¼ä¸å˜ï¼Œç»§ç»­æ­£å¸¸è®¡æ•°ï¼›å…¶åŽçš„ \cmd{chapter} ä¸ç¼–å·ã€‚
\end{description}

\cmdindex{include}
ä»¥ä¸Šä¸‰ä¸ªå‘½ä»¤è¿˜å¯å’Œ \cmd{appendix} å‘½ä»¤ç»“åˆï¼Œç”Ÿæˆæœ‰å‰è¨€ã€æ­£æ–‡ã€é™„å½•ã€åŽè®°å››éƒ¨åˆ†çš„æ–‡æ¡£ã€‚
æºä»£ç&nbsp; \ref{code:book-struct} ç»“åˆ \ref{sec:latex-multi-files} èŠ‚çš„ \cmd{include} å‘½ä»¤
å’Œå…¶å®ƒä¸€äº›å‘½ä»¤ç¤ºæ„äº†ä¸€ä»½å®Œæ•´çš„æ–‡æ¡£ç»“æž„ã€‚

\begin{sourcecode}[htp]
\begin{Verbatim}
\documentclass{book}

% å¯¼è¨€åŒºï¼ŒåŠ&nbsp;è½½å®åŒ…å’Œå„é¡¹è®¾ç½®ï¼ŒåŒ…æ‹¬å‚è€ƒæ–‡çŒ®ã€ç´¢å¼•ç­‰
\usepackage{makeidx}        % è°ƒç”¨ makeidx å®åŒ…ï¼Œç”¨æ¥å¤„ç†ç´¢å¼•
\makeindex                  % å¼€å¯ç´¢å¼•çš„æ”¶é›†
\bibliographystyle{plain}   % æŒ‡å®šå‚è€ƒæ–‡çŒ®æ&nbsp;·å¼ä¸º plain

\begin{document}

\frontmatter         % å‰è¨€éƒ¨åˆ†
\maketitle           % æ&nbsp;‡é¢˜é¡µ
\include{preface}    % å‰è¨€ç«&nbsp;èŠ‚ preface.tex
\tableofcontents

\mainmatter          % æ­£æ–‡éƒ¨åˆ†
\include{chapter1}   % ç¬¬ä¸€ç«&nbsp; chapter1.tex
\include{chapter2}   % ç¬¬äºŒç«&nbsp; chapter2.tex
...
\appendix            % é™„å½•
\include{appendixA}  % é™„å½• A appendixA.tex
...

\backmatter          % åŽè®°éƒ¨åˆ†
\include{epilogue}   % åŽè®° epilogue.tex
\bibliography{books} % åˆ©ç”¨ BibTeX å·¥å…·ä»Žæ•°æ®åº“æ–‡ä»¶ books.bib ç”Ÿæˆå‚è€ƒæ–‡çŒ®
\printindex          % åˆ©ç”¨ makeindex å·¥å…·ç”Ÿæˆç´¢å¼•

\end{document}
\end{Verbatim}
\caption{\cls{book} æ–‡æ¡£ç±»çš„æ–‡æ¡£ç»“æž„ç¤ºä¾‹ã€‚}\label{code:book-struct}
\end{sourcecode}

\section{æ&nbsp;‡é¢˜é¡µ}\label{sec:titlepage}

\cmdindex{title,author,date,today}
\cmdindex{thanks,and}
\LaTeX{} æ”¯æŒç”Ÿæˆç®€å•çš„æ&nbsp;‡é¢˜é¡µã€‚é¦–å…ˆéœ€è¦ç»™å®šæ&nbsp;‡é¢˜å’Œä½œè€…ç­‰ä¿¡æ¯ï¼š
\begin{command}
\cmd{title}\marg{title} \quad
\cmd{author}\marg{author} \quad
\cmd{date}\marg{date}
\end{command}
å…¶ä¸­å‰ä¸¤ä¸ªå‘½ä»¤æ˜¯å¿…é¡»çš„ï¼ˆä¸ç”¨ \cmd{title} ä¼šæŠ¥é”™ï¼›ä¸ç”¨ \cmd{author} ä¼šè­¦å‘Šï¼‰ï¼Œ\cmd{date} å‘½ä»¤å¯é€‰ã€‚
\LaTeX{} è¿˜æä¾›äº†ä¸€ä¸ª \cmd{today} å‘½ä»¤è‡ªåŠ¨ç”Ÿæˆå½“å‰æ—¥æœŸï¼Œ\cmd{date} é»˜è®¤ä½¿ç”¨ \cmd{today}ã€‚
åœ¨ \cmd{title}ã€\cmd{author} ç­‰å‘½ä»¤å†…å¯ä»¥ä½¿ç”¨ \cmd{thanks} å‘½ä»¤ç”Ÿæˆæ&nbsp;‡é¢˜é¡µçš„è„šæ³¨ï¼Œç”¨ \cmd{and} éš”å¼€å¤šä¸ªäººåã€‚

\cmdindex{maketitle}
\pinyinindex{biaotiye}{æ&nbsp;‡é¢˜é¡µ}
åœ¨ä¿¡æ¯ç»™å®šåŽï¼Œå°±å¯ä»¥ä½¿ç”¨ \cmd{maketitle} å‘½ä»¤ç”Ÿæˆä¸€ä¸ªç®€å•çš„æ&nbsp;‡é¢˜é¡µäº†ã€‚
æºä»£ç&nbsp; \ref{code:titlepage} ç»™å‡ºäº†ä¸€ä¸ªæ&nbsp;‡é¢˜é¡µçš„ç¤ºä¾‹å’Œå¤§è‡´æ•ˆæžœã€‚
\cls{article} æ–‡æ¡£ç±»çš„æ&nbsp;‡é¢˜é»˜è®¤ä¸å•ç‹¬æˆé¡µï¼Œè€Œ \cls{report} å’Œ \cls{book} é»˜è®¤å•ç‹¬æˆé¡µã€‚
å¯åœ¨ \cmd{document\-class} å‘½ä»¤è°ƒç”¨æ–‡æ¡£ç±»æ—¶æŒ‡å®š \texttt{titlepage} æˆ– \texttt{notitlepage} é€‰é¡¹ä»¥ä¿®æ”¹é»˜è®¤çš„è¡Œä¸ºã€‚

\begin{sourcecode}[htp]
\begin{Verbatim}
\title{Test title}
\author{ Mary\thanks{E-mail:*****@***.com}
  \and Ted\thanks{Corresponding author}
  \and Louis}
\date{\today}
\end{Verbatim}
\bigskip
\makeatletter
\begin{minipage}{\textwidth}
    \centering
    \renewcommand\thempfootnote{\@fnsymbol\c@mpfootnote}%
    {\LARGE Test title \par}%
    \vskip 1.5em%
    {\large
        \lineskip .5em%
        \begin{tabular}[t]{c}%
            Mary\footnote{E-mail:*****@***.com}
        \end{tabular}
        \hskip 1em \@plus.17fil%
        \begin{tabular}[t]{c}%
            Ted\footnote{Corresponding author}
        \end{tabular}
        \hskip 1em \@plus.17fil%
        \begin{tabular}[t]{c}%
            Louis
        \end{tabular}\par}%
    \vskip 1em%
    {\large \CTEX@todayold}%
\end{minipage}
\makeatother
\caption{\LaTeX{} é»˜è®¤çš„æ&nbsp;‡é¢˜é¡µç¤ºä¾‹å’Œæ•ˆæžœã€‚}\label{code:titlepage}
\end{sourcecode}

\envindex{titlepage}
\LaTeX{} æ&nbsp;‡å‡†ç±»è¿˜æä¾›äº†ä¸€ä¸ªç®€å•çš„ \env{titlepage} çŽ¯å¢ƒï¼Œç”Ÿæˆä¸å¸¦é¡µçœ‰é¡µè„šçš„ä¸€é¡µã€‚ç”¨æˆ·å¯ä»¥åœ¨è¿™ä¸ªçŽ¯å¢ƒä¸­ä½¿ç”¨å„ç§æŽ’ç‰ˆå…ƒç´&nbsp;è‡ªç”±å‘æŒ¥ï¼Œ
ç”Ÿæˆè‡ªå®šä¹‰çš„æ&nbsp;‡é¢˜é¡µä»¥æ›¿ä»£ \cmd{maketitle} å‘½ä»¤ã€‚ç”šè‡³å¯ä»¥åˆ©ç”¨ \env{titlepage} çŽ¯å¢ƒé‡æ–°å®šä¹‰ \cmd{maketitle}ï¼š
\begin{verbatim}
\renewcommand{\maketitle}{\begin{titlepage}
... % ç”¨æˆ·è‡ªå®šä¹‰å‘½ä»¤
\end{titlepage}}
\end{verbatim}

äº‹å®žä¸Šï¼Œä¸ºæ&nbsp;‡å‡†æ–‡æ¡£ç±»æŒ‡å®šäº† \texttt{titlepage} é€‰é¡¹ä»¥åŽï¼Œä½¿ç”¨ \cmd{maketitle} å‘½ä»¤ç”Ÿæˆçš„æ&nbsp;‡é¢˜é¡µå°±æ˜¯ä¸€ä¸ª \env{titlepage} çŽ¯å¢ƒã€‚

ä»¥ä¸Šæ˜¯ \LaTeX{} æ&nbsp;‡å‡†æ–‡æ¡£ç±»çš„æ&nbsp;‡é¢˜é¡µç›¸å…³å‘½ä»¤ç”¨æ³•ã€‚åœ¨å„ç§æ–‡æ¡£æ¨¡æ¿ä¸­ç»å¸¸æœ‰è‡ªå®šä¹‰çš„æ&nbsp;‡é¢˜é¡µï¼Œ
æœ‰å¯èƒ½éœ€è¦é™¤äº† \cmd{title} å’Œ \cmd{author} ä»¥å¤–çš„å‘½ä»¤ç»™å®šä¿¡æ¯ï¼Œç”¨æ³•ä¹Ÿå¯èƒ½ä¸Žæ&nbsp;‡å‡†æ–‡æ¡£ç±»çš„ä¸ä¸€è‡´
ï¼ˆç”šè‡³æœ‰äº›æ¨¡æ¿å¯èƒ½æ²¡æœ‰å®šä¹‰ \env{titlepage} ç­‰çŽ¯å¢ƒï¼‰ã€‚ä½¿ç”¨æ–‡æ¡£æ¨¡æ¿å‰\textbf{ä¸€å®šè¦ä»”ç»†é˜…è¯»æ–‡æ¡£æ¨¡æ¿çš„å¸®åŠ©æ–‡æ¡£}ã€‚

\section{äº¤å‰å¼•ç”¨}\label{sec:crossref}

\cmdindex{label}
äº¤å‰å¼•ç”¨æ˜¯ \LaTeX{} å¼ºå¤§çš„è‡ªåŠ¨æŽ’ç‰ˆåŠŸèƒ½çš„ä½“çŽ°ä¹‹ä¸€ã€‚åœ¨èƒ½å¤Ÿè¢«äº¤å‰å¼•ç”¨çš„åœ°æ–¹ï¼Œå¦‚ç«&nbsp;èŠ‚ã€å…¬å¼ã€å›¾è¡¨ã€å®šç†ç­‰ä½ç½®ä½¿ç”¨ \cmd{label} å‘½ä»¤ï¼š
\begin{command}
\cmd{label}\marg{label-name}
\end{command}

\cmdindex{ref,pageref}
ä¹‹åŽå¯ä»¥åœ¨åˆ«å¤„ä½¿ç”¨ \cmd{ref} æˆ– \cmd{pageref} å‘½ä»¤ï¼Œåˆ†åˆ«ç”Ÿæˆäº¤å‰å¼•ç”¨çš„ç¼–å·å’Œé¡µç&nbsp;ï¼š
\begin{command}
\cmd{ref}\marg{label-name} \quad
\cmd{pageref}\marg{label-name}
\end{command}
\begin{example}
A reference to this subsection
\label{sec:this} looks like:
``see section~\ref{sec:this} on
page~\pageref{sec:this}.''
\end{example}

ä¸ºäº†ç”Ÿæˆæ­£ç¡®çš„äº¤å‰å¼•ç”¨ï¼Œä¸€èˆ¬ä¹Ÿéœ€è¦å¤šæ¬¡ç¼–è¯‘æºä»£ç&nbsp;ã€‚

\cmd{label} å‘½ä»¤å¯ç”¨äºŽè®°å½•å„ç§ç±»åž‹çš„äº¤å‰å¼•ç”¨ï¼Œä½¿ç”¨ä½ç½®åˆ†åˆ«ä¸ºï¼š
\begin{description}
  \item[ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜] åœ¨ç«&nbsp;èŠ‚æ&nbsp;‡é¢˜å‘½ä»¤ \cmd{section} ç­‰ä¹‹åŽç´§æŽ¥ç€ä½¿ç”¨ã€‚
  \item[è¡Œé—´å…¬å¼] å•è¡Œå…¬å¼åœ¨å…¬å¼å†…ä»»æ„ä½ç½®ä½¿ç”¨ï¼›å¤šè¡Œå…¬å¼åœ¨æ¯ä¸€è¡Œå…¬å¼çš„ä»»æ„ä½ç½®ä½¿ç”¨ã€‚
  \item[æœ‰åºåˆ—è¡¨] åœ¨ \env{enumerate} çŽ¯å¢ƒçš„æ¯ä¸ª \cmd{item} å‘½ä»¤ä¹‹åŽã€ä¸‹ä¸€ä¸ª \cmd{item} å‘½ä»¤ä¹‹å‰ä»»æ„ä½ç½®ä½¿ç”¨ã€‚
  \item[å›¾è¡¨æ&nbsp;‡é¢˜] åœ¨å›¾è¡¨æ&nbsp;‡é¢˜å‘½ä»¤ \cmd{caption} ä¹‹åŽç´§æŽ¥ç€ä½¿ç”¨ã€‚
  \item[å®šç†çŽ¯å¢ƒ] åœ¨å®šç†çŽ¯å¢ƒå†…éƒ¨ä»»æ„ä½ç½®ä½¿ç”¨ã€‚
\end{description}

åœ¨ä½¿ç”¨ä¸è®°ç¼–å·çš„å‘½ä»¤å½¢å¼ï¼ˆ\cmd{section*}ã€\cmd{caption*}\footnote{éœ€åŠ&nbsp;è½½ç›¸å…³å®åŒ…ï¼Œå¦‚ \pkg{caption}}ã€å¸¦å¯é€‰å‚æ•°çš„ \cmd{item} å‘½ä»¤ç­‰ï¼‰æ—¶ä¸è¦ä½¿ç”¨ \cmd{label} å‘½ä»¤ï¼Œ
å¦åˆ™ç”Ÿæˆçš„å¼•ç”¨ç¼–å·ä¸æ­£ç¡®ã€‚

\section{è„šæ³¨å’Œè¾¹æ³¨}\label{sec:footnote-marginpar}

\cmdindex{footnote}
ä½¿ç”¨ \cmd{footnote} å‘½ä»¤å¯ä»¥åœ¨é¡µé¢åº•éƒ¨ç”Ÿæˆä¸€ä¸ªè„šæ³¨ï¼š
\begin{command}
\cmd{footnote}\marg{footnote}
\end{command}

å‡å¦‚æˆ‘ä»¬è¾“å…¥ä»¥ä¸‹æ–‡å­—å’Œå‘½ä»¤ï¼š
\begin{verbatim}
â€œå¤©åœ°çŽ„é»„ï¼Œå®‡å®™æ´ªè’ã€‚æ—¥æœˆç›ˆæ˜ƒï¼Œè¾°å®¿åˆ—å¼&nbsp;ã€‚â€\footnote{å‡ºè‡ªã€Šåƒå­—æ–‡ã€‹ã€‚}
\end{verbatim}

åœ¨æ­£æ–‡ä¸­åˆ™ä¸ºï¼š%
â€œå¤©åœ°çŽ„é»„ï¼Œå®‡å®™æ´ªè’ã€‚æ—¥æœˆç›ˆæ˜ƒï¼Œè¾°å®¿åˆ—å¼&nbsp;ã€‚â€\footnote{å‡ºè‡ªã€Šåƒå­—æ–‡ã€‹ã€‚}

\cmdindex{footnotemark,footnotetext}
æœ‰äº›æƒ…å†µä¸‹ï¼ˆæ¯”å¦‚åœ¨è¡¨æ&nbsp;¼çŽ¯å¢ƒã€å„ç§ç›’å­å†…ï¼‰ä½¿ç”¨ \cmd{footnote} å¹¶ä¸èƒ½æ­£ç¡®ç”Ÿæˆè„šæ³¨ã€‚æˆ‘ä»¬å¯ä»¥åˆ†ä¸¤æ­¥è¿›è¡Œï¼Œ
å…ˆä½¿ç”¨ \cmd{foot\-note\-mark} ä¸ºè„šæ³¨è®¡æ•°ï¼Œå†åœ¨åˆé€‚çš„ä½ç½®ç”¨ \cmd{foot\-note\-text} ç”Ÿæˆè„šæ³¨ã€‚æ¯”å¦‚ï¼š

\begin{verbatim}
\begin{tabular}{l}
\hline
â€œå¤©åœ°çŽ„é»„ï¼Œå®‡å®™æ´ªè’ã€‚æ—¥æœˆç›ˆæ˜ƒï¼Œè¾°å®¿åˆ—å¼&nbsp;ã€‚â€\footnotemark \\
\hline
\end{tabular}
\footnotetext{è¡¨æ&nbsp;¼é‡Œçš„åå¥å‡ºè‡ªã€Šåƒå­—æ–‡ã€‹ã€‚}
\end{verbatim}

æ•ˆæžœä¸ºï¼š

\leavevmode\begin{tabular}{l}
\hline
â€œå¤©åœ°çŽ„é»„ï¼Œå®‡å®™æ´ªè’ã€‚æ—¥æœˆç›ˆæ˜ƒï¼Œè¾°å®¿åˆ—å¼&nbsp;ã€‚â€\footnotemark \\
\hline
\end{tabular}
\footnotetext{è¡¨æ&nbsp;¼é‡Œçš„åå¥å‡ºè‡ªã€Šåƒå­—æ–‡ã€‹ã€‚}

\cmdindex{marginpar}
ä½¿ç”¨ \cmd{marginpar} å‘½ä»¤å¯åœ¨è¾¹æ&nbsp;ä½ç½®ç”Ÿæˆè¾¹æ³¨ï¼š
\begin{command}
\cmd{marginpar}\oarg{left-margin}\marg{right-margin}
\end{command}
å¦‚æžœåªç»™å®šäº† \Arg{right-margin}ï¼Œé‚£ä¹ˆè¾¹æ³¨åœ¨å¥‡å¶æ•°é¡µæ–‡å­—ç›¸åŒï¼›å¦‚æžœåŒæ—¶ç»™å®šäº† \Arg{left-margin}ï¼Œ
åˆ™å¶æ•°é¡µä½¿ç”¨ \Arg{left-margin} çš„æ–‡å­—ã€‚

ä¾‹å¦‚ä»¥ä¸‹ä»£ç&nbsp;ï¼š
\begin{verbatim}
\marginpar{\footnotesize è¾¹æ³¨è¾ƒçª„ï¼Œä¸è¦å†™è¿‡å¤šæ–‡å­—ï¼Œæœ€å¥½è®¾ç½®è¾ƒå°çš„å­—å·ã€‚}
\end{verbatim}
å…¶æ•ˆæžœè§è¾¹æ&nbsp;ã€‚\marginpar{\footnotesize è¾¹æ³¨è¾ƒçª„ï¼Œä¸è¦å†™è¿‡å¤šæ–‡å­—ã€‚æœ€å¥½è®¾ç½®è¾ƒå°çš„å­—å·ã€‚}

\section{ç‰¹æ®ŠçŽ¯å¢ƒ}\label{sec:envs}

\subsection{åˆ—è¡¨}\label{subsec:lists}

\envindex{enumerate,itemize}
\cmdindex{item}
\LaTeX{} æä¾›äº†åŸºæœ¬çš„æœ‰åºå’Œæ—&nbsp;åºåˆ—è¡¨çŽ¯å¢ƒ \env{enumerate} å’Œ \env{itemize}ï¼Œä¸¤è€…çš„ç”¨æ³•å¾ˆç±»ä¼¼ï¼Œéƒ½ç”¨ \cmd{item} æ&nbsp;‡æ˜Žæ¯ä¸ªåˆ—è¡¨é¡¹ã€‚
\env{enumerate} çŽ¯å¢ƒä¼šè‡ªåŠ¨å¯¹åˆ—è¡¨é¡¹ç¼–å·ã€‚
\begin{command}
\cmd{begin}\marg*{enumerate} \\
\cmd{item} \ldots \\
\cmd{end}\marg*{enumerate}
\end{command}

å…¶ä¸­ \cmd{item} å¯å¸¦ä¸€ä¸ªå¯é€‰å‚æ•°ï¼Œå°†æœ‰åºåˆ—è¡¨çš„è®¡æ•°æˆ–è€…æ—&nbsp;åºåˆ—è¡¨çš„ç¬¦å·æ›¿æ¢æˆè‡ªå®šä¹‰çš„ç¬¦å·ã€‚
åˆ—è¡¨å¯ä»¥åµŒå¥—ä½¿ç”¨ï¼Œæœ€å¤šåµŒå¥—å››å±‚ã€‚
\begin{example}
\begin{enumerate}
  \item An item.
  \begin{enumerate}
    \item A nested item.\label{itref}
    \item[*] A starred item.
  \end{enumerate}
  \item Reference(\ref{itref}).
\end{enumerate}
\end{example}

\begin{example}
\begin{itemize}
  \item An item.
  \begin{itemize}
    \item A nested item.
    \item[+] A `plus' item.
    \item Another item.
  \end{itemize}
  \item Go back to upper level.
\end{itemize}
\end{example}

\envindex{description}
å…³é”®å­—çŽ¯å¢ƒ \env{description} çš„ç”¨æ³•ä¸Žä»¥ä¸Šä¸¤è€…ç±»ä¼¼ï¼Œä¸åŒçš„æ˜¯ \cmd{item} åŽçš„å¯é€‰å‚æ•°ç”¨æ¥å†™å…³é”®å­—ï¼Œä»¥ç²—ä½“æ˜¾ç¤ºï¼Œä¸€èˆ¬æ˜¯å¿…å¡«çš„ï¼š
\begin{command}
\cmd{begin}\marg*{description} \\
  \cmd{item}\oarg{item title} \ldots \\
\cmd{end}\marg*{description}
\end{command}

\begin{example}
\begin{description}
  \item[Enumerate] Numbered list.
  \item[Itemize] Non-numbered list.
\end{description}
\end{example}

å„çº§æ—&nbsp;åºåˆ—è¡¨çš„ç¬¦å·ç”±å‘½ä»¤ \cmd{labelitemi} åˆ° \cmd{labelitemiv} å®šä¹‰ï¼Œå¯ä»¥ç®€å•åœ°é‡æ–°å®šä¹‰å®ƒä»¬ï¼š
\begin{example}
\renewcommand{\labelitemi}{\ddag}
\renewcommand{\labelitemii}{\dag}
\begin{itemize}
  \item First item
  \begin{itemize}
    \item Subitem
    \item Subitem
  \end{itemize}
  \item Second item
\end{itemize}
\end{example}

æœ‰åºåˆ—è¡¨çš„ç¬¦å·ç”±å‘½ä»¤ \cmd{labelenumi} åˆ° \cmd{labelenumiv} å®šä¹‰ï¼Œ
é‡æ–°å®šä¹‰è¿™äº›å‘½ä»¤éœ€è¦ç”¨åˆ° \ref{sec:counters} èŠ‚çš„è®¡æ•°å™¨ç›¸å…³å‘½ä»¤ï¼š
\begin{example}
\renewcommand{\labelenumi}%
  {\Alph{enumi}&gt;}
\begin{enumerate}
  \item First item
  \item Second item
\end{enumerate}
\end{example}

é»˜è®¤çš„åˆ—è¡¨é—´è·æ¯”è¾ƒå®½ï¼Œ\LaTeX{} æœ¬èº«ä¹Ÿæœªæä¾›æ–¹ä¾¿çš„å®šåˆ¶åŠŸèƒ½ï¼Œå¯ç”¨ \pkg{enumitem} å®åŒ…å®šåˆ¶å„ç§åˆ—è¡¨é—´è·ã€‚
\pkg{enumitem} å®åŒ…è¿˜æä¾›äº†å¯¹åˆ—è¡¨æ&nbsp;‡ç­¾ã€å¼•ç”¨ç­‰çš„å®šåˆ¶ã€‚æœ‰å…´è¶£çš„è¯»è€…å¯å‚è€ƒå…¶å¸®åŠ©æ–‡æ¡£ã€‚

\subsection{å¯¹é½çŽ¯å¢ƒ}\label{subsec:flush}

\envindex{center,flushleft,flushright}
\env{center}ã€\env{flush\-left} å’Œ \env{flush\-right} çŽ¯å¢ƒåˆ†åˆ«ç”¨äºŽç”Ÿæˆå±…ä¸­ã€å·¦å¯¹é½å’Œå³å¯¹é½çš„æ–‡æœ¬çŽ¯å¢ƒã€‚
\begin{command}
\cmd{begin}\marg*{center} \ldots\ \cmd{end}\marg*{center} \\
\cmd{begin}\marg*{flushleft} \ldots\ \cmd{end}\marg*{flushleft} \\
\cmd{begin}\marg*{flushright} \ldots\ \cmd{end}\marg*{flushright}
\end{command}

\begin{example}
\begin{center}
Centered text using a
\verb|center| environment.
\end{center}
\begin{flushleft}
Left-aligned text using a
\verb|flushleft| environment.
\end{flushleft}
\begin{flushright}
Right-aligned text using a
\verb|flushright| environment.
\end{flushright}
\end{example}

\cmdindex{centering,raggedleft,raggedright}
é™¤æ­¤ä¹‹å¤–ï¼Œè¿˜å¯ä»¥ç”¨ä»¥ä¸‹å‘½ä»¤ç›´æŽ¥æ”¹å˜æ–‡å­—çš„å¯¹é½æ–¹å¼ï¼š
\begin{command}
\cmd{centering} \quad
\cmd{raggedright} \quad
\cmd{raggedleft}
\end{command}

\begin{example}
\centering
Centered text paragraph.

\raggedright
Left-aligned text paragraph.

\raggedleft
Right-aligned text paragraph.
\end{example}

ä¸‰ä¸ªå‘½ä»¤å’Œå¯¹åº”çš„çŽ¯å¢ƒç»å¸¸è¢«è¯¯ç”¨ï¼Œæœ‰ç›´æŽ¥ç”¨æ‰€è°“ \cmd{flushleft} å‘½ä»¤æˆ–è€… \env{raggedright} çŽ¯å¢ƒçš„ï¼Œéƒ½æ˜¯ä¸ç”šä¸¥æ&nbsp;¼çš„ç”¨æ³•ï¼ˆå³ä½¿å®ƒä»¬å¯èƒ½æœ‰æ•ˆï¼‰ã€‚
æœ‰ä¸€ç‚¹å¯ä»¥å°†ä¸¤è€…åŒºåˆ†å¼€æ¥ï¼š\env{center} ç­‰çŽ¯å¢ƒä¼šåœ¨ä¸Šä¸‹æ–‡äº§ç”Ÿä¸€ä¸ªé¢å¤–é—´è·ï¼Œè€Œ \cmd{centering} ç­‰å‘½ä»¤ä¸äº§ç”Ÿï¼Œåªæ˜¯æ”¹å˜å¯¹é½æ–¹å¼ã€‚
æ¯”å¦‚åœ¨æµ®åŠ¨ä½“çŽ¯å¢ƒ \env{table} æˆ– \env{figure} å†…å®žçŽ°å±…ä¸­å¯¹é½ï¼Œç”¨ \cmd{centering} å‘½ä»¤å³å¯ï¼Œæ²¡å¿…è¦å†ç”¨ \env{center} çŽ¯å¢ƒã€‚

\subsection{å¼•ç”¨çŽ¯å¢ƒ}\label{subsec:quote}

\envindex{quote,quotation}
\LaTeX{} æä¾›äº†ä¸¤ç§å¼•ç”¨çš„çŽ¯å¢ƒï¼š\env{quote} ç”¨äºŽå¼•ç”¨è¾ƒçŸ­çš„æ–‡å­—ï¼Œé¦–è¡Œä¸ç¼©è¿›ï¼›\env{quotation} ç”¨äºŽå¼•ç”¨è‹¥å¹²æ®µæ–‡å­—ï¼Œé¦–è¡Œç¼©è¿›ã€‚
å¼•ç”¨çŽ¯å¢ƒè¾ƒä¸€èˆ¬æ–‡å­—æœ‰é¢å¤–çš„å·¦å³ç¼©è¿›ã€‚
\begin{example}
Francis Bacon says:
\begin{quote}
Knowledge is power.
\end{quote}
\end{example}

\begin{example}
ã€Šæœ¨å…°è¯—ã€‹ï¼š
\begin{quotation}
ä¸‡é‡Œèµ´æˆŽæœºï¼Œå…³å±±åº¦è‹¥é£žã€‚
æœ”æ°”ä¼&nbsp;é‡‘æŸï¼Œå¯’å…‰ç…§é“è¡£ã€‚
å°†å†›ç™¾æˆ˜æ­»ï¼Œå£®å£«åå¹´å½’ã€‚

å½’æ¥è§å¤©å­ï¼Œå¤©å­åæ˜Žå&nbsp;‚ã€‚
ç­–å‹‹åäºŒè½¬ï¼Œèµèµç™¾åƒå¼ºã€‚â€¦â€¦
\end{quotation}
\end{example}

\envindex{verse}
\env{verse} ç”¨äºŽæŽ’ç‰ˆè¯—æ­Œï¼Œä¸Ž \env{quotation} æ°å¥½ç›¸åï¼Œ\env{verse} æ˜¯é¦–è¡Œæ‚¬æŒ‚ç¼©è¿›çš„ã€‚
\begin{example}
Rabindranath Tagore's short poem:
\begin{verse}
Beauty is truth's smile
when she beholds her own face in
a perfect mirror.
\end{verse}
\end{example}

\subsection{æ‘˜è¦çŽ¯å¢ƒ}\label{subsec:abstract}

\envindex{abstract}
æ‘˜è¦çŽ¯å¢ƒ \env{abstract} é»˜è®¤åªåœ¨æ&nbsp;‡å‡†æ–‡æ¡£ç±»ä¸­çš„ \cls{article} å’Œ \cls{report} æ–‡æ¡£ç±»å¯ç”¨ï¼Œ
ä¸€èˆ¬ç”¨äºŽç´§è·Ÿ \cmd{maketitle} å‘½ä»¤ä¹‹åŽä»‹ç»æ–‡æ¡£çš„æ‘˜è¦ã€‚å¦‚æžœæ–‡æ¡£ç±»æŒ‡å®šäº† \texttt{titlepage} é€‰é¡¹ï¼Œåˆ™å•ç‹¬æˆé¡µï¼›
åä¹‹ï¼Œå•æ&nbsp;æŽ’ç‰ˆæ—¶ç›¸å½“äºŽä¸€ä¸ªå±…ä¸­çš„å°æ&nbsp;‡é¢˜åŠ&nbsp;ä¸€ä¸ª \env{quotation} çŽ¯å¢ƒï¼ŒåŒæ&nbsp;æŽ’ç‰ˆæ—¶ç›¸å½“äºŽ \cmd{section*} å®šä¹‰çš„ä¸€èŠ‚ã€‚

\subsection{ä»£ç&nbsp;çŽ¯å¢ƒ}\label{subsec:verbatim}

\envindex{verbatim}
æœ‰æ—¶æˆ‘ä»¬éœ€è¦å°†ä¸€æ®µä»£ç&nbsp;åŽŸæ&nbsp;·è½¬ä¹‰è¾“å‡ºï¼Œè¿™å°±è¦ç”¨åˆ°ä»£ç&nbsp;çŽ¯å¢ƒ \env{verbatim}ï¼Œå®ƒä»¥ç­‰å®½å­—ä½“æŽ’ç‰ˆä»£ç&nbsp;ï¼Œå›žè½¦å’Œç©ºæ&nbsp;¼ä¹Ÿåˆ†åˆ«èµ·åˆ°æ¢è¡Œå’Œç©ºä½çš„ä½œç”¨ï¼›
å¸¦æ˜Ÿå·çš„ç‰ˆæœ¬æ›´è¿›ä¸€æ­¥å°†ç©ºæ&nbsp;¼æ˜¾ç¤ºæˆâ€œ\textvisiblespaceâ€ã€‚
\begin{example}
\begin{verbatim}
#include &lt;iostream&gt;
int main()
{
  std::cout &lt;&lt; "Hello, world!"
            &lt;&lt; std::endl;
  return 0;
}
\end{verbatim}
\end{example}

\begin{example}
\begin{verbatim*}
for (int i=0; i&lt;4; ++i)
  printf("Number %d\n",i);
\end{verbatim*}
\end{example}

\cmdindex{verb}
è¦æŽ’ç‰ˆç®€çŸ­çš„ä»£ç&nbsp;æˆ–å…³é”®å­—ï¼Œå¯ä½¿ç”¨ \cmd{verb} å‘½ä»¤ï¼š
\begin{command}
\cmd{verb}\Arg{delim}\Arg{code}\Arg{delim}
\end{command}

\Arg{delim} æ&nbsp;‡æ˜Žä»£ç&nbsp;çš„åˆ†ç•Œä½ç½®ï¼Œå‰åŽå¿…é¡»ä¸€è‡´ï¼Œé™¤å­—æ¯ã€ç©ºæ&nbsp;¼æˆ–æ˜Ÿå·å¤–ï¼Œå¯ä»»æ„é€‰æ‹©ä½¿å¾—ä¸ä¸Žä»£ç&nbsp;æœ¬èº«å†²çªï¼Œä¹&nbsp;æƒ¯ä¸Šä½¿ç”¨ \texttt| ç¬¦å·ã€‚

åŒ \env{verbatim} çŽ¯å¢ƒï¼Œ\cmd{verb} åŽä¹Ÿå¯ä»¥å¸¦ä¸€ä¸ªæ˜Ÿå·ï¼Œä»¥æ˜¾ç¤ºç©ºæ&nbsp;¼ï¼š
\begin{example}
\verb|\LaTeX| \\
\verb+(a || b)+ \verb*+(a || b)+
\end{example}

\cmd{verb} å‘½ä»¤å¯¹ç¬¦å·çš„å¤„ç†æ¯”è¾ƒå¤æ‚ï¼Œä¸€èˆ¬\textbf{ä¸èƒ½ç”¨åœ¨å…¶å®ƒå‘½ä»¤çš„å‚æ•°é‡Œ}ï¼Œå¦åˆ™å¤šåŠä¼šå‡ºé”™ã€‚

\pkg{verbatim} å®åŒ…ä¼˜åŒ–äº† \env{verbatim} çŽ¯å¢ƒçš„å†…éƒ¨å‘½ä»¤ï¼Œå¹¶æä¾›äº† \cmd{verbatiminput} å‘½ä»¤ç”¨æ¥ç›´æŽ¥è¯»å…¥æ–‡ä»¶ç”Ÿæˆä»£ç&nbsp;çŽ¯å¢ƒã€‚
\pkg{fancyvrb} å®åŒ…æä¾›äº†å¯å®šåˆ¶æ&nbsp;¼å¼çš„ \env{Verbatim} çŽ¯å¢ƒï¼›\pkg{listings} å®åŒ…æ›´è¿›ä¸€æ­¥ï¼Œå¯ç”Ÿæˆå…³é”®å­—é«˜äº®çš„ä»£ç&nbsp;çŽ¯å¢ƒï¼Œ
æ”¯æŒå„ç§ç¨‹åºè®¾è®¡è¯­è¨€çš„è¯­æ³•å’Œå…³é”®å­—ã€‚è¯¦æƒ…è¯·å‚è€ƒå„è‡ªçš„å¸®åŠ©æ–‡æ¡£ã€‚

\section{è¡¨æ&nbsp;¼}\label{sec:tabular}

\pinyinindex{biaoge}{è¡¨æ&nbsp;¼|(}
\LaTeX{} é‡ŒæŽ’ç‰ˆè¡¨æ&nbsp;¼ä¸å¦‚ Word ç­‰æ‰€è§å³æ‰€å¾—çš„å·¥å…·ç®€ä¾¿å’Œè‡ªç”±ï¼Œä¸è¿‡å¯¹äºŽä¸å¤ªå¤æ‚çš„è¡¨æ&nbsp;¼æ¥è®²ï¼Œå®Œå…¨èƒ½å¤Ÿèƒœä»»ã€‚

\envindex{tabular}
\cmdindex{hline}
\index{&amp;@\texttt\&amp; (\textit{å•å…ƒæ&nbsp;¼/å¯¹é½})}
\index{\@\crcmd{} (\textit{æ¢è¡Œ})}
æŽ’ç‰ˆè¡¨æ&nbsp;¼æœ€åŸºæœ¬çš„ \env{tabular} çŽ¯å¢ƒç”¨æ³•ä¸ºï¼š
\begin{command}
\cmd{begin}\marg*{tabular}\oarg{align}\marg{column-spec}\\
 \Arg{item1} \texttt\&amp; \Arg{item2} \texttt\&amp; \ldots\ \crcmd \\
 \cmd{hline} \\
 \Arg{item1} \texttt\&amp; \Arg{item2} \texttt\&amp; \ldots\ \crcmd \\
\cmd{end}\marg*{tabular}
\end{command}
å…¶ä¸­ \Arg{column-spec} æ˜¯åˆ—æ&nbsp;¼å¼æ&nbsp;‡è®°ï¼Œåœ¨æŽ¥ä¸‹æ¥çš„å†…å®¹å°†ä»”ç»†ä»‹ç»ï¼›\texttt\&amp; ç”¨æ¥åˆ†éš”å•å…ƒæ&nbsp;¼ï¼›
\crcmd{} ç”¨æ¥æ¢è¡Œï¼›\cmd{hline} ç”¨æ¥åœ¨è¡Œä¸Žè¡Œä¹‹é—´ç»˜åˆ¶æ¨ªçº¿ã€‚

ç›´æŽ¥ä½¿ç”¨ \env{tabular} çŽ¯å¢ƒçš„è¯ï¼Œä¼š\textbf{å’Œå‘¨å›´çš„æ–‡å­—æ··æŽ’}ã€‚æ­¤æ—¶å¯ç”¨ä¸€ä¸ªå¯é€‰å‚æ•° \Arg{align} æŽ§åˆ¶åž‚ç›´å¯¹é½ï¼š
\verb|t| å’Œ \verb|b| åˆ†åˆ«è¡¨ç¤ºæŒ‰è¡¨æ&nbsp;¼é¡¶éƒ¨ã€åº•éƒ¨å¯¹é½ï¼Œå…¶ä»–å‚æ•°æˆ–çœç•¥ä¸å†™ï¼ˆé»˜è®¤ï¼‰è¡¨ç¤ºå±…ä¸­å¯¹é½ã€‚
\begin{example}
\begin{tabular}{|c|}
  center-\\ aligned \\
\end{tabular},
\begin{tabular}[t]{|c|}
  top-\\ aligned \\
\end{tabular},
\begin{tabular}[b]{|c|}
  bottom-\\ aligned\\
\end{tabular} tabulars.
\end{example}

ä½†æ˜¯é€šå¸¸æƒ…å†µä¸‹ \env{tabular} çŽ¯å¢ƒå¾ˆå°‘ä¸Žæ–‡å­—ç›´æŽ¥æ··æŽ’ï¼Œè€Œæ˜¯ä¼šæ”¾åœ¨ \env{table} æµ®åŠ¨ä½“çŽ¯å¢ƒä¸­ï¼Œå¹¶ç”¨ \cmd{caption} å‘½ä»¤åŠ&nbsp;æ&nbsp;‡é¢˜ã€‚

\subsection{åˆ—æ&nbsp;¼å¼}\label{subsec:tabular-cols}

\env{tabular} çŽ¯å¢ƒä½¿ç”¨ \Arg{column-spec} å‚æ•°æŒ‡å®šè¡¨æ&nbsp;¼çš„åˆ—æ•°ä»¥åŠæ¯åˆ—çš„æ&nbsp;¼å¼ã€‚åŸºæœ¬çš„åˆ—æ&nbsp;¼å¼è§è¡¨ \ref{tbl:table-column-spec}ã€‚
\begin{table}[htp]
\centering
\caption{\LaTeX{} è¡¨æ&nbsp;¼åˆ—æ&nbsp;¼å¼}\label{tbl:table-column-spec}
\begin{tabular}{*{2}{l}}
 \hline
 \textbf{åˆ—æ&nbsp;¼å¼} &amp; \textbf{è¯´æ˜Ž} \\
 \hline
 \ttfamily l/c/r          &amp; å•å…ƒæ&nbsp;¼å†…å®¹å·¦å¯¹é½/å±…ä¸­/å³å¯¹é½ï¼Œä¸æŠ˜è¡Œ \\
 \ttfamily p\marg{width}  &amp; å•å…ƒæ&nbsp;¼å®½åº¦å›ºå®šä¸º \Arg{width}ï¼Œå¯è‡ªåŠ¨æŠ˜è¡Œ \\
 \ttfamily |              &amp; ç»˜åˆ¶ç«–çº¿ \\
 \ttfamily @\marg{string} &amp; è‡ªå®šä¹‰å†…å®¹ \Arg{string} \\
 \hline
\end{tabular}
\end{table}

\begin{example}
\begin{tabular}{lcr|p{6em}}
  \hline
  left &amp; center &amp; right
       &amp; par box with fixed width\\
  L    &amp; C      &amp; R     &amp; P \\
 \hline
\end{tabular}
\end{example}

è¡¨æ&nbsp;¼ä¸­æ¯è¡Œçš„å•å…ƒæ&nbsp;¼æ•°ç›®ä¸èƒ½å¤šäºŽåˆ—æ&nbsp;¼å¼é‡Œ \texttt{l/c/r/p} çš„æ€»æ•°ï¼ˆå¯ä»¥å°‘äºŽè¿™ä¸ªæ€»æ•°ï¼‰ï¼Œå¦åˆ™å‡ºé”™ã€‚

\texttt{@} æ&nbsp;¼å¼å¯åœ¨å•å…ƒæ&nbsp;¼å‰åŽæ’å…¥ä»»æ„çš„æ–‡æœ¬ï¼Œä½†åŒæ—¶å®ƒä¹Ÿæ¶ˆé™¤äº†å•å…ƒæ&nbsp;¼å‰åŽé¢å¤–æ·»åŠ&nbsp;çš„é—´è·ã€‚
\texttt{@} æ&nbsp;¼å¼å¯ä»¥é€‚å½“ä½¿ç”¨ä»¥å……å½“â€œç«–çº¿â€ã€‚ç‰¹åˆ«åœ°ï¼Œ\texttt{@}\marg*{} å¯ç›´æŽ¥ç”¨æ¥æ¶ˆé™¤å•å…ƒæ&nbsp;¼å‰åŽçš„é—´è·ï¼š
\begin{example}
\begin{tabular}{@{} r@{:}lr @{}}
  \hline
  1  &amp; 1 &amp; one \\
  11 &amp; 3 &amp; eleven \\
  \hline
\end{tabular}
\end{example}

å¦å¤– \LaTeX{} è¿˜æä¾›äº†ç®€ä¾¿çš„å°†æ&nbsp;¼å¼å‚æ•°é‡å¤çš„å†™æ³• \texttt*\marg{n}\marg{column-spec}ï¼Œæ¯”å¦‚ä»¥ä¸‹ä¸¤ç§å†™æ³•æ˜¯ç­‰æ•ˆçš„ï¼š
\begin{verbatim}
\begin{tabular}{|c|c|c|c|c|p{4em}|p{4em}|}
\begin{tabular}{|*{5}{c|}*{2}{p{4em}|}}
\end{verbatim}

\pkgindex{array}
æœ‰æ—¶éœ€è¦ä¸ºæ•´åˆ—ä¿®é¥°æ&nbsp;¼å¼ï¼Œæ¯”å¦‚æ•´åˆ—æ”¹å˜ä¸ºç²—ä½“ï¼Œå¦‚æžœæ¯ä¸ªå•å…ƒæ&nbsp;¼éƒ½åŠ&nbsp;ä¸Š \cmd{bfseries} å‘½ä»¤ä¼šæ¯”è¾ƒéº»çƒ¦ã€‚
\pkg{array} å®åŒ…æä¾›äº†è¾…åŠ©æ&nbsp;¼å¼ \texttt&gt; å’Œ \texttt&lt;ï¼Œç”¨äºŽç»™åˆ—æ&nbsp;¼å¼å‰åŽåŠ&nbsp;ä¸Šä¿®é¥°å‘½ä»¤ï¼š
\begin{example}
% \usepackage{array}
\begin{tabular}{&gt;{\itshape}r&lt;{*}l}
  \hline
  italic &amp; normal \\
  column &amp; column \\
  \hline
\end{tabular}
\end{example}

è¾…åŠ©æ&nbsp;¼å¼ç”šè‡³æ”¯æŒæ’å…¥ \cmd{centering} ç­‰å‘½ä»¤æ”¹å˜ \texttt{p} åˆ—æ&nbsp;¼å¼çš„å¯¹é½æ–¹å¼ï¼Œ
ä¸€èˆ¬è¿˜è¦åŠ&nbsp;é¢å¤–çš„å‘½ä»¤ \cmd{array\-back\-slash} ä»¥å…å‡ºé”™%
\footnote{\cmd{centering} ç­‰å¯¹é½å‘½ä»¤ä¼šç&nbsp;´åè¡¨æ&nbsp;¼çŽ¯å¢ƒé‡Œ \crcmd{} æ¢è¡Œå‘½ä»¤çš„å®šä¹‰ï¼Œ
\cmd{array\-back\-slash} ç”¨æ¥æ¢å¤ä¹‹ã€‚å¦‚æžœä¸åŠ&nbsp; \cmd{array\-back\-slash} å‘½ä»¤ï¼Œ
ä¹Ÿå¯ä»¥ç”¨ \cmd{tabular\-newline} å‘½ä»¤ä»£æ›¿åŽŸæ¥çš„ \crcmd{} å®žçŽ°è¡¨æ&nbsp;¼æ¢è¡Œã€‚}ï¼š
\begin{example}
% \usepackage{array}
\begin{tabular}%
{&gt;{\centering\arraybackslash}p{9em}}
  \hline
  Some center-aligned long text. \\
  \hline
\end{tabular}
\end{example}

\pkg{array} å®åŒ…è¿˜æä¾›äº†ç±»ä¼¼ \texttt{p} æ&nbsp;¼å¼çš„ \texttt{m} æ&nbsp;¼å¼å’Œ \texttt{b} æ&nbsp;¼å¼ï¼Œ
ä¸‰è€…åˆ†åˆ«åœ¨åž‚ç›´æ–¹å‘ä¸Šé&nbsp;é¡¶ç«¯å¯¹é½ã€å±…ä¸­ä»¥åŠåº•ç«¯å¯¹é½ã€‚
\begin{example}
% \usepackage{array}
\newcommand\txt{a b c d e f g h i}
\begin{tabular}{cp{2em}m{2em}b{2em}}
  \hline
  pos &amp; \txt &amp; \txt &amp; \txt \\
  \hline
\end{tabular}
\end{example}

\subsection{åˆ—å®½}\label{subsec:colwidth}

åœ¨æŽ§åˆ¶åˆ—å®½æ–¹é¢ï¼Œ\LaTeX{} è¡¨æ&nbsp;¼æœ‰ç€æ˜Žæ˜¾çš„ä¸è¶³ï¼š\texttt{l/c/r} æ&nbsp;¼å¼çš„åˆ—å®½æ˜¯ç”±æ–‡å­—å†…å®¹çš„è‡ªç„¶å®½åº¦å†³å®šçš„ï¼Œ
è€Œ \texttt{p} æ&nbsp;¼å¼ç»™å®šäº†åˆ—å®½å´ä¸å¥½æŽ§åˆ¶å¯¹é½ï¼ˆå¯ç”¨ \pkg{array} å®åŒ…çš„è¾…åŠ©æ&nbsp;¼å¼ï¼‰ï¼Œ
æ›´ä½•å†µåˆ—ä¸Žåˆ—ä¹‹é—´é€šå¸¸è¿˜æœ‰é—´è·ï¼Œæ‰€ä»¥ç›´æŽ¥ç”Ÿæˆç»™å®šæ€»å®½åº¦çš„è¡¨æ&nbsp;¼å¹¶ä¸å®¹æ˜“ã€‚

\envindex{tabular*}
\LaTeX{} æœ¬èº«æä¾›äº† \env{tabular*} çŽ¯å¢ƒç”¨æ¥æŽ’ç‰ˆå®šå®½è¡¨æ&nbsp;¼ï¼Œä½†æ˜¯ä¸å¤ªæ–¹ä¾¿ä½¿ç”¨ï¼Œ
æ¯”å¦‚è¦ç”¨åˆ° \texttt{@} æ&nbsp;¼å¼æ’å…¥é¢å¤–å‘½ä»¤ï¼Œä»¤å•å…ƒæ&nbsp;¼ä¹‹é—´çš„é—´è·ä¸º \cmd{fill}ï¼Œä½†å³ä½¿è¿™æ&nbsp;·ä»ç„¶æœ‰ç‘•ç–µï¼š
\begin{example}
\begin{tabular*}{14em}%
{@{\extracolsep{\fill}}|c|c|c|c|}
  \hline
  A &amp; B &amp; C &amp; D \\ \hline
  a &amp; b &amp; c &amp; d \\ \hline
\end{tabular*}
\end{example}

\pkgindex{tabularx}
\envindex[tabularx]{tabularx}
\pkg{tabularx} å®åŒ…ä¸ºæˆ‘ä»¬æä¾›äº†æ–¹ä¾¿çš„è§£å†³æ–¹æ¡ˆã€‚å®ƒå¼•å…¥äº†ä¸€ä¸ª \texttt{X} åˆ—æ&nbsp;¼å¼ï¼Œç±»ä¼¼ \texttt{p} åˆ—æ&nbsp;¼å¼ï¼Œ
ä¸è¿‡ä¼šæ&nbsp;¹æ®è¡¨æ&nbsp;¼å®½åº¦è‡ªåŠ¨è®¡ç®—åˆ—å®½ï¼Œå¤šä¸ª \texttt{X} åˆ—æ&nbsp;¼å¼å¹³å‡åˆ†é…åˆ—å®½ã€‚
\texttt{X} åˆ—æ&nbsp;¼å¼ä¹Ÿå¯ä»¥ç”¨ \pkg{array} é‡Œçš„è¾…åŠ©æ&nbsp;¼å¼ä¿®é¥°å¯¹é½æ–¹å¼ï¼š
\begin{example}
% \usepackage{array,tabularx}
\begin{tabularx}{14em}%
{|*{4}{&gt;{\centering\arraybackslash}X|}}
  \hline
  A &amp; B &amp; C &amp; D \\ \hline
  a &amp; b &amp; c &amp; d \\ \hline
\end{tabularx}
\end{example}

\subsection{æ¨ªçº¿}\label{subsec:hline}

\cmdindex{hline,cline}
æˆ‘ä»¬å·²ç»åœ¨ä¹‹å‰çš„ä¾‹å­è§è¿‡è®¸å¤šæ¬¡ç»˜åˆ¶è¡¨æ&nbsp;¼çº¿çš„ \cmd{hline} å‘½ä»¤ã€‚å¦å¤– \cmd{cline}\marg*{\Arg{i}-\Arg{j}} ç”¨æ¥ç»˜åˆ¶è·¨è¶Šéƒ¨åˆ†å•å…ƒæ&nbsp;¼çš„æ¨ªçº¿ï¼š
\begin{example}
\begin{tabular}{|c|c|c|}
  \hline
  4 &amp; 9 &amp; 2 \\ \cline{2-3}
  3 &amp; 5 &amp; 7 \\ \cline{1-1}
  8 &amp; 1 &amp; 6 \\ \hline
\end{tabular}
\end{example}

\pkgindex{booktabs}
\cmdindex[booktabs]{toprule,midrule,bottomrule,cmidrule}
åœ¨ç§‘æŠ€è®ºæ–‡æŽ’ç‰ˆä¸­å¹¿æ³›åº”ç”¨çš„è¡¨æ&nbsp;¼å½¢å¼æ˜¯ä¸‰çº¿è¡¨ï¼Œå½¢å¼å¹²å‡€ç®€æ˜Žã€‚
ä¸‰çº¿è¡¨ç”± \pkg{booktabs} å®åŒ…æ”¯æŒï¼Œå®ƒæä¾›äº† \cmd{toprule}ã€\cmd{midrule} å’Œ \cmd{bottomrule} å‘½ä»¤ç”¨ä»¥æŽ’ç‰ˆä¸‰çº¿è¡¨çš„ä¸‰æ¡çº¿ï¼Œ
ä»¥åŠå’Œ \cmd{cline} å¯¹åº”çš„ \cmd{cmidrule}ã€‚é™¤æ­¤ä¹‹å¤–ï¼Œæœ€å¥½ä¸è¦ç”¨å…¶å®ƒæ¨ªçº¿ä»¥åŠç«–çº¿ï¼š
\begin{example}
% \usepackage{booktabs}
\begin{tabular}{cccc}
  \toprule
   &amp; \multicolumn{3}{c}{Numbers} \\
  \cmidrule{2-4}
           &amp; 1 &amp; 2 &amp; 3 \\
  \midrule
  Alphabet &amp; A &amp; B &amp; C \\
  Roman    &amp; I &amp; II&amp; III \\
  \bottomrule
\end{tabular}
\end{example}

\subsection{åˆå¹¶å•å…ƒæ&nbsp;¼}\label{subsec:tabular-multicol}

\LaTeX{} æ˜¯ä¸€è¡Œä¸€è¡ŒæŽ’ç‰ˆè¡¨æ&nbsp;¼çš„ï¼Œæ¨ªå‘åˆå¹¶å•å…ƒæ&nbsp;¼è¾ƒä¸ºå®¹æ˜“ï¼Œç”± \cmd{multi\-column} å‘½ä»¤å®žçŽ°ï¼š
\begin{command}
\cmd{multicolumn}\marg{n}\marg{column-spec}\marg{item}
\end{command}
å…¶ä¸­ \Arg{n} ä¸ºè¦åˆå¹¶çš„åˆ—æ•°ï¼Œ\Arg{column-spec} ä¸ºåˆå¹¶å•å…ƒæ&nbsp;¼åŽçš„åˆ—æ&nbsp;¼å¼ï¼Œåªå…è®¸å‡ºçŽ°ä¸€ä¸ª \texttt{l/c/r} æˆ– \texttt{p} æ&nbsp;¼å¼ã€‚
å¦‚æžœåˆå¹¶å‰çš„å•å…ƒæ&nbsp;¼å‰åŽå¸¦è¡¨æ&nbsp;¼çº¿ \texttt|ï¼Œåˆå¹¶åŽçš„åˆ—æ&nbsp;¼å¼ä¹Ÿè¦å¸¦ \texttt| ä»¥ä½¿å¾—è¡¨æ&nbsp;¼çš„ç«–çº¿ä¸€è‡´ã€‚
\begin{example}
\begin{tabular}{|c|c|c|}
  \hline
  1 &amp; 2 &amp; Center \\ \hline
  \multicolumn{2}{|c|}{3} &amp;
  \multicolumn{1}{r|}{Right} \\ \hline
  4 &amp; \multicolumn{2}{c|}{C} \\ \hline
\end{tabular}
\end{example}

ä¸Šé¢çš„ä¾‹å­è¿˜ä½“çŽ°äº†ï¼Œå½¢å¦‚ \cmd{multicolumn}\marg*{1}\marg{column-spec}\marg{item} çš„å‘½ä»¤\textbf{å¯ä»¥ç”¨æ¥ä¿®æ”¹æŸä¸€ä¸ªå•å…ƒæ&nbsp;¼çš„åˆ—æ&nbsp;¼å¼ã€‚}

\pkgindex{multirow}
\cmdindex[multirow]{multirow}
çºµå‘åˆå¹¶å•å…ƒæ&nbsp;¼éœ€è¦ç”¨åˆ° \pkg{multirow} å®åŒ…æä¾›çš„ \cmd{multirow} å‘½ä»¤ï¼š
\begin{command}
\cmd{multirow}\marg{n}\marg{width}\marg{item}
\end{command}
\Arg{width} ä¸ºåˆå¹¶åŽå•å…ƒæ&nbsp;¼çš„å®½åº¦ï¼Œå¯ä»¥å¡« \texttt{*} ä»¥ä½¿ç”¨è‡ªç„¶å®½åº¦ã€‚

æˆ‘ä»¬çœ‹ä¸€ä¸ªç»“åˆ \cmd{cline}ã€\cmd{multi\-column} å’Œ \cmd{multi\-row} å‘½ä»¤çš„ä¾‹å­ï¼š
\begin{example}
% \usepackage{multirow}
\begin{tabular}{ccc}
  \hline
  \multirow{2}{*}{Item} &amp;
    \multicolumn{2}{c}{Value} \\
  \cline{2-3}
    &amp; First &amp; Second \\ \hline
  A &amp; 1     &amp; 2 \\ \hline
\end{tabular}
\end{example}

\subsection{åµŒå¥—è¡¨æ&nbsp;¼}\label{subsec:tabular-embed}

ç›¸å¯¹äºŽåˆå¹¶å•å…ƒæ&nbsp;¼ï¼Œæ‹†åˆ†å•å…ƒæ&nbsp;¼å¯¹äºŽ \LaTeX{} æ¥è¯´å¹¶éžæ˜“äº‹ã€‚åœ¨å•å…ƒæ&nbsp;¼ä¸­åµŒå¥—ä¸€ä¸ªå°è¡¨æ&nbsp;¼å¯ä»¥èµ·åˆ°â€œæ‹†åˆ†å•å…ƒæ&nbsp;¼â€çš„æ•ˆæžœã€‚
åœ¨ä»¥ä¸‹çš„ä¾‹å­ä¸­ï¼Œæ³¨æ„è¦ç”¨ \cmd{multi\-column} å‘½ä»¤é…åˆ \texttt{@\{\}} æ&nbsp;¼å¼æŠŠå•å…ƒæ&nbsp;¼çš„é¢å¤–è¾¹è·åŽ»æŽ‰ï¼Œä½¿å¾—åµŒå¥—çš„è¡¨æ&nbsp;¼çº¿èƒ½å’Œå¤–å±‚çš„è¡¨æ&nbsp;¼çº¿æ­£ç¡®ç›¸è¿žï¼š

\begin{example}
\begin{tabular}{|c|c|c|}
 \hline
 a &amp; b &amp; c \\ \hline
 a &amp; \multicolumn{1}{@{}c@{}|}
 {\begin{tabular}{c|c}
   e &amp; f \\ \hline
   e &amp; f \\
  \end{tabular}}
       &amp; c \\ \hline
 a &amp; b &amp; c \\ \hline
\end{tabular}
\end{example}

\pkgindex{makecell}
å¦‚æžœä¸éœ€è¦ä¸ºâ€œæ‹†åˆ†çš„å•å…ƒæ&nbsp;¼â€ç”»çº¿ï¼Œå¹¶ä¸”åªåœ¨åž‚ç›´æ–¹å‘â€œæ‹†åˆ†â€çš„è¯ï¼Œ\pkg{makecell} å®åŒ…æä¾›çš„ \cmd{make\-cell} å‘½ä»¤æ˜¯ä¸€ä¸ªç®€å•çš„è§£å†³æ–¹æ¡ˆï¼š

\begin{example}
% \usepackage{makecell}
\begin{tabular}{|c|c|}
 \hline
 a &amp; \makecell{d1 \\ d2} \\
 \hline
 b &amp; c \\
 \hline
\end{tabular}
\end{example}

\subsection{è¡Œè·æŽ§åˆ¶}\label{subsec:tabular-colht}

\cmdindex{arraystretch}
\LaTeX{} ç”Ÿæˆçš„è¡¨æ&nbsp;¼çœ‹èµ·æ¥é€šå¸¸æ¯”è¾ƒç´§å‡‘ã€‚ä¿®æ”¹å‚æ•° \cmd{array\-stretch} å¯ä»¥å¾—åˆ°è¡Œè·æ›´åŠ&nbsp;å®½æ¾çš„è¡¨æ&nbsp;¼
ï¼ˆç›¸å…³å‘½ä»¤å‚è€ƒ \ref{subsec:newcmd} å°èŠ‚ï¼‰ï¼š
\begin{example}
\renewcommand\arraystretch{1.8}
\begin{tabular}{|c|}
  \hline
  Really loose \\ \hline
  tabular rows.\\ \hline
\end{tabular}
\end{example}

\index{\@\crcmd{} (\textit{æ¢è¡Œ})}
å¦ä¸€ç§å¢žåŠ&nbsp;é—´è·çš„åŠžæ³•æ˜¯ç»™æ¢è¡Œå‘½ä»¤ \crcmd{} æ·»åŠ&nbsp;å¯é€‰å‚æ•°ï¼Œåœ¨è¿™ä¸€è¡Œä¸‹é¢åŠ&nbsp;é¢å¤–çš„é—´è·ï¼Œé€‚åˆç”¨äºŽåœ¨è¡Œé—´ä¸åŠ&nbsp;æ¨ªçº¿çš„è¡¨æ&nbsp;¼ï¼š
\begin{example}
\begin{tabular}{c}
  \hline
  Head lines \\[6pt]
  tabular lines \\
  tabular lines \\ \hline
\end{tabular}
\end{example}

ä½†æ˜¯è¿™ç§æ¢è¡Œæ–¹å¼çš„å­˜åœ¨å¯¼è‡´äº†ä¸€ä¸ªç¼ºé™·â€”â€”\textbf{ä»Žç¬¬äºŒè¡Œå¼€å§‹ï¼Œè¡¨æ&nbsp;¼çš„é¦–ä¸ªå•å…ƒæ&nbsp;¼ä¸èƒ½ç›´æŽ¥ä½¿ç”¨ä¸­æ‹¬å· \texttt{[]}}ï¼Œ
å¦åˆ™ \crcmd{} å¾€å¾€ä¼šå°†ä¸‹ä¸€è¡Œçš„ä¸­æ‹¬å·å½“ä½œè‡ªå·±çš„å¯é€‰å‚æ•°ï¼Œå›&nbsp;è€Œå‡ºé”™ã€‚å¦‚æžœè¦ä½¿ç”¨ä¸­æ‹¬å·ï¼Œåº”å½“æ”¾åœ¨èŠ±æ‹¬å· \marg*{} é‡Œé¢ã€‚
æˆ–è€…ä¹Ÿå¯ä»¥é€‰æ‹©å°†æ¢è¡Œå‘½ä»¤å†™æˆ \crcmd\texttt{[0pt]}ã€‚

\pinyinindex{biaoge}{è¡¨æ&nbsp;¼|)}

\section{å›¾ç‰‡}\label{sec:figures}

\pkgindex{graphicx}

\LaTeX{} æœ¬èº«ä¸æ”¯æŒæ’å›¾åŠŸèƒ½ï¼Œéœ€è¦ç”± \pkg{graphicx} å®åŒ…è¾…åŠ©æ”¯æŒã€‚

ä½¿ç”¨ \texttt{latex + dvipdfmx} ç¼–è¯‘å‘½ä»¤æ—¶ï¼Œè°ƒç”¨ \pkg{graphicx} å®åŒ…æ—¶è¦æŒ‡å®š \texttt{dvipdfmx} é€‰é¡¹%
\footnote{æ—©æœŸå¸¸ä½¿ç”¨ \texttt{latex + dvips} ç»„åˆå‘½ä»¤ï¼ŒåŽè€…å°† \texttt{.dvi} æ–‡ä»¶è½¬ä¸º \texttt{.ps} æ–‡ä»¶ï¼ˆPostScriptï¼‰ï¼Œ
å¯è¿›ä¸€æ­¥é€šè¿‡ \texttt{ps2pdf} å·¥å…·ç”Ÿæˆ PDFã€‚\texttt{dvips} å’Œ \texttt{dvipdfmx} åœ¨å›¾å½¢ã€é¢œè‰²ã€è¶…é“¾æŽ¥ç­‰åŠŸèƒ½çš„å®žçŽ°ä¸Šæœ‰å·®åˆ«ï¼Œè€Œ \LaTeX{} æ—&nbsp;æ³•è¯†åˆ«
ç”¨æˆ·æ˜¯ç”¨ \texttt{dvips} è¿˜æ˜¯ \texttt{dvipdfmx}ï¼Œæ‰€ä»¥è¦æŒ‡å®šé€‰é¡¹ï¼ˆç¼ºçœä¸º \texttt{dvips}ï¼‰ã€‚
\ref{sec:hyperlinks} èŠ‚ä¸­çš„ \pkg{hyperref} å®åŒ…åŒç†ã€‚}ï¼›è€Œä½¿ç”¨ \texttt{pdflatex} æˆ– \texttt{xelatex} å‘½ä»¤ç¼–è¯‘æ—¶ä¸éœ€è¦ã€‚

è¯»è€…å¯èƒ½å¬è¯´è¿‡â€œ\LaTeX{} åªèƒ½æ’å…¥ \texttt{.eps} æ&nbsp;¼å¼çš„å›¾ç‰‡ï¼Œéœ€è¦æŠŠ \texttt{.jpg} è½¬æˆ \texttt{.eps} æ&nbsp;¼å¼â€çš„è§‚ç‚¹ã€‚
\LaTeX{} å‘å±•åˆ°ä»Šå¤©ï¼Œè¿™ä¸ªè§‚ç‚¹æ—©å·²è¿‡æ—¶ã€‚äº‹å®žä¸Šä¸åŒç¼–è¯‘å‘½ä»¤æ”¯æŒçš„å›¾ç‰‡æ&nbsp;¼å¼ç§ç±»å„å¼‚ï¼Œè§è¡¨~\ref{tbl:figure-format}ã€‚
è¿™ä¸ªè¡¨æ&nbsp;¼ä¹Ÿèƒ½è§£ç­”è¯¸å¦‚â€œä¸ºä»€ä¹ˆ \texttt{.eps} æ&nbsp;¼å¼å›¾ç‰‡åœ¨ \texttt{pdflatex} ç¼–è¯‘å‘½ä»¤ä¸‹å‡ºé”™â€ä¹‹ç±»çš„é—®é¢˜ã€‚æœ¬è¡¨æ&nbsp;¼ä¹Ÿå†ä¸€æ¬¡è¯´æ˜Žï¼Œä½¿ç”¨
\texttt{xelatex} å‘½ä»¤æ˜¯æˆ‘ä»¬æœ€æŽ¨èçš„æ–¹å¼ã€‚

\begin{table}[htp]
\centering
\caption{å„ç§ç¼–è¯‘æ–¹å¼æ”¯æŒçš„ä¸»æµå›¾ç‰‡æ&nbsp;¼å¼}\label{tbl:figure-format}
\begin{tabular}{*{3}{l}}
 \hline
 \textbf{æ&nbsp;¼å¼}  &amp; \textbf{çŸ¢é‡å›¾} &amp; \textbf{ä½å›¾} \\
 \hline
 \texttt{latex + dvipdfmx}           &amp; \texttt{.eps}      &amp; N/A \\
 \quad $\llcorner$ï¼ˆè°ƒç”¨ \pkg{bmpsize} å®åŒ… ï¼‰   &amp; \texttt{.eps .pdf}     &amp; \texttt{.jpg .png .bmp} \\[.3\baselineskip]
 \texttt{pdflatex}                   &amp; \texttt{.pdf}      &amp; \texttt{.jpg .png} \\
 \quad $\llcorner$ï¼ˆè°ƒç”¨ \pkg{epstopdf} å®åŒ…ï¼‰   &amp; \texttt{.pdf .eps} &amp; \texttt{.jpg .png} \\[.3\baselineskip]
 \texttt{xelatex}                    &amp; \texttt{.pdf .eps} &amp; \texttt{.jpg .png .bmp} \\
 \hline
\end{tabular}
\begin{quote}\footnotesize
æ³¨ï¼šåœ¨è¾ƒæ–°çš„ \TeX{} å‘è¡Œç‰ˆä¸­ï¼Œ\texttt{latex + dvipdfmx} å’Œ \texttt{pdf\-latex} å‘½ä»¤å¯ä¸ä¾èµ–å®åŒ…ï¼Œæ”¯æŒåŽŸæ¥éœ€è¦å®åŒ…æ‰©å±•çš„å›¾ç‰‡æ&nbsp;¼å¼
ï¼ˆä½† \texttt{pdf\-latex} å‘½ä»¤ä»ä¸æ”¯æŒ \texttt{.bmp} æ&nbsp;¼å¼çš„ä½å›¾ï¼‰ã€‚
\end{quote}
\end{table}

\cmdindex[graphicx]{includegraphics}
åœ¨è°ƒç”¨äº† \pkg{graphicx} å®åŒ…ä»¥åŽï¼Œå°±å¯ä»¥ä½¿ç”¨ \cmd{include\-graphics} å‘½ä»¤åŠ&nbsp;è½½å›¾ç‰‡äº†ï¼š
\begin{command}
\cmd{includegraphics}\oarg{options}\marg{filename}
\end{command}

\cmdindex[graphicx]{graphicspath}
å…¶ä¸­ \Arg{filename} ä¸ºå›¾ç‰‡æ–‡ä»¶åï¼Œä¸Ž \cmd{include} å‘½ä»¤çš„ç”¨æ³•ç±»ä¼¼ï¼Œæ–‡ä»¶åå¯èƒ½éœ€è¦ç”¨ç›¸å¯¹è·¯å¾„æˆ–ç»å¯¹è·¯å¾„è¡¨ç¤ºï¼ˆè§ \ref{sec:latex-multi-files} èŠ‚ï¼‰ã€‚
å›¾ç‰‡æ–‡ä»¶çš„æ‰©å±•åä¸€èˆ¬å¯ä¸å†™ã€‚å¦å¤–ä¸€å®šè¦æ³¨æ„ï¼Œ\textbf{æ–‡ä»¶åé‡Œæ—¢ä¸è¦æœ‰ç©ºæ&nbsp;¼ï¼ˆç±»ä¼¼ \cmd{include}ï¼‰ï¼Œä¹Ÿä¸è¦æœ‰å¤šä½™çš„è‹±æ–‡ç‚¹å·}ï¼Œå¦åˆ™å®åŒ…åœ¨è§£æžæ–‡ä»¶åçš„è¿‡ç¨‹ä¸­ä¼šå‡ºé”™ã€‚

å¦å¤– \pkg{graphicx} å®åŒ…è¿˜æä¾›äº† \cmd{graphics\-path} å‘½ä»¤ï¼Œç”¨äºŽå£°æ˜Žä¸€ä¸ªæˆ–å¤šä¸ªå›¾ç‰‡æ–‡ä»¶å­˜æ”¾çš„ç›®å½•ï¼Œ
ä½¿ç”¨è¿™äº›ç›®å½•é‡Œçš„å›¾ç‰‡æ—¶å¯ä¸ç”¨å†™è·¯å¾„ï¼š
\begin{verbatim}
% å‡è®¾ä¸»è¦çš„å›¾ç‰‡æ”¾åœ¨ figures å­ç›®å½•ä¸‹ï¼Œæ&nbsp;‡å¿—æ”¾åœ¨ logo å­ç›®å½•ä¸‹
\graphicspath{{figures/}{logo/}}
\end{verbatim}

åœ¨ \cmd{includegraphics} å‘½ä»¤çš„å¯é€‰å‚æ•° \Arg{options} ä¸­å¯ä»¥ä½¿ç”¨ \Arg{key}=\Arg{value} çš„å½¢å¼ï¼Œ
å¸¸ç”¨çš„å‚æ•°å¦‚ä¸‹ï¼š
\begin{table}[htp]
\centering
\caption{\cmd{includegraphics} å‘½ä»¤çš„å¯é€‰å‚æ•°}\label{tbl:graphics-options}
\begin{tabular}{lp{18em}}
 \hline
 \textbf{å‚æ•°} &amp; \textbf{å«ä¹‰} \\
 \hline
 \texttt{width=}\Arg{width}    &amp;  å°†å›¾ç‰‡ç¼©æ”¾åˆ°å®½åº¦ä¸º \Arg{width} \\
 \texttt{height=}\Arg{height}  &amp;  å°†å›¾ç‰‡ç¼©æ”¾åˆ°é«˜åº¦ä¸º \Arg{height} \\
 \texttt{scale=}\Arg{scale}    &amp;  å°†å›¾ç‰‡ç›¸å¯¹äºŽåŽŸå°ºå¯¸ç¼©æ”¾ \Arg{scale} å€ \\
 \texttt{angle=}\Arg{angle}    &amp;  å°†å›¾ç‰‡é€†æ—¶é’ˆæ—‹è½¬ \Arg{angle} åº¦ \\
 \hline
\end{tabular}
\end{table}

\pkg{graphicx} å®åŒ…ä¹Ÿæ”¯æŒ \texttt{draft}/\texttt{final} é€‰é¡¹ã€‚å½“ \pkg{graphicx} å®åŒ…æˆ–æ–‡æ¡£ç±»æŒ‡å®š
\texttt{draft} é€‰é¡¹æ—¶ï¼Œå›¾ç‰‡å°†ä¸ä¼šè¢«å®žé™…æ’å…¥ï¼Œå–è€Œä»£ä¹‹çš„æ˜¯ä¸€ä¸ªåŒ…å«æ–‡ä»¶åçš„ä¸ŽåŽŸå›¾ç‰‡ç­‰å¤§çš„æ–¹æ¡†ã€‚

\section{ç›’å­}\label{sec:box}

ç›’å­æ˜¯ \LaTeX{} æŽ’ç‰ˆçš„åŸºç¡€å•å…ƒï¼Œè™½ç„¶è§£é‡Šç•¥æœ‰æŠ½è±¡ï¼šæ¯ä¸€è¡Œæ˜¯ä¸€ä¸ªç›’å­ï¼Œé‡Œé¢çš„æ–‡å­—ä»Žå·¦åˆ°å³ä¾æ¬¡æŽ’åˆ—ï¼›
æ¯ä¸€é¡µä¹Ÿæ˜¯ä¸€ä¸ªç›’å­ï¼Œå„è¡Œæ–‡å­—ä»Žä¸Šåˆ°ä¸‹ä¾æ¬¡æŽ’å¸ƒâ€¦â€¦é¢‡æœ‰ä¸€äº›æ´»å­—å°åˆ·æœ¯çš„å‘³é“ã€‚

ä¸ç®¡å¦‚ä½•ï¼Œ\LaTeX{} æä¾›äº†ä¸€äº›å‘½ä»¤è®©æˆ‘ä»¬æ‰‹åŠ¨ç”Ÿæˆä¸€äº›æœ‰ç‰¹å®šç”¨é€”çš„ç›’å­ã€‚

\subsection{æ°´å¹³ç›’å­}\label{subsec:mbox}

\cmdindex{mbox,makebox}
ç”Ÿæˆæ°´å¹³ç›’å­çš„å‘½ä»¤å¦‚ä¸‹ï¼š
\begin{command}
\cmd{mbox}\marg*{\ldots} \\
\cmd{makebox}\oarg{width}\oarg{align}\marg*{\ldots}
\end{command}

\cmd{mbox} ç”Ÿæˆä¸€ä¸ªåŸºæœ¬çš„æ°´å¹³ç›’å­ï¼Œå†…å®¹åªæœ‰ä¸€è¡Œï¼Œä¸å…è®¸åˆ†æ®µï¼ˆé™¤éžåµŒå¥—å…¶å®ƒç›’å­ï¼Œæ¯”å¦‚åŽæ–‡çš„åž‚ç›´ç›’å­ï¼‰ã€‚
å¤–è¡¨çœ‹ä¸ŠåŽ»ï¼Œ\cmd{mbox} çš„å†…å®¹ä¸Žæ­£å¸¸çš„æ–‡æœ¬æ—&nbsp;äºŒï¼Œä¸è¿‡æ–­è¡Œæ—¶æ–‡å­—ä¸ä¼šä»Žç›’å­é‡Œæ–­å¼€ã€‚

\cmd{makebox} æ›´è¿›ä¸€æ­¥ï¼Œå¯ä»¥åŠ&nbsp;ä¸Šå¯é€‰å‚æ•°ç”¨äºŽæŽ§åˆ¶ç›’å­çš„å®½åº¦ \Arg{width}ï¼Œä»¥åŠå†…å®¹çš„å¯¹é½æ–¹å¼ \Arg{align}ï¼Œ
å¯é€‰å±…ä¸­ \texttt{c}ï¼ˆé»˜è®¤å€¼ï¼‰ã€å·¦å¯¹é½ \texttt{l}ã€å³å¯¹é½ \texttt{r} å’Œåˆ†æ•£å¯¹é½ \texttt{s}%
\footnote{åˆ†æ•£å¯¹é½æ–¹å¼å¼ºè¡Œæ‹‰å¼€å•è¯çš„é—´è·ï¼Œå¾€å¾€ä¼šæŠ¥ \texttt{Underfull} \cmd{hbox} çš„è­¦å‘Šã€‚}ã€‚

% æ­¤å¤„ä¼šæœ‰ Underfull \hbox è­¦å‘Š
\begin{example}
|\mbox{Test some words.}|\\
|\makebox[10em]{Test some words.}|\\
|\makebox[10em][l]{Test some words.}|\\
|\makebox[10em][r]{Test some words.}|\\
|\makebox[10em][s]{Test some words.}|
\end{example}

\subsection{å¸¦æ¡†çš„æ°´å¹³ç›’å­}\label{subsec:fbox}

\cmdindex{fbox,framebox}
\cmd{fbox} å’Œ \cmd{framebox} è®©æˆ‘ä»¬å¯ä»¥ä¸ºæ°´å¹³ç›’å­æ·»åŠ&nbsp;è¾¹æ¡†ã€‚ä½¿ç”¨çš„è¯­æ³•ä¸Ž \cmd{mbox} å’Œ \cmd{makebox} ä¸€æ¨¡ä¸€æ&nbsp;·ï¼š
\begin{command}
\cmd{fbox}\marg*{\ldots} \\
\cmd{framebox}\oarg{width}\oarg{align}\marg*{\ldots}
\end{command}
\begin{example}
\fbox{Test some words.}\\
\framebox[10em][r]{Test some words.}
\end{example}

\cmdindex{setlength}
\cmdindex{fboxrule,fboxsep}
å¯ä»¥é€šè¿‡ \cmd{setlength} å‘½ä»¤ï¼ˆè§ \ref{subsec:lengths} å°èŠ‚ï¼‰è°ƒèŠ‚è¾¹æ¡†çš„å®½åº¦ \cmd{fbox\-rule} å’Œå†…è¾¹è· \cmd{fbox\-sep}ï¼š
\begin{example}
\framebox[10em][r]{Test box}\\[1ex]
\setlength{\fboxrule}{1.6pt}
\setlength{\fboxsep}{1em}
\framebox[10em][r]{Test box}
\end{example}

\subsection{åž‚ç›´ç›’å­}\label{subsec:parbox}

\cmdindex{parbox}
\envindex{minipage}
å¦‚æžœéœ€è¦æŽ’ç‰ˆä¸€ä¸ªæ–‡å­—å¯ä»¥æ¢è¡Œçš„ç›’å­ï¼Œ\LaTeX{} æä¾›äº†ä¸¤ç§æ–¹å¼ï¼š
\begin{command}
\cmd{parbox}\oarg{align}\oarg{height}\oarg{inner-align}\marg{width}\marg*{\ldots} \\[0.5ex]
\cmd{begin}\marg*{minipage}\oarg{align}\oarg{height}\oarg{inner-align}\marg{width} \\
\ldots \\
\cmd{end}\marg*{minipage}
\end{command}

å…¶ä¸­ \Arg{align} ä¸ºç›’å­å’Œå‘¨å›´æ–‡å­—çš„å¯¹é½æƒ…å†µï¼ˆç±»ä¼¼ \env{tabular} çŽ¯å¢ƒï¼‰ï¼›
\Arg{height} å’Œ \Arg{inner-align} è®¾ç½®ç›’å­çš„é«˜åº¦å’Œå†…å®¹çš„å¯¹é½æ–¹å¼ï¼Œç±»ä¼¼æ°´å¹³ç›’å­ \cmd{makebox} çš„è®¾ç½®ï¼Œ
ä¸è¿‡ \Arg{inner-align} æŽ¥å—çš„å‚æ•°æ˜¯é¡¶éƒ¨ \texttt{t}ã€åº•éƒ¨ \texttt{b}ã€å±…ä¸­ \texttt{c} å’Œåˆ†æ•£å¯¹é½ \texttt{s}ã€‚

\begin{example}
ä¸‰å­—ç»ï¼š\parbox[t]{3em}%
{äººä¹‹åˆ æ€§æœ¬å–„ æ€§ç›¸è¿‘ ä¹&nbsp;ç›¸è¿œ}
\quad
åƒå­—æ–‡ï¼š
\begin{minipage}[b][8ex][t]{4em}
å¤©åœ°çŽ„é»„ å®‡å®™æ´ªè’
\end{minipage}
\end{example}

\cmdindex{footnote,footnotetext,footnotemark}
å¦‚æžœåœ¨ \env{minipage} é‡Œä½¿ç”¨ \cmd{footnote} å‘½ä»¤ï¼Œç”Ÿæˆçš„è„šæ³¨ä¼šå‡ºçŽ°åœ¨ç›’å­åº•éƒ¨ï¼Œç¼–å·æ˜¯ç‹¬ç«‹çš„ï¼Œå¹¶ä¸”ä½¿ç”¨å°å†™å­—æ¯ç¼–å·ã€‚
è¿™ä¹Ÿæ˜¯ \env{minipage} çŽ¯å¢ƒä¹‹è¢«ç§°ä¸ºâ€œè¿·ä½&nbsp;é¡µâ€ï¼ˆMini-pageï¼‰çš„åŽŸå›&nbsp;ã€‚
è€Œåœ¨ \cmd{parbox} é‡Œæ—&nbsp;æ³•æ­£å¸¸ä½¿ç”¨ \cmd{footnote} å‘½ä»¤ï¼Œåªèƒ½åœ¨ç›’å­é‡Œä½¿ç”¨ \cmd{foot\-note\-mark}ï¼Œåœ¨ç›’å­å¤–ä½¿ç”¨ \cmd{foot\-note\-text}ã€‚
\begin{example}
\fbox{\begin{minipage}{15em}%
  è¿™æ˜¯ä¸€ä¸ªåž‚ç›´ç›’å­çš„æµ‹è¯•ã€‚
  \footnote{è„šæ³¨æ¥è‡ª minipageã€‚}
\end{minipage}}
\end{example}

\subsection{æ&nbsp;‡å°ºç›’å­}\label{subsec:rules}

\cmdindex{rule}
\cmd{rule} å‘½ä»¤ç”¨æ¥ç”»ä¸€ä¸ªå®žå¿ƒçš„çŸ©å½¢ç›’å­ï¼Œä¹Ÿå¯é€‚å½“è°ƒæ•´ä»¥ç”¨æ¥ç”»çº¿ï¼ˆæ&nbsp;‡å°ºï¼‰ï¼š
\begin{command}
\cmd{rule}\oarg{raise}\marg{width}\marg{height}
\end{command}
\begin{example}
Black \rule{12pt}{4pt} box.

Upper \rule[4pt]{6pt}{8pt} and
lower \rule[-4pt]{6pt}{8pt} box.

A \rule[-.4pt]{3em}{.4pt} line.
\end{example}

\section{æµ®åŠ¨ä½“}\label{sec:float}

å†…å®¹ä¸°å¯Œçš„æ–‡ç«&nbsp;æˆ–è€…ä¹¦ç±å¾€å¾€åŒ…å«è®¸å¤šå›¾ç‰‡å’Œè¡¨æ&nbsp;¼ç­‰å†…å®¹ã€‚è¿™äº›å†…å®¹çš„å°ºå¯¸å¾€å¾€å¤ªå¤§ï¼Œå¯¼è‡´åˆ†é¡µå›°éš¾ã€‚
\LaTeX{} ä¸ºæ­¤å¼•å…¥äº†æµ®åŠ¨ä½“çš„æœºåˆ¶ï¼Œä»¤å¤§å—çš„å†…å®¹å¯ä»¥è„±ç¦»ä¸Šä¸‹æ–‡ï¼Œæ”¾ç½®åœ¨åˆé€‚çš„ä½ç½®ã€‚

\envindex{figure,table}
\LaTeX{} é¢„å®šä¹‰äº†ä¸¤ç±»æµ®åŠ¨ä½“çŽ¯å¢ƒ \env{figure} å’Œ \env{table}ã€‚ä¹&nbsp;æƒ¯ä¸Š \env{figure} é‡Œæ”¾å›¾ç‰‡ï¼Œ\env{table} é‡Œæ”¾è¡¨æ&nbsp;¼ï¼Œ
ä½†å¹¶æ²¡æœ‰ä¸¥æ&nbsp;¼é™åˆ¶ï¼Œå¯ä»¥åœ¨ä»»ä½•ä¸€ä¸ªæµ®åŠ¨ä½“é‡Œæ”¾ç½®æ–‡å­—ã€å…¬å¼ã€è¡¨æ&nbsp;¼ã€å›¾ç‰‡ç­‰ç­‰ä»»æ„å†…å®¹ã€‚

ä»¥ \env{table} çŽ¯å¢ƒçš„ç”¨æ³•ä¸¾ä¾‹ï¼Œ\env{figure} åŒç†ï¼š
\begin{command}
\cmd{begin}\marg*{table}\oarg{placement} \\
\ldots \\
\cmd{end}\marg*{table}
\end{command}

\Arg{placement} å‚æ•°æä¾›äº†ä¸€äº›ç¬¦å·ç”¨æ¥è¡¨ç¤ºæµ®åŠ¨ä½“å…è®¸æŽ’ç‰ˆçš„ä½ç½®ï¼Œå¦‚ \texttt{hbp} å…è®¸æµ®åŠ¨ä½“æŽ’ç‰ˆåœ¨å½“å‰ä½ç½®ã€åº•éƒ¨æˆ–è€…å•ç‹¬æˆé¡µã€‚
\env{table} å’Œ \env{figure} æµ®åŠ¨ä½“çš„é»˜è®¤è®¾ç½®ä¸º \texttt{tbp}ã€‚
\begin{table}[htp]
\centering
\caption{æµ®åŠ¨ä½“çš„ä½ç½®å‚æ•°}\label{tbl:float-placement}
\begin{tabular}{*{2}{l}}
 \hline
 \textbf{å‚æ•°} &amp; \textbf{å«ä¹‰} \\
 \hline
 \texttt{h} &amp; å½“å‰ä½ç½®ï¼ˆä»£ç&nbsp;æ‰€å¤„çš„ä¸Šä¸‹æ–‡ï¼‰ \\
 \texttt{t} &amp; é¡¶éƒ¨ \\
 \texttt{b} &amp; åº•éƒ¨ \\
 \texttt{p} &amp; å•ç‹¬æˆé¡µ \\
 \texttt{!} &amp; åœ¨å†³å®šä½ç½®æ—¶å¿½è§†é™åˆ¶ \\
 \hline
\end{tabular}
\begin{quote}\footnotesize
æ³¨ 1ï¼šæŽ’ç‰ˆä½ç½®çš„é€‰å–ä¸Žå‚æ•°é‡Œç¬¦å·çš„é¡ºåºæ—&nbsp;å…³ï¼Œ\LaTeX{} æ€»æ˜¯ä»¥ \texttt{h-t-b-p} çš„ä¼˜å…ˆçº§é¡ºåºå†³å®šæµ®åŠ¨ä½“ä½ç½®ã€‚
ä¹Ÿå°±æ˜¯è¯´ \texttt{[!htp]} å’Œ \texttt{[ph!t]} æ²¡æœ‰åŒºåˆ«ã€‚\par
æ³¨ 2ï¼šé™åˆ¶åŒ…æ‹¬æµ®åŠ¨ä½“ä¸ªæ•°ï¼ˆé™¤å•ç‹¬æˆé¡µå¤–ï¼Œé»˜è®¤æ¯é¡µä¸è¶…è¿‡ 3 ä¸ªæµ®åŠ¨ä½“ï¼Œå…¶ä¸­é¡¶éƒ¨ä¸è¶…è¿‡ 2 ä¸ªï¼Œåº•éƒ¨ä¸è¶…è¿‡ 1 ä¸ªï¼‰
ä»¥åŠæµ®åŠ¨ä½“ç©ºé—´å&nbsp;é¡µé¢çš„ç™¾åˆ†æ¯”ï¼ˆé»˜è®¤é¡¶éƒ¨ä¸è¶…è¿‡ 70\%ï¼Œåº•éƒ¨ä¸è¶…è¿‡ 30\%ï¼‰ã€‚
\end{quote}
\end{table}

\envindex{table*,figure*}
åŒæ&nbsp;æŽ’ç‰ˆçŽ¯å¢ƒä¸‹ï¼Œ\LaTeX{} æä¾›äº† \env{table*} å’Œ \env{figure*} çŽ¯å¢ƒç”¨æ¥æŽ’ç‰ˆè·¨æ&nbsp;çš„æµ®åŠ¨ä½“ã€‚
å®ƒä»¬çš„ç”¨æ³•ä¸Ž \env{table} å’Œ \env{figure} ä¸€æ&nbsp;·ï¼Œä¸åŒä¹‹å¤„ä¸ºåŒæ&nbsp;çš„ \Arg{placement} å‚æ•°åªèƒ½ç”¨ \texttt{tp} ä¸¤ä¸ªä½ç½®ã€‚

\cmdindex{clearpage}
æµ®åŠ¨ä½“çš„ä½ç½®é€‰å–å—åˆ°å…ˆåŽé¡ºåºçš„é™åˆ¶ã€‚å¦‚æžœæŸä¸ªæµ®åŠ¨ä½“ç”±äºŽå‚æ•°é™åˆ¶ã€ç©ºé—´é™åˆ¶ç­‰åŽŸå›&nbsp;åœ¨å½“å‰é¡µæ—&nbsp;æ³•æ”¾ç½®ï¼Œå°±è¦æŽ¨è¿Ÿåˆ°ä¹‹åŽå¤„ç†ï¼Œ
å¹¶ä½¿å¾—ä¹‹åŽçš„åŒç±»æµ®åŠ¨ä½“ä¸€å¹¶æŽ¨è¿Ÿã€‚\cmd{clearpage} å‘½ä»¤ä¼šåœ¨å¦èµ·ä¸€é¡µä¹‹å‰ï¼Œå…ˆå°†æ‰€æœ‰æŽ¨è¿Ÿå¤„ç†çš„æµ®åŠ¨ä½“æŽ’ç‰ˆæˆé¡µï¼Œ
æ­¤æ—¶ \texttt{htbp} ç­‰ä½ç½®é™åˆ¶è¢«å®Œå…¨å¿½ç•¥ã€‚

\pkgindex{float}

\pkg{float} å®åŒ…ä¸ºæµ®åŠ¨ä½“æä¾›äº† \texttt{H} ä½ç½®å‚æ•°ï¼Œä¸ä¸Ž \texttt{htbp} åŠ \texttt{!} æ··ç”¨ã€‚ä½¿ç”¨ \texttt{H} ä½ç½®å‚æ•°æ—¶ï¼Œ
ä¼šå–æ¶ˆæµ®åŠ¨æœºåˆ¶ï¼Œå°†æµ®åŠ¨ä½“è§†ä¸ºä¸€èˆ¬çš„ç›’å­æ’å…¥å½“å‰ä½ç½®ã€‚è¿™åœ¨ä¸€äº›ç‰¹æ®Šæƒ…å†µä¸‹å¾ˆæœ‰ç”¨ï¼ˆå¦‚ä½¿ç”¨ \pkg{multicol} å®åŒ…æŽ’ç‰ˆåˆ†æ&nbsp;å†…å®¹çš„æ—¶å€™ï¼‰ï¼Œ
ä½†å°ºå¯¸è¿‡å¤§çš„æµ®åŠ¨ä½“å¯èƒ½ä½¿å¾—åˆ†é¡µæ¯”è¾ƒå›°éš¾ã€‚

\subsection{æµ®åŠ¨ä½“çš„æ&nbsp;‡é¢˜}\label{subsec:caption}

\cmdindex{caption,label}
å›¾è¡¨ç­‰æµ®åŠ¨ä½“æä¾›äº† \cmd{caption} å‘½ä»¤åŠ&nbsp;æ&nbsp;‡é¢˜ï¼Œå¹¶ä¸”è‡ªåŠ¨ç»™æµ®åŠ¨ä½“ç¼–å·ï¼š
\begin{command}
\cmd{caption}\marg*{\ldots}
\end{command}
\cmd{caption} çš„ç”¨æ³•éžå¸¸ç±»ä¼¼äºŽ \cmd{section} ç­‰å‘½ä»¤ï¼Œå¯ä»¥ç”¨å¸¦æ˜Ÿå·çš„å‘½ä»¤ \cmd{caption*}\footnote{éœ€åŠ&nbsp;è½½ç›¸å…³å®åŒ…ï¼Œå¦‚ \pkg{caption}} ç”Ÿæˆä¸å¸¦ç¼–å·çš„æ&nbsp;‡é¢˜ï¼Œ
ä¹Ÿå¯ä»¥ä½¿ç”¨å¸¦å¯é€‰å‚æ•°çš„å½¢å¼ \cmd{caption}\oarg*{\ldots}\marg*{\ldots}ï¼Œä½¿å¾—åœ¨ç›®å½•é‡Œä½¿ç”¨çŸ­æ&nbsp;‡é¢˜ã€‚
\cmd{caption} å‘½ä»¤ä¹‹åŽè¿˜å¯ä»¥ç´§è·Ÿ \cmd{label} å‘½ä»¤æ&nbsp;‡è®°äº¤å‰å¼•ç”¨ã€‚

\pkgindex{caption}
\cmd{caption} ç”Ÿæˆçš„æ&nbsp;‡é¢˜å½¢å¦‚â€œFigure 1: \ldotsâ€ï¼ˆ\env{figure} çŽ¯å¢ƒï¼‰æˆ–â€œTable 1: \ldotsâ€ï¼ˆ\env{table} çŽ¯å¢ƒï¼‰ã€‚
å¯é€šè¿‡ä¿®æ”¹ \cmd{figurename} å’Œ \cmd{tablename} çš„å†…å®¹æ¥ä¿®æ”¹æ&nbsp;‡é¢˜çš„å‰ç¼€ï¼ˆè¯¦è§ç¬¬ \ref{sec:latex-settings} èŠ‚ï¼‰ã€‚
æ&nbsp;‡é¢˜æ&nbsp;·å¼çš„å®šåˆ¶åŠŸèƒ½ç”± \pkg{caption} å®åŒ…æä¾›ï¼Œè¯¦è§è¯¥å®åŒ…çš„å¸®åŠ©æ–‡æ¡£ï¼Œåœ¨æ­¤ä¸ä½œèµ˜è¿°ã€‚

\cmdindex{listoftables,listoffigures}
\env{table} å’Œ \env{figure} ä¸¤ç§æµ®åŠ¨ä½“åˆ†åˆ«æœ‰å„è‡ªçš„ç”Ÿæˆç›®å½•çš„å‘½ä»¤ï¼š
\begin{command}
\cmd{listoftables} \\
\cmd{listoffigures}
\end{command}

å®ƒä»¬ç±»ä¼¼ \cmd{tableofcontents} ç”Ÿæˆå•ç‹¬çš„ç«&nbsp;èŠ‚ã€‚

\subsection{å¹¶æŽ’å’Œå­å›¾è¡¨}\label{subsec:subfig}

æˆ‘ä»¬æ—¶å¸¸æœ‰åœ¨ä¸€ä¸ªæµ®åŠ¨ä½“é‡Œé¢æ”¾ç½®å¤šå¼&nbsp;å›¾çš„ç”¨æ³•ã€‚æœ€ç®€å•çš„ç”¨æ³•å°±æ˜¯ç›´æŽ¥å¹¶æŽ’æ”¾ç½®ï¼Œ
ä¹Ÿå¯ä»¥é€šè¿‡åˆ†æ®µæˆ–è€…æ¢è¡Œå‘½ä»¤ \crcmd{} æŽ’ç‰ˆå¤šè¡Œå¤šåˆ—çš„å›¾ç‰‡ã€‚ä»¥ä¸‹ä¸ºç¤ºæ„ä»£ç&nbsp;ï¼Œæ•ˆæžœå¤§è‡´å¦‚å›¾ \ref{fig:parallel-fig} æ‰€ç¤ºã€‚
\begin{verbatim}
\begin{figure}[htbp]
  \centering
  \includegraphics[width=...]{...}
  \qquad
  \includegraphics[width=...]{...} \\[...pt]
  \includegraphics[width=...]{...}
  \caption{...}
\end{figure}
\end{verbatim}

\begin{figure}[htp]
  \centering
  \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 10ex\hfil}}
  \qquad
  \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 12ex\hfil}}
  \par\bigskip
  \fcolorbox[gray]{0}{0.96}{\parbox{20em}{\vrule width 0pt height 12ex\hfil}}
  \caption{å¹¶æŽ’æ”¾ç½®å›¾ç‰‡çš„ç¤ºæ„ã€‚}\label{fig:parallel-fig}
\end{figure}

ç”±äºŽæ&nbsp;‡é¢˜æ˜¯æ¨ªè·¨ä¸€è¡Œçš„ï¼Œç”¨ \cmd{caption} å‘½ä»¤ä¸ºæ¯ä¸ªå›¾ç‰‡å•ç‹¬ç”Ÿæˆæ&nbsp;‡é¢˜å°±éœ€è¦å€ŸåŠ©å‰æ–‡æåˆ°çš„ \cmd{parbox}
æˆ–è€… \env{minipage} çŽ¯å¢ƒï¼Œå°†æ&nbsp;‡é¢˜é™åˆ¶åœ¨ç›’å­å†…ã€‚æ•ˆæžœè§å›¾ \ref{fig:parallel-cap1} å’Œå›¾ \ref{fig:parallel-cap2}ã€‚
\begin{verbatim}
\begin{figure}[htbp]
  \centering
  \begin{minipage}{...}
    \centering
    \includegraphics[width=...]{...}
    \caption{...}
  \end{minipage}
  \qquad
  \begin{minipage}{...}
    \centering
    \includegraphics[width=...]{...}
    \caption{...}
  \end{minipage}
\end{figure}
\end{verbatim}

\begin{figure}[htp]
  \centering
  \begin{minipage}{12em}
    \centering
    \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 12ex\hfil}}
    \caption{å¹¶æŽ’å›¾1ã€‚}\label{fig:parallel-cap1}
  \end{minipage}
  \qquad
  \begin{minipage}{12em}
    \centering
    \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 12ex\hfil}}
    \caption{å¹¶æŽ’å›¾2ã€‚}\label{fig:parallel-cap2}
  \end{minipage}
\end{figure}

\pkgindex{subcaption}
\envindex[subcaption]{subfigure}
å½“æˆ‘ä»¬éœ€è¦æ›´è¿›ä¸€æ­¥ï¼Œç»™æ¯ä¸ªå›¾ç‰‡å®šä¹‰å°æ&nbsp;‡é¢˜æ—¶ï¼Œå°±è¦ç”¨åˆ° \pkg{subcaption} å®åŒ…çš„åŠŸèƒ½äº†ã€‚è¿™é‡Œä»…ä¸¾ä¸€ä¾‹ï¼Œ
æ•ˆæžœè§å›¾ \ref{fig:subfigure-cap1} å’Œ \ref{fig:subfigure-cap2}ã€‚æ›´è¯¦ç»†çš„ç”¨æ³•è¯·å‚è€ƒ \pkg{subcaption}
å®åŒ…çš„å¸®åŠ©æ–‡æ¡£ã€‚
\begin{verbatim}
\begin{figure}[htbp]
  \centering
  \begin{subfigure}{...}
    \centering
    \includegraphics[width=...]{...}
    \caption{...}
  \end{subfigure}
  \qquad
  \begin{subfigure}{...}
    \centering
    \includegraphics[width=...]{...}
    \caption{...}
  \end{subfigure}
\end{figure}
\end{verbatim}

\begin{figure}[htp]
  \centering
  \begin{subfigure}{12em}
    \centering
    \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 12ex\hfil}}
    \caption{å¹¶æŽ’å­å›¾ 1}
    \label{fig:subfigure-cap1}
  \end{subfigure}
  \qquad
  \begin{subfigure}{12em}
    \centering
    \fcolorbox[gray]{0}{0.96}{\parbox{10em}{\vrule width 0pt height 12ex\hfil}}
    \caption{å¹¶æŽ’å­å›¾ 2}
    \label{fig:subfigure-cap2}
  \end{subfigure}
  \caption{ä½¿ç”¨ \pkg{subcaption} å®åŒ…çš„ \env{subfigure} çŽ¯å¢ƒæŽ’ç‰ˆå­å›¾ã€‚}
  \label{fig:subcaption}
\end{figure}

\pkgindex{caption,subfig}
\cmdindex[subfig]{subfloat}
\pkg{subcaption} ä¾èµ–ä¸Šæ–‡æåˆ°è¿‡çš„ \pkg{caption} å®åŒ…ï¼Œå›&nbsp;æ­¤ä¹Ÿæ”¯æŒå­å›¾è¡¨æ&nbsp;‡é¢˜æ&nbsp;·å¼çš„å®šåˆ¶ã€‚å¹¶æŽ’å­å›¾è¡¨çš„
åŠŸèƒ½ä¹Ÿå¯é€šè¿‡ \pkg{subfig} å®åŒ…çš„ \cmd{subfloat} å‘½ä»¤å®žçŽ°ï¼Œå…·ä½“è¯·å‚è€ƒå®åŒ…æ–‡æ¡£ã€‚

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