开始
\documentclass[选项]{类型}
\begin{document}
\end{document}
以上三句代码是LaTeX最基本的语句。\document{}确定一定的文章格式,常用的格式有article(文章)report(报告)slides(演示,ppt等)book(书籍)。注意以上提到的格式可以写英文文档,但不能直接写中文文档。
针对中文,可以使用\documentclass[UTF8]{ctexart},以及cTeX中对应的其他文档类。
\begin{document}、\end{document}中间是正文部分,主要的文字内容几乎都在这个环境中。
以下语句可以排版一个非常简单的文件:
\documentclass{article}
\begin{document}
hello world
\end{document}
最终生成的pdf中即为一句“hello world”。
增添元素
标题、作者和日期
一篇文章通常会包含标题、作者、日期等,这些内容可以通过添加一些代码实现。
\documentclass{article}
\title{Pride and Prejudice}
\author{Jane Austen}
\date{\today}
\begin{document}
\maketitle
It is a truth universally acknowledged, that a
single man in possession of a good fortune must
be in want of a wife. However little known the
feelings or views of such a man may be on his
first entering a neighbourhood, this truth is
so well fixe

最低0.47元/天 解锁文章
977

被折叠的 条评论
为什么被折叠?



