LaTex入门:[2]源文件结构

2025-11-20 13:08:59

1、\documentclass{...}这里是头文件,必须以这种命令开头指定文本类型,属性等

LaTex入门:[2]源文件结构

2、这个命令指定了你所写的文档的类别。在此之后,你可以加入控制文档式

样的命令,或者使用如下的命令来调入一些宏集

LaTex入门:[2]源文件结构

3、\usepackage{...}

当完成所有的设置后,你可利用如下的命令来开始你的文档:

\begin{document}

\end{document}

LaTex入门:[2]源文件结构

4、一下是一个简单的例子:

\documentclass[a4paper,11pt]{article}

% define the title

\author{H.~Partl}

\title{Minimalism}

\begin{document}

% generates the title

\maketitle

% insert the table of contents

\tableofcontents

\section{Start}

Well, and here begins my lovely article.

\section{End}

\ldots{} and here it ends.

\end{document}

LaTex入门:[2]源文件结构

5、小伙伴先不理解没关系,慢慢就好了,先把代码复制进去,跟着小编做就可以了,编译出来对比一下就懂了

LaTex入门:[2]源文件结构

6、效果如下图,编译完,dvi pdf就可以点了,编译之前是不能点这个的

LaTex入门:[2]源文件结构

LaTex入门:[2]源文件结构

7、注意,\documentclass[a4paper,11pt]{article}的解释

LaTex入门:[2]源文件结构

8、% define the title 其中  %   是注释,其他如下图

LaTex入门:[2]源文件结构

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢