最初の状態
$ ls -l |sed 1d -rw-r--r-- 1 fdopstm users 1085 7月 9日 10:25 0119.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.
\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}
”abstract” の ”See Chapter \ref{ch:anoth}” という所で ”\label{ch:anoth}” を 引用したい というこ とです。この結果は 数字の ”2”が出てくるだけですよ!
See Chapter 2
に なるだけです。
platex の処理を します 1回目です
$ platex 0119.tex This is pTeX, Version 3.14159-p3.1.3 (euc) (Web2C 7.4.5) (./0119.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 0119.aux. [1] No file 0119.toc. [1] LaTeX Warning: Reference `ch:anoth' on page 1 undefined on input line 13. [1] Chapter 1. [1] Chapter 2. [2] [3] Appendix A. [4] (./0119.aux) LaTeX Warning: There were undefined references. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. ) Output written on 0119.dvi (7 pages, 2432 bytes). Transcript written on 0119.log.
散々に おしかりを 受けます
$ ls -l | sed 1d -rw-r--r-- 1 fdopstm users 644 7月 9日 10:51 0119.aux -rw-r--r-- 1 fdopstm users 2432 7月 9日 10:51 0119.dvi -rw-r--r-- 1 fdopstm users 4269 7月 9日 10:51 0119.log -rw-r--r-- 1 fdopstm users 1085 7月 9日 10:25 0119.tex -rw-r--r-- 1 fdopstm users 290 7月 9日 10:51 0119.toc
何かしら 出来ています。当然 十全なものでは 無いはずです。少なくとも” contents”は空っぽでした 今回はそこと ”abstract” 引用した所のみの 表示 を 見ておきます。
$ xdvi 0119.dvi &
目次の 所です 1回目なので 内容はありません。

概要 の 所です 1回目なので 引用の所は ”??” に なっています。

そこで再度 platex を 行います。
$ platex 0119.tex This is pTeX, Version 3.14159-p3.1.3 (euc) (Web2C 7.4.5) (./0119.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)) (./0119.aux) [1] (./0119.toc) [1] [1] Chapter 1. [1] Chapter 2. [2] [3] Appendix A. [4] (./0119.aux) ) Output written on 0119.dvi (7 pages, 3148 bytes). Transcript written on 0119.log.
”dvi”ファイルが大きくなっています。なにか違うのでしょう
$ ls -l | sed 1d -rw-r--r-- 1 fdopstm users 644 7月 9日 11:23 0119.aux -rw-r--r-- 1 fdopstm users 3148 7月 9日 11:23 0119.dvi -rw-r--r-- 1 fdopstm users 4050 7月 9日 11:23 0119.log -rw-r--r-- 1 fdopstm users 1085 7月 9日 10:25 0119.tex -rw-r--r-- 1 fdopstm users 290 7月 9日 11:23 0119.toc
今回も 先程 見た 同じ所のみ 確認します。
$ xdvi 0119.dvi &
目次の 所です 2回目なので 目次が作成されました。

概要 の 所です 2回目なので 引用の所は ”2” に なっています。

いいですか 引用といっても高々 ”\chapter{Another Chapter}” が ”2” であるので その数字 ”2”が 表示されるということです。
ただし その強烈な 所は 自動的に つまり platex する事により 決められる ということです。(実際の 確認を してみれば 理解できるでしょう ここでは 未だしていないのですが?)
にゃんたろう 拝!
2008年 7月 9日 (水) 21:00:11 JST 作成