首先下载CTEX,然后安装,接着启动winedit.
先输出一个hello world.
\documentclass{article}
\begin{document}
Hello World!
\end{document}
接着我们添加一个标题页:
\documentclass{article}
\title{My First Document}
\date{\today}
\author{C. L}
\begin{document}
\maketitle
\newpage
Hello World!
\end{document}
上面输出文档的缺点是标题页也出现了页码编号,下面我们来解决这个问题。并添加一些注释:
\documentclass{article}
%--------Start of the area of preamble-------
\title{My First Document}
\date{\today}
\author{C. L}
%--------End of the area of preamble---------
%-------Start of the are of document---------
\begin{document}
\maketitle
\pagenumbering{gobble}
\newpage
Hello World!
\pagenumbering{arabic}
\end{document}
%------End of the area of document-----------
总结一下:
1. 每个文档都有preamble部分和document部分。
2. document environment总是需要被定义
3. 命令以\开始
4. 一个environment总有一个begin标志和end标志
5. pagenumbering命令有以下三个选项:
1)gobble,不显示页码
2)arabic,阿拉伯数字页码
3)roman,罗马数字页码
参考: