您的位置首页生活百科

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

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

的有关信息介绍如下:

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

LaTex入门系列

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

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

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

\usepackage{...}

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

\begin{document}

\end{document}

一下是一个简单的例子:

\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}

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

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

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

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