最初の状態 から ”Chapter”を 追加した TeX ファイルを 作成。
$ ls -l |sed 1d
-rw-r--r-- 1 fdopstm users 1085 7月 9日 10:25 0119.tex
$ cp 0119.tex 0120.tex
$ emacs 0120.tex &
$ diff -s 0119.tex 0120.tex
21a22,25
> \chapter{ADD Chapter}
>
> Only add Chapter
>
これで ”abstract” の ”See Chapter 2” の 数字が 1個 ” Chapter”を追加したので 数字”2”が 変わって ”3”に なるということが 確認できれば良い ということです。当然 ”Chapter”を 追加したので 総頁 数も 変わるというこ とですが それはまた別問題ですので ”abstract”のみ確認します。
$ ls -l | sed 1d -rw-r--r-- 1 fdopstm users 1085 7月 9日 11:57 0119.tex -rw-r--r-- 1 fdopstm users 1126 7月 9日 12:00 0120.tex $ platex 0120.tex This is pTeX, Version 3.14159-p3.1.3 (euc) (Web2C 7.4.5) (./0120.tex pLaTeX2e <2001/09/04>+0 (based on LaTeX2e <2001/06/01> patch level 0) (/usr/share/texmf/tex/latex/base/report.cls Document Class: report 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) No file 0120.aux. [1] No file 0120.toc. [1] LaTeX Warning: Reference `ch:anoth' on page 1 undefined on input line 13. [1] Chapter 1. [1] Chapter 2. [2] Chapter 3. [3] [4] Appendix A. [5] (./0120.aux) LaTeX Warning: There were undefined references. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. ) Output written on 0120.dvi (8 pages, 2592 bytes). Transcript written on 0120.log. $ platex 0120.tex This is pTeX, Version 3.14159-p3.1.3 (euc) (Web2C 7.4.5) (./0120.tex pLaTeX2e <2001/09/04>+0 (based on LaTeX2e <2001/06/01> patch level 0) (/usr/share/texmf/tex/latex/base/report.cls Document Class: report 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size11.clo)) (./0120.aux) [1] (./0120.toc) [1] [1] Chapter 1. [1] Chapter 2. [2] Chapter 3. [3] [4] Appendix A. [5] (./0120.aux) ) Output written on 0120.dvi (8 pages, 3348 bytes). Transcript written on 0120.log. $ ls -l | sed 1d -rw-r--r-- 1 fdopstm users 1085 7月 9日 11:57 0119.tex -rw-r--r-- 1 fdopstm users 793 7月 9日 12:10 0120.aux -rw-r--r-- 1 fdopstm users 3348 7月 9日 12:10 0120.dvi -rw-r--r-- 1 fdopstm users 4067 7月 9日 12:10 0120.log -rw-r--r-- 1 fdopstm users 1126 7月 9日 12:00 0120.tex -rw-r--r-- 1 fdopstm users 345 7月 9日 12:10 0120.toc
さて 出力を 見てみましょう
$ xdvi 0120.dvi &
概要 の 所です ”Chapter” を 1個追加したので 引用の所は ”2”で有ったものが ”3” に なっています。

TeXファイルを おいておきます
\documentclass[a4paper,11pt]{report}
\begin{document}
\title{A Simple Document}
\author{Me}
\maketitle
\tableofcontents
\begin{abstract}
A brief document to illustrate how to use \LaTeX.
See Chapter \ref{ch:anoth}
\end{abstract}
\chapter{Introduction}
\section{The First Section}
This is a simple \LaTeX\ document.
Here is the first paragraph.
\chapter{ADD Chapter} % 単に追加
Only add Chapter % 単に追加
\section{The Next Section}
Here is the second paragraph. As you can see it's a very
short document\footnote{with a footnote}.
This document was created on: \today.
\chapter{Another Chapter}
\label{ch:anoth}
Here's another very interesting chapter.
We're going to put a picture here later.
\chapter*{Acknowledgements}
I would like to acknowledge all those
very helpful people who have assisted me in my work.
\appendix
\chapter{Tables}
We will turn this tabular environment into a table later.
\begin{tabular}{lrr}
& \multicolumn{2}{c}{\bfseries Expenditure}\\
& \multicolumn{1}{c}{Year1} & \multicolumn{1}{c}{Year2}\\
\bfseries Travel & 100,000 & 110,000\\
\bfseries Equipment & 50,000 & 60,000
\end{tabular}
\end{document}
にゃんたろう 拝!
2008年 7月 9日 (水) 21:00:11 JST 作成