第10.1节:article
何时使用article类?用于科学期刊文章、演示文稿、短篇报告、程序文档、邀请函等。此类的特性是什么?article 不包含章(chapter)或部分(part)。它可以划分为节(section)、小节(subsection)、段落(paragraph)等。默认情况下,标题显示在第一页的顶部,而不是单独的标题页。简单示例
\documentclass{article}\title{Hello world}\author{Me}\date{today}\begin{document}\maketitleHello, World!\end{document}
第10.2节:beamer
此类的特性是什么?输出是横向的。文档被分隔成“帧”(frames,即幻灯片)。简单示例以下示例改编自 sharelatex.com/learn/Beamer\documentclass{beamer}\usepackage[utf8]{inputenc}\title{Sample title}\author{Me}\date{today}\begin{document}\frame{\titlepage}\begin{frame}\frametitle{Sample frame title}This is a text in first frame.This is a text in first frame.This is a text in first frame.\end{frame}\end{document}
第10.3节:定义文档类
每个 LaTeX 程序的第一行都应该执行此操作。其形式应为 \documentclass{...}。花括号内的内容非常重要。某些文档类会提供额外的命令供你使用,另一些则使用不同的格式,并且所有文档类都有特定的参数可以输入(详见参数部分)。