office_tools 版 (精华区)

发信人: vinson (壮志骄阳), 信区: office_tools
标  题: 5.第一次亲密接触---用TeX输出一篇文章 
发信站: 哈工大紫丁香 (2002年01月06日11:35:38 星期天), 站内信件

(5)第一次亲密接触      --- 用TeX输出一篇文章

  +----------------------------------------------------+
  |  本节内容: 以一个article例子看看文章的一般排版格   |
  |  式. title信息详解. 以下仅就例讲解, 详情后续: 章   |
  |  节, 留空(LaTeX的长度表示), 参考文献.              |
  +----------------------------------------------------+

    有了那么多准备知识, 我想现在可以开始深入展开一篇文章
的排版了. 大家可以把以下内容从\documentstyle行开始, 直到
\end{document}行存在一个文本文件中, 如111.tex, 然后编译:
latex 111(因为用到交叉引用, 需要编译两次), 然后用view 111
来浏览此例, view中, 回车翻下页, 退出(具体view的使用
参看CCT的man.dvi)

\documentstyle{article}                 %使用article格式
\topmargin=0pt                          %以下页面设置
\oddsidemargin=0pt \evensidemargin=0pt  %
\textwidth=14cm                         %
\textheight=21cm                        %
                                        %
\title{This is a sample of \LaTeX}      %文章题目
\author{Bigeyes(\tt{chencs@263.net})\\  %作者. 多行用\\
        Department of Mathematics\\     %
        USTC, Anhui, Hefei, 230026      %
                                        %
  \and                                  %如有多作者, 用\and
        A\_A                            %
  \thanks{Supported by ...}             %致谢, 在author里
        \\                              %
        BBS of USTC\\                   %
        bbs.ustc.edu.cn[202.38.64.3]}   %
\date{Mar. 1, 1999}                     %日期, 如果没有此项,
                                        %则以当前日期代替, 若
                                        %不要日期, 则用空{}
                                        %
\begin{document}                        %document开始.
                                        %以上定义标题各项内容,
\maketitle                              %此句产生标题, 不可缺少,
                                        %一般都是正文第一句
\begin{abstract}                        %套用abstract格式
\begin{abstract}                        %套用abstract格式
This is mini-page defined for abstract, %自动形成小页
you only write your abstract in it. If  %
you want to shows keywords, maybe you   %
should use:                             %

{\bf Keywords: }\LaTeX, example         %LaTeX没有keywords环境
\end{abstract}                          %自己手工来做吧
                                        %
\section{The very beginning}            %一个节, 节的使用后详
This is the first section of your       %
article. You may find every first       %一节的第一段缺省情况
paragraph of your section, subsection,  %为段首不自动缩进
chapter or ... always has no            %
``parindent'' at the beginning.         %

This is the second paragrph, you can    %但是以后的段段首
find this has parindent at the          %         自动缩进
beginning. If you want to show          %
parindent at first paragraph too,       %
do as the first paragraph I showed      %
in the next section.                    %
                                        %
\section{The 2nd step}                  %第二节,使用自动标号
\hskip \parindent                       %横向空出\parindent
This is the second section. In this     %从这里大家看到
first paragraph, I use `hskip' to       %\parindent其实是
get the first parindent. Maybe you      %一个长度单位, 长
can get this effect by another way.     %度单位后详
                                        %
\subsection{Sub-sect of 2}              %小节
this                                    %
                                        %
\subsection*{\S 2.2 Another sub of 2}   %节,小节可以不使用
this                                    %自动标号, 这时有关
                                        %的计数器不增加
\section{Conclusion}                    %
I think you have know \TeX well now.    %又是一节
I want to show you how to use           %
bibliography. In the article, you       %参考文献的
can use as ``see \cite{texbook}''.      %引用方法\cite{标识}
                                        %
\begin{thebibliography}{0}              %参考文献列在这里
                                        %{0}表示最长文献序号
                                        %           为一位数
                                        %           为一位数
                                        %\bibitem{标识}
                                        %参考文献使用后详
  \bibitem{texbook} Donald~E.~Knouth, ``The \TeX book'',
        Addison-Wesley, 1984
  \bibitem{lamport} L.\ Lamport, ``\LaTeX:
        A Document Preparation System'',
        Addison-Wesley, 1994
  \bibitem{companion} M.~Goossens, F.~Millelbach,
        and A.~Samarin, ``The \LaTeX\ Companion'',
        Addison--Wesley, 1994
\end{thebibliography}

\end{document}                          %document结束

-- 
--
我梦想着有一天能够——
“拔掉网线,砸烂电脑”,
煮上一杯香醇的咖啡,点上一只烟,
坐在一张能够将我完全淹没的沙发里,
悠闲的阅读一份纸作的报纸,
享受这样一个完全没有网络与电脑的生活。

※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: 210.46.68.52]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:4.130毫秒