changeset 292:f72e4be6dd37

intermediate commit.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Thu, 07 Feb 2008 18:56:42 +0900
parents 504f23b4f625
children 3b1291f24c0d
files ja/Makefile ja/Makefile.orig ja/cmdref.tex ja/htlatex.book
diffstat 4 files changed, 330 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/ja/Makefile	Thu Feb 07 15:52:15 2008 +0900
+++ b/ja/Makefile	Thu Feb 07 18:56:42 2008 +0900
@@ -55,6 +55,7 @@
 
 image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
 image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
+image-eps := $(image-dot:%.dot=%.eps) $(image-svg:%.svg=%.eps) $(image-png)
 
 example-sources := \
 	backout \
@@ -108,16 +109,33 @@
 hg-version = $(shell hg version -q | \
 		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
 
-all: pdf html
+all: dvi
+
+dvi: $(sources) $(image-eps) examples
+	platex 00book.tex
+
+	bibtex hgbook
+
+	platex 00book.tex
+	platex 00book.tex
+	platex 00book.tex
+
+
+
+
+
 
 pdf: pdf/hgbook.pdf
 
 define pdf
 	mkdir -p $(dir $@)
 	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
+
 	cp 99book.bib $(dir $@)
+
 	cd $(dir $@) && bibtex $(basename $(notdir $@))
 	cd $(dir $@) && makeindex $(basename $(notdir $@))
+
 	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
 	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
 	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
@@ -212,5 +230,3 @@
 	cp html/split/*.{css,html,png} dist
 	cp $(dist-sources) dist
 
-rsync: install
-	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ja/Makefile.orig	Thu Feb 07 18:56:42 2008 +0900
@@ -0,0 +1,216 @@
+# This makefile requires GNU make.
+
+sources := \
+	00book.tex \
+	99book.bib \
+	99defs.tex \
+	build_id.tex \
+	branch.tex \
+	cmdref.tex \
+	collab.tex \
+	concepts.tex \
+	daily.tex \
+	filenames.tex \
+	hg_id.tex \
+	hgext.tex \
+	hook.tex \
+	intro.tex \
+	mq.tex \
+	mq-collab.tex \
+	mq-ref.tex \
+	preface.tex \
+	srcinstall.tex \
+	template.tex \
+	tour-basic.tex \
+	tour-merge.tex \
+	undo.tex
+
+image-sources := \
+	feature-branches.dot \
+	filelog.svg \
+	kdiff3.png \
+	metadata.svg \
+	mq-stack.svg \
+	note.png \
+	revlog.svg \
+	snapshot.svg \
+	tour-history.svg \
+	tour-merge-conflict.svg \
+	tour-merge-merge.svg \
+	tour-merge-pull.svg \
+	tour-merge-sep-repos.svg \
+	undo-manual.dot \
+	undo-manual-merge.dot \
+	undo-non-tip.dot \
+	undo-simple.dot \
+	wdir.svg \
+	wdir-after-commit.svg \
+	wdir-branch.svg \
+	wdir-merge.svg \
+	wdir-pre-branch.svg
+
+image-dot := $(filter %.dot,$(image-sources))
+image-svg := $(filter %.svg,$(image-sources))
+image-png := $(filter %.png,$(image-sources))
+
+image-pdf := $(image-dot:%.dot=%.pdf) $(image-svg:%.svg=%.pdf) $(image-png)
+image-html := $(image-dot:%.dot=%.png) $(image-svg:%.svg=%.png) $(image-png)
+
+example-sources := \
+	backout \
+	bisect \
+	branching \
+	branch-named \
+	branch-repo \
+	cmdref \
+	daily.copy \
+	daily.files \
+	daily.rename \
+	daily.revert \
+	extdiff \
+	filenames \
+	hook.msglen \
+	hook.simple \
+	hook.ws \
+	issue29 \
+	mq.guards \
+	mq.qinit-help \
+	mq.dodiff \
+	mq.id \
+	mq.tarball \
+	mq.tools \
+	mq.tutorial \
+	rename.divergent \
+	rollback \
+	tag \
+	template.simple \
+	template.svnstyle \
+	tour \
+	tour-merge-conflict
+
+example-prereqs := \
+	/usr/bin/merge
+
+dist-sources := \
+	../html/hgicon.png \
+	../html/index.html.var \
+	../html/index.en.html
+
+latex-options = \
+	-interaction batchmode \
+	-output-directory $(dir $(1)) \
+	-jobname $(basename $(notdir $(1)))
+
+hg = $(shell which hg)
+
+hg-id = $(shell hg parents --template '{node|short}, dated {date|isodate},\n')
+
+hg-version = $(shell hg version -q | \
+		     sed 's,.*(version \(unknown\|[a-f0-9+]*\)),\1,')
+
+all: pdf html
+
+pdf: pdf/hgbook.pdf
+
+define pdf
+	mkdir -p $(dir $@)
+	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
+	cp 99book.bib $(dir $@)
+	cd $(dir $@) && bibtex $(basename $(notdir $@))
+	cd $(dir $@) && makeindex $(basename $(notdir $@))
+	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
+	TEXINPUTS=$(dir $<): pdflatex $(call latex-options,$@) $< || (rm -f $@; exit 1)
+	if grep 'Reference.*undefined' $(@:.pdf=.log); then exit 1; fi
+endef
+
+pdf/hgbook.pdf: $(sources) $(image-pdf) examples
+	$(call pdf)
+
+html: onepage split
+
+onepage: $(htlatex) html/onepage/hgbook.html html/onepage/hgbook.css $(image-html:%=html/onepage/%)
+
+html/onepage/%: %
+	cp $< $@
+
+split: $(htlatex) html/split/hgbook.html html/split/hgbook.css $(image-html:%=html/split/%)
+
+html/split/%: %
+	cp $< $@
+
+# This is a horrible hack to work around the fact that the htlatex
+# command in tex4ht is itself a horrible hack.  I really don't want to
+# include verbatim the big wad of TeX that is repeated in that script,
+# but I've given up and run a hacked copy as htlatex.book here.
+
+define htlatex
+	mkdir -p $(dir $(1))
+	cp 99book.bib $(dir $(1))
+	TEXINPUTS=$(dir $(2)): ./htlatex.book $(2) "bookhtml,html4-uni,$(3)" " -cunihtf -utf8" "$(dir $(1))" "$(call latex-options,$(1))" || (rm -f $(1); exit 1)
+	cd $(dir $(1)) && tex4ht -f/$(basename $(notdir $(1))) -cvalidate -cunihtf
+	cd $(dir $(1)) && t4ht -f/$(basename $(notdir $(1)))
+	./fixhtml.py $(dir $(1))/*.html
+	rm $(dir $(1))/hgbook.css
+endef
+
+html/onepage/hgbook.html: $(sources) $(image-html) examples bookhtml.cfg
+	$(call htlatex,$@,$<)
+
+html/split/hgbook.html: $(sources) examples bookhtml.cfg
+	$(call htlatex,$@,$<,2)
+
+# Produce 90dpi PNGs for the web.
+
+%.png: %.svg
+	inkscape -D -e $@ $<
+
+%.svg: %.dot
+	dot -Tsvg -o $@ $<
+
+# Produce eps & pdf for the pdf
+
+%.pdf: %.eps
+	epstopdf $<
+
+%.eps: %.svg
+	inkscape -E $@ $<
+
+%.eps: %.dot
+	dot -Tps -o $@ $<
+
+examples: $(example-prereqs) examples/.run
+
+examples/.run: $(example-sources:%=examples/%.run)
+	touch examples/.run
+
+examples/%.run: examples/% examples/run-example
+	cd examples && ./run-example $(notdir $<)
+
+changelog := $(wildcard ../.hg/store/00changelog.[id])
+ifeq ($(changelog),)
+changelog := $(wildcard ../.hg/00changelog.[id])
+endif
+
+build_id.tex: $(changelog)
+	echo -n '$(hg-id)' > build_id.tex
+
+hg_id.tex: $(hg)
+	echo -n '$(hg-version)' > hg_id.tex
+
+clean:
+	rm -rf dist html pdf \
+		$(image-dot:%.dot=%.pdf) \
+		$(image-dot:%.dot=%.png) \
+		$(image-svg:%.svg=%.pdf) \
+		$(image-svg:%.svg=%.png) \
+		examples/*.{lxo,run} examples/.run build_id.tex hg_id.tex
+
+install: pdf split $(dist-sources)
+	rm -rf dist
+	mkdir -p dist
+	cp pdf/hgbook.pdf dist
+	cp html/split/*.{css,html,png} dist
+	cp $(dist-sources) dist
+
+rsync: install
+	rsync -avz --delete dist sp.red-bean.com:public_html/hgbook
--- a/ja/cmdref.tex	Thu Feb 07 15:52:15 2008 +0900
+++ b/ja/cmdref.tex	Thu Feb 07 18:56:42 2008 +0900
@@ -90,69 +90,116 @@
 
 \optref{diff}{p}{show-function}
 
-Display the name of the enclosing function in a hunk header, using a
-simple heuristic.  This functionality is enabled by default, so the
-\hgopt{diff}{-p} option has no effect unless you change the value of
-the \rcitem{diff}{showfunc} config item, as in the following example.
+%Display the name of the enclosing function in a hunk header, using a
+%simple heuristic.  This functionality is enabled by default, so the
+%\hgopt{diff}{-p} option has no effect unless you change the value of
+%the \rcitem{diff}{showfunc} config item, as in the following example.
+%\interaction{cmdref.diff-p}
+
+$B%O%s%/%X%C%@$NCf$K4^$^$l$F$$$k4X?t$NL>A0$rI=<($9$k!%8!:w$OC1=c$JH/8+E*J}(B
+$BK!$G9T$J$&!%$3$N5!G=$O%G%U%)%k%H$GM-8z$K$5$l$F$*$j!$(B\hgopt{diff}{-p}$B%*%W(B
+$B%7%g%s$O2<$NNc$N$h$&$K(B\rcitem{diff}{showfunc}$B@_Dj$rJQ99$5$l$k$^$G0UL#$r$J(B
+$B$5$J$$!%(B
 \interaction{cmdref.diff-p}
 
 \optref{diff}{r}{rev}
 
-Specify one or more revisions to compare.  The \hgcmd{diff} command
-accepts up to two \hgopt{diff}{-r} options to specify the revisions to
-compare.
+%Specify one or more revisions to compare.  The \hgcmd{diff} command
+%accepts up to two \hgopt{diff}{-r} options to specify the revisions to
+%compare.
+
+$BHf3S$9$kBP>]$N%j%S%8%g%s$r0l$D0J>e;XDj$9$k!%(B\hgcmd{diff}$B%3%^%s%I$O!$(B
+$BHf3S$9$k%j%S%8%g%s$r;XDj$9$k$?$a$K(B\hgopt{diff}{-r}$B%*%W%7%g%s$r(B2$B$D$^(B
+$B$G<u$1IU$1$k!%(B
+
+%\begin{enumerate}
+%\setcounter{enumi}{0}
+%\item Display the differences between the parent revision of the
+%  working directory and the working directory.
+%\item Display the differences between the specified changeset and the
+%  working directory.
+%\item Display the differences between the two specified changesets.
+%\end{enumerate}
 
 \begin{enumerate}
 \setcounter{enumi}{0}
-\item Display the differences between the parent revision of the
-  working directory and the working directory.
-\item Display the differences between the specified changeset and the
-  working directory.
-\item Display the differences between the two specified changesets.
+\item $B?F%j%S%8%g%s$N%o!<%-%s%0%G%#%l%/%H%j$H!$8=:_$N%o!<%-%s%0%G%#%l%/%H(B
+      $B%j$N:9J,$rI=<(!%(B
+\item $B;XDj$5$l$?%A%'%s%8%;%C%H$H8=:_$N%o!<%-%s%0%G%#%l%/%H%j$N:9J,$rI=<(!%(B
+\item $B;XDj$5$l$?(B2$B$D$N%A%'%s%8%;%C%H4V$N:9J,$rI=<(!%(B
 \end{enumerate}
 
-You can specify two revisions using either two \hgopt{diff}{-r}
-options or revision range notation.  For example, the two revision
-specifications below are equivalent.
+%You can specify two revisions using either two \hgopt{diff}{-r}
+%options or revision range notation.  For example, the two revision
+%specifications below are equivalent.
+
+2$B$D$N%j%S%8%g%s$r;XDj$9$kJ}K!$H$7$F!$(B\hgopt{diff}{-r}$B$r(B2$B$D;H$C$F$b$$$$$7!$(B
+$B%j%S%8%g%s%l%s%85-K!$r;H$C$F$bNI$$!%Nc$($P!$2<$N(B2$B$D$N%j%S%8%g%s;XDj$OEy(B
+$B2A$G$"$k!%(B
 \begin{codesample2}
   hg diff -r 10 -r 20
   hg diff -r10:20
 \end{codesample2}
 
-When you provide two revisions, Mercurial treats the order of those
-revisions as significant.  Thus, \hgcmdargs{diff}{-r10:20} will
-produce a diff that will transform files from their contents as of
-revision~10 to their contents as of revision~20, while
-\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will
-transform files from their revision~20 contents to their revision~10
-contents.  You cannot reverse the ordering in this way if you are
-diffing against the working directory.
+%When you provide two revisions, Mercurial treats the order of those
+%revisions as significant.  Thus, \hgcmdargs{diff}{-r10:20} will
+%produce a diff that will transform files from their contents as of
+%revision~10 to their contents as of revision~20, while
+%\hgcmdargs{diff}{-r20:10} means the opposite: the diff that will
+%transform files from their revision~20 contents to their revision~10
+%contents.  You cannot reverse the ordering in this way if you are
+%diffing against the working directory.
+
+2$B$D$N%j%S%8%g%s$r;XDj$9$k;~!$%j%S%8%g%s;XDj$N=g=x$K$O0UL#$,$"$k!%(B
+\hgcmdargs{diff}{-r10:20}$B$O%U%!%$%k$NFbMF$,%j%S%8%g%s(B10$B$+$i%j%S%8%g%s(B20
+$B$KJQ$o$C$?$H$7$F:9J,$r:n@.$9$k!%(B\hgcmdargs{diff}{-r20:10}$B$G$"$l$P5U$N0U(B
+$BL#$K$J$k!%%o!<%-%s%0%G%#%l%/%H%j$N:9J,$r<h$k>l9g$K$O$3$N$h$&$K%j%S%8%g%s(B
+$B$N=g=x$r5U$K$9$k$3$H$O$G$-$J$$!%(B
 
 \optref{diff}{w}{ignore-all-space}
 
-\cmdref{version}{print version and copyright information}
+\cmdref{version}{$B%P!<%8%g%s>pJs$H%3%T!<%i%$%H>pJs$rI=<($9$k(B}
 
-This command displays the version of Mercurial you are running, and
-its copyright license.  There are four kinds of version string that
-you may see.
+%This command displays the version of Mercurial you are running, and
+%its copyright license.  There are four kinds of version string that
+%you may see.
+$B$3$N%3%^%s%I$O8=:_F0:nCf$N(BMercurial$B$N%P!<%8%g%s$H%3%T!<%i%$%H%i%$%;%s%9(B
+$B$rI=<($9$k!%%a%C%;!<%8$O(B4$B<oN`$"$k!%(B
+%\begin{itemize}
+%\item The string ``\texttt{unknown}''. This version of Mercurial was
+%  not built in a Mercurial repository, and cannot determine its own
+%  version.
+%\item A short numeric string, such as ``\texttt{1.1}''. This is a
+%  build of a revision of Mercurial that was identified by a specific
+%  tag in the repository where it was built.  (This doesn't necessarily
+%  mean that you're running an official release; someone else could
+%  have added that tag to any revision in the repository where they
+%  built Mercurial.)
+%\item A hexadecimal string, such as ``\texttt{875489e31abe}''.  This
+%  is a build of the given revision of Mercurial.
+%\item A hexadecimal string followed by a date, such as
+%  ``\texttt{875489e31abe+20070205}''.  This is a build of the given
+%  revision of Mercurial, where the build repository contained some
+%  local changes that had not been committed.
+%\end{itemize}
 \begin{itemize}
-\item The string ``\texttt{unknown}''. This version of Mercurial was
-  not built in a Mercurial repository, and cannot determine its own
-  version.
-\item A short numeric string, such as ``\texttt{1.1}''. This is a
-  build of a revision of Mercurial that was identified by a specific
-  tag in the repository where it was built.  (This doesn't necessarily
-  mean that you're running an official release; someone else could
-  have added that tag to any revision in the repository where they
-  built Mercurial.)
-\item A hexadecimal string, such as ``\texttt{875489e31abe}''.  This
-  is a build of the given revision of Mercurial.
-\item A hexadecimal string followed by a date, such as
-  ``\texttt{875489e31abe+20070205}''.  This is a build of the given
-  revision of Mercurial, where the build repository contained some
-  local changes that had not been committed.
+\item $BJ8;zNs(B``\texttt{unknown}''$B!%(B $B$3$N%P!<%8%g%s$N(BMercurial$B$O(BMercurial$B%j(B
+      $B%]%8%H%j$NCf$G%S%k%I$5$l$?$N$G$O$J$$$?$a!$<+J,<+?H$N%j%S%8%g%s$OJ,(B
+      $B$+$i$J$$(B
+\item ``\texttt{1.1}''$B$N$h$&$JC;$$?tCMJ8;zNs!%$3$l$O%S%k%I%j%]%8%H%jFb$G(B
+      $B%?%0IU$1$5$l$?FCDj$N%j%S%8%g%s$N(BMercurial$B$G$"$k$3$H$r<($9!%!J$3$l$O(B
+      $B@5<0%j%j!<%9HG$G$"$k$H$$$&$3$H$rI,$:$7$b0UL#$7$J$$!%(BMercurial$B$r%S%k(B
+      $B%I$9$k%j%]%8%H%j$G%?%0$rIU$1$k$N$OC/$G$b$I$N%j%S%8%g%s$KBP$7$F$b2D(B
+      $BG=$G$"$k!K(B
+\item ``\texttt{875489e31abe}''$B$N$h$&$J(B16$B?J?tJ8;zNs!%$3$l$O(BMercurial$B$,I=(B
+      $B<($5$l$?%j%S%8%g%s$N%S%k%I$G$"$k$3$H$r<($9!%(B
+
+\item ``\texttt{875489e31abe+20070205}''$B$N$h$&$J(B16$B?JJ8;zNs!\F|IU!%$3$l$O(B
+      $B$=$N%j%S%8%g%s$KBP$7$F%3%_%C%H$5$l$F$$$J$$%m!<%+%k$JJQ99$r2C$($?%=!<(B
+      $B%9$+$i%S%k%I$5$l$?(BMercurial$B$G$"$k$3$H$r<($9!%(B
 \end{itemize}
 
+%\subsection{Tips and tricks}
 \subsection{Tips and tricks}
 
 \subsubsection{Why do the results of \hgcmd{diff} and \hgcmd{status}
@@ -203,6 +250,6 @@
 binary patches at all.
 
 %%% Local Variables: 
-%%% mode: latex
+%%% mode: yatex
 %%% TeX-master: "00book"
 %%% End: 
--- a/ja/htlatex.book	Thu Feb 07 15:52:15 2008 +0900
+++ b/ja/htlatex.book	Thu Feb 07 18:56:42 2008 +0900
@@ -5,8 +5,12 @@
 # pain reading it causes.
 
 latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+
 (cd $4 && bibtex hgbook)
 (cd $4 && makeindex hgbook)
-latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+
 latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+
+latex $5 '\makeatletter\def\HCode{\futurelet\HCode\HChar}\def\HChar{\ifx"\HCode\def\HCode"##1"{\Link##1}\expandafter\HCode\else\expandafter\Link\fi}\def\Link#1.a.b.c.{\g@addto@macro\@documentclasshook{\RequirePackage[#1,html]{tex4ht}}\let\HCode\documentstyle\def\documentstyle{\let\documentstyle\HCode\expandafter\def\csname tex4ht\endcsname{#1,html}\def\HCode####1{\documentstyle[tex4ht,}\@ifnextchar[{\HCode}{\documentstyle[tex4ht]}}}\makeatother\HCode '$2'.a.b.c.\input ' $1
+
 echo status $$