LaTeX 的檔頭部份, 可以設定標題 (title)、作者 (author) 和日期 (date), 其語法如下:
\documentclass[12pt]{article} \title{My first work of \LaTeX} \author{Wei-Chang Shann \and Zhangjw\footnote{Shann is a teacher, and Zhangjw is a student.}} \date{July 18, 2002} \begin{document} \maketitle This is my first work in \LaTeX. \end{document}
檔頭的部分 (標題、作者、日期) 必須寫在 \documentclass 以及 \begin{document} 之間。 而指令 \maketitle 要寫在 \begin{document} 之後, 其功能是用來排版檔頭內所設定的資料: 根據檔頭的定義,檔頭裡面寫的是「關於本文的資料」,它們是不應該被排版出來的。 如果沒有寫 \maketitle,則 LaTeX 就不會排版那一部分的資訊了。
檔頭的部分,可以不必寫日期,因為 LaTeX 會自動向作業系統索取現在的日期。 您可以將上述範例中 \date 部分刪除來測試。
在上述的內容中,會發現有一些指令還沒作介紹,以下介紹那些指令的功用: