'latex'에 해당되는 글 2

  1. 2009.03.24 Contents Tables and Indices
  2. 2007.11.01 Tex + CJK
카테고리 없음 | Posted by 알 수 없는 사용자 2009. 3. 24. 10:35

Contents Tables and Indices

All LaTeX needs to do is harvest all the headings from your document as it processes it. Basically, all you need to do is to tell LaTeX that you actually want the TOC to appear (a bit like how you need to tell it to show the document title information with \maketitle.

All you need to do is add the following command at the point in the document where the TOC is expected to appear (somewhere inbetween the title and the content):

\tableofcontents

TOC Counter Depth

As happy as you may be with the results (especially given the relatively little effort) there are often things that one may wish to tweak, and the counter depth is perhaps the most common. By default LaTeX TOCs will display to the third level (which is subsection for the book class, or subsubsection in the article class), so we see 1.1.1 in the sample book.

To alter this, use the \setcounter command: \setcounter{tocdepth}{depth}

\setcounter{tocdepth}{1}

Other built-in tables/lists

It's often the case in academic manuscripts, such as theses and text books a List of Tables and List of Figures accompany the Table of Contents. LaTeX also provides convience commands to issue the production of such lists.

\listoffigures
\listoftables
Are all you need to type in order to have these lists automatically generated. It should be obvious, however, that these commands are looking for instances of the figure and table environments.

Linux & Ubuntu/LaTex | Posted by 알 수 없는 사용자 2007. 11. 1. 10:21

Tex + CJK



终于把TeX+CJK搞定啦

baidu
  主要参考了下面两个网页:

  http://learn.tsinghua.edu.cn/homepage/015450/tex_frame.html

  http://www.linuxsir.com/bbs/showthread.php?s=&threadid=48567

  首先安装下面这几个包:

  tetex-base tetex-bin tetex-extra

  不需要安装cjk-latex以及那几个它推荐的中文字体包,因为这个cjk不支持GBK编码,只支持GB编码。

  通过阅读/usr/share/texmf/web2c/texmf.cnf,可知$TEXMFLOCAL设定的是

  /usr/local/share/texmf/

  所以根据第一个网页上的说明,所有的配置都应该针对上面的这个目录进行。

  具体的过程可以参照上面的网页的说明(并不是简单的将gbkfonts的生成文件拷贝过去就行,还需要配置)。此处不再赘述。

  texmf.cnf文件中设定了字体的目录,你可以把它改成你自己的包含有simsun等字体的目录,也可以把simsun等字体拷贝到他默认的目录中(默认的是/usr/local/share/texmf/fonts/truetype/)

   最后需要安装CJK,只要将下载下来的cjk-4.5.2.tar.gz解压缩,并将解开的目录中的texinput中的所有文件和目录拷贝到 /usr/local/share/texmf/tex/CJK/下就行了(不包括texinput这个目录本身,如果CJK目录不在则可以自己建立 之。)