1. 程式人生 > >LaTex學習教程——文章標題、目錄及段落

LaTex學習教程——文章標題、目錄及段落

\documentclass{article}
   \title{Hello World}  %———總標題
\begin{document}
   \maketitle % —— 顯示標題
\tableofcontents %—— 製作目錄(目錄是根據標題自動生成的)
   \section{Hello China} %——一號子標題  China is in East Asia.
     \subsection{Hello Beijing} %——二號子標題  Beijing is the capital of China.
       \subsubsection{Hello Dongcheng District}  %——三號子標題
         \paragraph
{Tian'anmen Square}is in the center of Beijing \subparagraph{Chairman Mao} is in the center of Tian'anmen Square \subsection{Hello Guangzhou} \paragraph{Sun Yat-sen University} is the best university in Guangzhou. \end{document}

將上述程式碼複製到WinEdt中去 可生成如下PDF檔案:
將上述程式碼複製到WinEdt中去 可生成如下PDF檔案:

Latex的文件層次結構大約有5層,分別是:
section — subsection — subsubsection — paragraph — subparagraph