annotate ja/template.tex @ 790:ac38c95a2ace

Propagate 231c8469a0ec Removed a paragraph that is no longer true as of Subversion 1.5.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Thu, 18 Jun 2009 16:23:58 +0900
parents bc92b28fc970
children 8a3041e6f3cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
1 %\chapter{Customising the output of Mercurial}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
2 \chapter{Mercurial$B$N=PNO$N%+%9%?%^%$%:(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
3 \label{chap:template}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
4
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
5 %Mercurial provides a powerful mechanism to let you control how it
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
6 %displays information. The mechanism is based on templates. You can
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
7 %use templates to generate specific output for a single command, or to
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
8 %customise the entire appearance of the built-in web interface.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
9
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
10 Mercurial$B$K$O>pJs$NI=<($r%3%s%H%m!<%k$9$k$?$a$N6/NO$J5!9=$,$"$k!%$3$N5!9=(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
11 $B$O%F%s%W%l!<%H$r%Y!<%9$H$7$F$$$k!%%F%s%W%l!<%H$K$h$C$F$"$k%3%^%s%I$+$iFC(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
12 $BJL$N=PNO$r9T$C$?$j!$FbB"$N%&%'%V%$%s%?%U%'!<%9$N8+$?L\$r%+%9%?%^%$%:$9$k(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
13 $B$3$H$,$G$-$k!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
14
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
15 %\section{Using precanned output styles}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
16 \section{$BMQ0U$5$l$?=PNO%9%?%$%k$NMxMQ(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
17 \label{sec:style}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
18
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
19 %Packaged with Mercurial are some output styles that you can use
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
20 %immediately. A style is simply a precanned template that someone
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
21 %wrote and installed somewhere that Mercurial can find.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
22
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
23 $B$9$0$K;H$&$3$H$N$G$-$k$$$/$D$+$N%9%?%$%k$,(BMercurial$B$KF1:-$5$l$F$$$k!%%9%?(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
24 $B%$%k$H$O4L5M$5$l$?%F%s%W%l!<%H$G$"$j!$(B Mercurial$B$N%$%s%9%H!<%k$5$l$?$I$3(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
25 $B$+$N%^%7%s$GC/$+$,=q$$$F%$%s%9%H!<%k$7$?$b$N$G$"$k!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
26
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
27 %Before we take a look at Mercurial's bundled styles, let's review its
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
28 %normal output.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
29
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
30 Mercurial$BF1:-$N%9%?%$%k$r8+$kA0$K!$DL>o$N=PNO$r8+$F$_$h$&!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
31
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
32 \interaction{template.simple.normal}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
33
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
34 %This is somewhat informative, but it takes up a lot of space---five
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
35 %lines of output per changeset. The \texttt{compact} style reduces
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
36 %this to three lines, presented in a sparse manner.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
37
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
38 $B$3$N=PNO$K$OM-1W$J>pJs$,4^$^$l$F$$$k$,!$(B1$B$D$N%A%'%s%8%;%C%HKh$K(B5$B9T$r;H$&(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
39 $B$J$I!$B?$/$N%9%Z!<%9$rHq$d$9!%(B\texttt{compact}$B%9%?%$%k$OAB$i$JJ}K!$r;H$&(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
40 $B$3$H$G$3$l$r(B3$B9T$K8:$i$9!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
41
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
42 \interaction{template.simple.compact}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
43
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
44 %The \texttt{changelog} style hints at the expressive power of
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
45 %Mercurial's templating engine. This style attempts to follow the GNU
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
46 %Project's changelog guidelines\cite{web:changelog}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
47
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
48 \texttt{changelog}$B%9%?%$%k$O(BMercurial$B$N%F%s%W%l!<%H%(%s%8%s$N0RNO$rCN$k$$(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
49 $B$$Nc$G$"$k!%$3$N%9%?%$%k$O(BGNU$B%W%m%8%'%/%H$N(Bchangelog$B%,%$%I%i%$%s(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
50 \cite{web:changelog}$B$K=>$*$&$H$9$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
51
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
52 \interaction{template.simple.changelog}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
53
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
54 %You will not be shocked to learn that Mercurial's default output style
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
55 %is named \texttt{default}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
56
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
57 Mercurial$B$N%G%U%)%k%H=PNO%9%?%$%k$,(B\texttt{default}$B$HL>IU$1$i$l$F$$$k$N(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
58 $B$O6C$/$KCM$7$J$$!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
59
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
60 %\subsection{Setting a default style}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
61 \subsection{$B%G%U%)%k%H%9%?%$%k$N@_Dj(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
62
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
63 %You can modify the output style that Mercurial will use for every
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
64 %command by editing your \hgrc file, naming the style you would
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
65 %prefer to use.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
66
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
67 Mercurial$B$NA4$F$N%3%^%s%I$GMQ$$$i$l$k=PNO%9%?%$%k$O(B \hgrc $B%U%!%$%k$rJT=8(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
68 $B$9$k$3$H$G@_Dj$G$-!$9%$-$JL>A0$rIU$1$k$3$H$,$G$-$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
69
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
70 \begin{codesample2}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
71 [ui]
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
72 style = compact
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
73 \end{codesample2}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
74
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
75 %If you write a style of your own, you can use it by either providing
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
76 %the path to your style file, or copying your style file into a
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
77 %location where Mercurial can find it (typically the \texttt{templates}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
78 %subdirectory of your Mercurial install directory).
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
79
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
80 $B<+J,$G%9%?%$%k$r=q$$$?$H$-$O!$%9%?%$%k%U%!%$%k$N%Q%9$rDI2C$7$?$j!$%U%!%$(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
81 $B%k$r(BMercurial$B$,H/8+$G$-$k>l=j(B($BE57?E*$K$O!$(BMercurial$B$N%$%s%9%H!<%k%G%#%l%/(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
82 $B%H%j$N(B\texttt{templates}$B%5%V%G%#%l%/%H%j(B)$B$K%3%T!<$9$k$3$H$GMxMQ2DG=$K$J(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
83 $B$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
84
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
85 %\section{Commands that support styles and templates}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
86 \section{$B%9%?%$%k$H%F%s%W%l!<%H$r%5%]!<%H$9$k%3%^%s%I(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
87
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
88 %All of Mercurial's ``\texttt{log}-like'' commands let you use styles
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
89 %and templates: \hgcmd{incoming}, \hgcmd{log}, \hgcmd{outgoing}, and
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
90 %\hgcmd{tip}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
91
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
92 Mercurial$B$N(B``\texttt{log}$B7O(B''$B$NA4$F$N%3%^%s%I(B: \hgcmd{incoming},
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
93 \hgcmd{log}, \hgcmd{outgoing}, $B$*$h$S(B\hgcmd{tip}$B$O%9%?%$%k$H%F%s%W%l!<%H(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
94 $B$rMxMQ$7$F$$$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
95
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
96 %As I write this manual, these are so far the only commands that
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
97 %support styles and templates. Since these are the most important
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
98 %commands that need customisable output, there has been little pressure
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
99 %from the Mercurial user community to add style and template support to
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
100 %other commands.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
101
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
102 $B$3$N%^%K%e%"%k$G=q$$$F$$$k$h$&$K!$$3$l$^$G$N$H$3$m!$$3$l$i$N%3%^%s%I$@$1(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
103 $B$,%9%?%$%k$H%F%s%W%l!<%H$r%5%]!<%H$7$F$$$k!%$3$l$i$,%+%9%?%^%$%:2DG=$J=P(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
104 $BNO$,I,MW$J:G$b=EMW$J%3%^%s%I$G$"$k$?$a!$(B Mercurial$B$N%f!<%6%3%_%e%K%F%#$+(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
105 $B$iB>$N%3%^%s%I$K%9%?%$%k$H%F%s%W%l!<%H%5%]!<%H$rE,MQ$+$N$&$K$;$h$H$$$&%W(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
106 $B%l%C%7%c!<$O$[$H$s$I$J$$!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
107
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
108 %\section{The basics of templating}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
109 \section{$B%F%s%W%l!<%H$N4pK\(B}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
110
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
111 %At its simplest, a Mercurial template is a piece of text. Some of the
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
112 %text never changes, while other parts are \emph{expanded}, or replaced
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
113 %with new text, when necessary.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
114
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
115 $B:G$bC1=c$J(BMercurial$B%F%s%W%l!<%H$O%F%-%9%HJR$G$"$k!%%F%-%9%H$N$"$kItJ,$OIT(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
116 $BJQ$G!$B>$NItJ,$OI,MW$K1~$8$F(B\emph{$BE83+(B}$B$5$l$k$?$j?7$7$$%F%-%9%H$KCV49$5$l(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
117 $B$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
118
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
119 %Before we continue, let's look again at a simple example of
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
120 %Mercurial's normal output.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
121
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
122 $B$5$i$KB3$1$kA0$K(BMercurial$BI8=`=PNO$NNc$r$b$&0lEY8+$F$_$h$&!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
123
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
124 \interaction{template.simple.normal}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
125
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
126 %Now, let's run the same command, but using a template to change its
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
127 %output.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
128
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
129 $B$3$3$GF1$8%3%^%s%I$r=PNO$rJQ2=$5$;$k$?$a$K%F%s%W%l!<%H$r;H$C$F$_$h$&!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
130
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
131 \interaction{template.simple.simplest}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
132
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
133 %The example above illustrates the simplest possible template; it's
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
134 %just a piece of static text, printed once for each changeset. The
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
135 %\hgopt{log}{--template} option to the \hgcmd{log} command tells
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
136 %Mercurial to use the given text as the template when printing each
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
137 %changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
138
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
139 $B>e$NNc$O:G$bC1=c$J%F%s%W%l!<%H$r<($7$?(B; $B@EE*$J%F%-%9%H$@$1$+$i$J$j!$3F%A%'(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
140 $B%s%8%;%C%H$K$D$$$F0lEY$@$1=PNO$r9T$&!%(B\hgcmd{log}$B%3%^%s%I$K(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
141 \hgopt{log}{--template}$B%*%W%7%g%s$r;H$&$H(BMercurial$B$O3F!9$N%A%'%s%8%;%C%H(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
142 $B$r=PNO$9$k$H$-$K!$M?$($i$l$?%F%-%9%H$r%F%s%W%l!<%H$H$7$FMQ$$$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
143
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
144 %Notice that the template string above ends with the text
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
145 %``\Verb+\n+''. This is an \emph{escape sequence}, telling Mercurial
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
146 %to print a newline at the end of each template item. If you omit this
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
147 %newline, Mercurial will run each piece of output together. See
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
148 %section~\ref{sec:template:escape} for more details of escape sequences.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
149
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
150 $B%F%s%W%l!<%HJ8;zNs$O(B``\Verb+\n+''$B$G=*$k$3$H$KCm0U!%$3$l$O(BMercurial$B$K%F%s(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
151 $B%W%l!<%H$N3FMWAG$NKvHx$K2~9T$r=PNO$9$k$h$&;X<($9$k(B\emph{$B%(%9%1!<%W%7!<%1(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
152 $B%s%9(B}$B$G$"$k!%$3$N2~9T$r>JN,$9$k$H(BMercurial$B$O3FMWAG$r7R$2$F=PNO$9$k!%%(%9(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
153 $B%1!<%W%7!<%1%s%9$N$h$j>\:Y$J@bL@$K$D$$$F$O(B~\ref{sec:template:escape}$B@a$r(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
154 $B;2>H$N$3$H!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
155
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
156 %A template that prints a fixed string of text all the time isn't very
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
157 %useful; let's try something a bit more complex.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
158
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
159 $B>o$K8GDjJ8;zNs$r=PNO$9$k%F%s%W%l!<%H$O$"$^$jM-MQ$G$"$k$H$O8@$($J$$!%$b$&(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
160 $B>/$79~$_F~$C$?%F%s%W%l!<%H$r;n$=$&!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
161
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
162 \interaction{template.simple.simplesub}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
163
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
164 %As you can see, the string ``\Verb+{desc}+'' in the template has been
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
165 %replaced in the output with the description of each changeset. Every
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
166 %time Mercurial finds text enclosed in curly braces (``\texttt{\{}''
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
167 %and ``\texttt{\}}''), it will try to replace the braces and text with
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
168 %the expansion of whatever is inside. To print a literal curly brace,
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
169 %you must escape it, as described in section~\ref{sec:template:escape}.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
170
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
171 $B%F%s%W%l!<%HFb$N(B``\Verb+{desc}+''$B$H$$$&J8;zNs$O=PNO$G$O!$3F!9$N%A%'%s%8%;%C(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
172 $B%H$N@bL@$KCV49$5$l$k!%(BMercurial$B$OCf3g8L(B(``\texttt{\{}''$B$H(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
173 ``\texttt{\}}'')$B$G0O$^$l$?%F%-%9%H$r8+$D$1$k$HCf3g8L$H%F%-%9%H$rFbIt$N%F(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
174 $B%-%9%H$rE83+$7$?$b$N$KCV49$7$h$&$H;n$_$k!%J8;z$H$7$FCf3g8L$r0u;z$7$?$$>l(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
175 $B9g$O(B~\ref{sec:template:escape}$B@a$G<($9$h$&$K%(%9%1!<%W$9$kI,MW$,$"$k!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
176
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
177 %\section{Common template keywords}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
178 \section{$B%F%s%W%l!<%H$N6&DL%-!<%o!<%I(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
179 \label{sec:template:keyword}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
180
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
181 %You can start writing simple templates immediately using the keywords
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
182 %below.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
183
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
184 $BC1=c$J%F%s%W%l!<%H$O0J2<$N$h$&$J%-!<%o!<%I$r;H$C$FD>$A$K=q$/$3$H$,$G$-$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
185
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
186 \begin{itemize}
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
187 %\item[\tplkword{author}] String. The unmodified author of the changeset.
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
188 \item[\tplkword{author}] $BJ8;zNs!%%A%'%s%8%;%C%H$NCx<T!%(B
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
189 %\item[\tplkword{branches}] String. The name of the branch on which
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
190 % the changeset was committed. Will be empty if the branch name was
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
191 % \texttt{default}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
192 \item[\tplkword{branches}] $BJ8;zNs!%%A%'%s%8%;%C%H$,%3%_%C%H$5$l$?%V%i%s(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
193 $B%A$NL>A0!%%V%i%s%AL>$,(B\texttt{default}$B$N>l9g$O(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
194 $B6uMs$H$J$k!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
195 %\item[\tplkword{date}] Date information. The date when the changeset
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
196 % was committed. This is \emph{not} human-readable; you must pass it
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
197 % through a filter that will render it appropriately. See
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
198 % section~\ref{sec:template:filter} for more information on filters.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
199 % The date is expressed as a pair of numbers. The first number is a
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
200 % Unix UTC timestamp (seconds since January 1, 1970); the second is
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
201 % the offset of the committer's timezone from UTC, in seconds.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
202 \item[\tplkword{date}] $BF|;~>pJs!%%A%'%s%8%;%C%H$,%3%_%C%H$5$l$?F|;~!%$3$l(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
203 $B$O?M4V$N2DFI$J7A<0$G$O(B\emph{$B$J$$(B}$B!%I,$:E,@Z$J%U%#(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
204 $B%k%?$r8F$S=P$7$FJQ49$9$kI,MW$,$"$k!%%U%#%k%?$K4X(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
205 $B$9$k$h$j>\:Y$J@bL@$O(B~\ref{sec:template:filter}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
206 $B@a$r;2>H$N$3$H!%F|;~$O(B2$B$D$N?t;z$NAH$_9g$o$;$GI=(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
207 $B$5$l$k!%:G=i$N?t;z$O(BUTC$B$G$N(BUnix$B%?%$%`%9%?%s%W(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
208 (1970$BG/(B1$B7n(B1$BF|$+$i$NIC?t(B)$B$G!$(B2$BHVL\$N?t;z$O%3%_%C(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
209 $B%?$N%?%$%`%>!<%s$N(BUTC$B$+$i$N;~:9$rIC?t$GI=$7$?$b(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
210 $B$N$G$"$k!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
211 %\item[\tplkword{desc}] String. The text of the changeset description.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
212 \item[\tplkword{desc}] $BJ8;zNs!%%A%'%s%8%;%C%H$N@bL@J8!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
213
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
214 %\item[\tplkword{files}] List of strings. All files modified, added, or
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
215 % removed by this changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
216 \item[\tplkword{files}] $BJ8;zNs$N%j%9%H!%$3$N%A%'%s%8%;%C%H$GJQ99!$DI2C!$(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
217 $B:o=|$5$l$?A4$F$N%U%!%$%k$NL>A0!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
218
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
219 %\item[\tplkword{file\_adds}] List of strings. Files added by this
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
220 % changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
221 \item[\tplkword{file\_adds}] $BJ8;zNs$N%j%9%H!%$3$N%A%'%s%8%;%C%H$GDI2C$5(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
222 $B$l$?%U%!%$%k$NL>A0!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
223
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
224 %\item[\tplkword{file\_dels}] List of strings. Files removed by this
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
225 % changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
226 \item[\tplkword{file\_dels}] $BJ8;zNs$N%j%9%H!%$3$N%A%'%s%8%;%C%H$G:o=|$5(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
227 $B$l$?%U%!%$%k$NL>A0!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
228
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
229 %\item[\tplkword{node}] String. The changeset identification hash, as a
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
230 % 40-character hexadecimal string.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
231 \item[\tplkword{node}] $BJ8;zNs!%%A%'%s%8%;%C%H$N<1JL%O%C%7%e$r(B40$BJ8;z$N(B16
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
232 $B?J?t$G<($7$?$b$N!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
233
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
234 %\item[\tplkword{parents}] List of strings. The parents of the
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
235 % changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
236 \item[\tplkword{parents}] $BJ8;zNs$N%j%9%H!%%A%'%s%8%;%C%H$N?F!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
237
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
238 %\item[\tplkword{rev}] Integer. The repository-local changeset revision
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
239 % number.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
240 \item[\tplkword{rev}] $B@0?t!%%j%]%8%H%j%m!<%+%k$N%A%'%s%8%;%C%H%j%S%8%g%s(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
241 $BHV9f!%(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
242
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
243 %\item[\tplkword{tags}] List of strings. Any tags associated with the
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
244 % changeset.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
245 \item[\tplkword{tags}] $BJ8;zNs$N%j%9%H!%%A%'%s%8%;%C%H$K4XO"$E$1$i$l$?G$(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
246 $B0U$N%?%0!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
247 \end{itemize}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
248
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
249 %A few simple experiments will show us what to expect when we use these
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
250 %keywords; you can see the results in
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
251 %figure~\ref{fig:template:keywords}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
252
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
253 $B$$$/$D$+;n$7$F$_$l$P$3$l$i$N%-!<%o!<%I$K$I$N$h$&$J8z2L$,$"$k$N$+$rCN$k$3(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
254 $B$H$,$G$-$k!%7k2L$r?^(B~\ref{fig:template:keywords}$B$K<($9!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
255
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
256 \begin{figure}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
257 \interaction{template.simple.keywords}
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
258 % \caption{Template keywords in use}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
259 \caption{$B%F%s%W%l!<%H%-!<%o!<%I$N;HMQ(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
260 \label{fig:template:keywords}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
261 \end{figure}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
262
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
263 %As we noted above, the date keyword does not produce human-readable
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
264 %output, so we must treat it specially. This involves using a
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
265 %\emph{filter}, about which more in section~\ref{sec:template:filter}.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
266
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
267 $B4{$K=R$Y$?$h$&$K!$(Bdate$B%-!<%o!<%I$O2DFI$J=PNO$r9T$o$J$$$?$a!$FCJL$J<h$j07(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
268 $B$$$,I,MW$G$"$k!%$=$NL\E*$G(B\emph{filter}$B$r;HMQ$9$k$,!$$h$j>\:Y$K(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
269 $B$O(B~\ref{sec:template:filter}$B@a$G<h$j07$&!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
270
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
271 \interaction{template.simple.datekeyword}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
272
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
273 %\section{Escape sequences}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
274 \section{$B%(%9%1!<%W%7!<%1%s%9(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
275 \label{sec:template:escape}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
276
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
277 %Mercurial's templating engine recognises the most commonly used escape
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
278 %sequences in strings. When it sees a backslash (``\Verb+\+'')
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
279 %character, it looks at the following character and substitutes the two
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
280 %characters with a single replacement, as described below.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
281
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
282 Mercurial$B$N%F%s%W%l!<%H%(%s%8%s$OJ8;zNs$G:G$b$h$/;HMQ$5$l$k%(%9%1!<%W%7!<(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
283 $B%1%s%9$rG'<1$9$k!%%(%s%8%s$O%P%C%/%9%i%C%7%e(B(``\Verb+\+'')$B$r8+$D$1$k$H8e(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
284 $BB3$NJ8;z$r4^$`(B2$BJ8;z$r0J2<$N$h$&$J(B1$BJ8;z$GCV49$9$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
285
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
286 \begin{itemize}
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
287 %\item[\Verb+\textbackslash\textbackslash+] Backslash, ``\Verb+\+'',
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
288 % ASCII~134.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
289 %\item[\Verb+\textbackslash n+] Newline, ASCII~12.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
290 %\item[\Verb+\textbackslash r+] Carriage return, ASCII~15.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
291 %\item[\Verb+\textbackslash t+] Tab, ASCII~11.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
292 %\item[\Verb+\textbackslash v+] Vertical tab, ASCII~13.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
293 %\item[\Verb+\textbackslash \{+] Open curly brace, ``\Verb+{+'', ASCII~173.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
294 %\item[\Verb+\textbackslash \}+] Close curly brace, ``\Verb+}+'', ASCII~175.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
295 \item[\Verb+\textbackslash\textbackslash+] $B%P%C%/%9%i%C%7%e(B, ``\Verb+\+'',
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
296 ASCII~134.
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
297 \item[\Verb+\textbackslash n+] $B2~9T(B, ASCII~12.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
298 \item[\Verb+\textbackslash r+] $BI|5"(B, ASCII~15.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
299 \item[\Verb+\textbackslash t+] $B%?%V(B, ASCII~11.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
300 \item[\Verb+\textbackslash v+] $B?bD>%?%V(B, ASCII~13.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
301 \item[\Verb+\textbackslash \{+] $B3+$-Cf3g8L(B, ``\Verb+{+'', ASCII~173.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
302 \item[\Verb+\textbackslash \}+] $BJD$8Cf3g8L(B, ``\Verb+}+'', ASCII~175.
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
303 \end{itemize}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
304
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
305 %As indicated above, if you want the expansion of a template to contain
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
306 %a literal ``\Verb+\+'', ``\Verb+{+'', or ``\Verb+{+'' character, you
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
307 %must escape it.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
308
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
309 $B>e$K<($7$?$h$&$K!$%F%s%W%l!<%H$NE83+$N:]$KJ8;z(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
310 ``\Verb+\+'', ``\Verb+{+'', $B$^$?$O(B``\Verb+{+''$B$rF~$l$?$$>l9g$O%(%9%1!<%W(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
311 $B$9$k$3$H$,I,MW$G$"$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
312
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
313 %\section{Filtering keywords to change their results}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
314 \section{$B7k2L$r2~JQ$9$k%U%#%k%?%-!<%o!<%I(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
315 \label{sec:template:filter}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
316
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
317 %Some of the results of template expansion are not immediately easy to
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
318 %use. Mercurial lets you specify an optional chain of \emph{filters}
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
319 %to modify the result of expanding a keyword. You have already seen a
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
320 %common filter, \tplkwfilt{date}{isodate}, in action above, to make a
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
321 %date readable.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
322
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
323 $B%F%s%W%l!<%HE83+$N7k2L$N$&$A!$$$$/$D$+$O$?$d$9$/MxMQ$G$-$k$b$N$G$O$J$$!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
324 Mercurial$B$OE83+$5$l$k%-!<%o!<%I$rJQ99$9$k$?$a$N0lO"$N(B\emph{filters}$B%*%W%7%g(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
325 $B%s$rDs6!$7$F$$$k!%F|;~$r2DFI$K$9$k$?$a$K$h$/MQ$$$i$l$k(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
326 \tplkwfilt{date}{isodate}$B%U%#%k%?$NF0:nNc$K$D$$$F$O4{$K8+$F$-$?!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
327
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
328 %Below is a list of the most commonly used filters that Mercurial
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
329 %supports. While some filters can be applied to any text, others can
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
330 %only be used in specific circumstances. The name of each filter is
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
331 %followed first by an indication of where it can be used, then a
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
332 %description of its effect.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
333
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
334 $B0J2<$K<($9$N$O(BMercurial$B$,%5%]!<%H$9$k%U%#%k%?$NCf$G:G$b$h$/;H$o$l$k$b$N$G(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
335 $B$"$k!%$$$/$D$+$N%U%#%k%?$OG$0U$NJ8;zNs$KBP$7$FE,MQ2DG=$J0lJ}!$B>$N$b$N$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
336 $BFCDj$N>u67$K$*$$$F$N$_MxMQ2DG=$G$"$k!%3F!9$N%U%#%k%?$NL>A0$O!$MxMQ2DG=$J(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
337 $B>u67$r<($9I=<($G;O$^$j!$F@$i$l$k8z2L$N@bL@$,B3$/!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
338
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
339 \begin{itemize}
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
340 %\item[\tplfilter{addbreaks}] Any text. Add an XHTML ``\Verb+<br/>+''
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
341 % tag before the end of every line except the last. For example,
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
342 % ``\Verb+foo\nbar+'' becomes ``\Verb+foo<br/>\nbar+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
343
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
344 \item[\tplfilter{addbreaks}] $BG$0U$N%F%-%9%H!%(BXHTML$B%?%0(B``\Verb+<br/>+''
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
345 $B$r:G=*9T0J30$N3F9T$NKvHx$KDI2C$9$k!%Nc$($P(B``\Verb+foo\nbar+''$B$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
346 ``\Verb+foo<br/>\nbar+''$B$H$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
347
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
348 %\item[\tplkwfilt{date}{age}] \tplkword{date} keyword. Render the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
349 % age of the date, relative to the current time. Yields a string like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
350 % ``\Verb+10 minutes+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
351
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
352 \item[\tplkwfilt{date}{age}] \tplkword{date}$B%-!<%o!<%I!%F|;~$N7P2a;~4V$r(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
353 $B8=:_$r5/E@$K@07A$9$k!%7k2L$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
354 ``\Verb+10 minutes+''$B$N$h$&$K$J$k(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
355
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
356 %\item[\tplfilter{basename}] Any text, but most useful for the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
357 % \tplkword{files} keyword and its relatives. Treat the text as a
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
358 % path, and return the basename. For example, ``\Verb+foo/bar/baz+''
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
359 % becomes ``\Verb+baz+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
360
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
361 \item[\tplfilter{basename}] $BG$0U$N%F%-%9%H$@$,!$(B\tplkword{files}$B%-!<%o!<(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
362 $B%I$d$=$N4XO"%-!<%o!<%I$KBP$7$F:G$bM-MQ$G$"(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
363 $B$k!%%F%-%9%H$r%Q%9$H$7$F07$$!$%Y!<%9%M!<%`$r(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
364 $BJV$9!%Nc$($P(B``\Verb+foo/bar/baz+''$B$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
365 ``\Verb+baz+''$B$H$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
366
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
367 %\item[\tplkwfilt{date}{date}] \tplkword{date} keyword. Render a date
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
368 % in a similar format to the Unix \tplkword{date} command, but with
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
369 % timezone included. Yields a string like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
370 % ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
371
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
372 \item[\tplkwfilt{date}{date}] \tplkword{date}$B%-!<%o!<%I!%F|;~$r(BUnix$B$N(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
373 \tplkword{date}$B%3%^%s%I$N=PNO$K%?%$%`%>!<%s(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
374 $B>pJs$rDI2C$7$?7A<0$K@07A$9$k!%7k2L$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
375 ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''$B$N(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
376 $B$h$&$K$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
377
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
378 %\item[\tplkwfilt{author}{domain}] Any text, but most useful for the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
379 % \tplkword{author} keyword. Finds the first string that looks like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
380 % an email address, and extract just the domain component. For
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
381 % example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
382 % ``\Verb+serpentine.com+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
383
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
384 \item[\tplkwfilt{author}{domain}] $BG$0U$N%F%-%9%H!%(B\tplkword{author}$B%-!<%o!<(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
385 $B%I$G$N;HMQ$K:G$bM-MQ!%:G=i$K8=$l$k(Bemail$B%"%I(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
386 $B%l%97A<0$NJ8;zNs$r8+$D$1!$%I%a%$%sItJ,$@$1$r(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
387 $BH4$-=P$9!%Nc$($P(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
388 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
389 $B$O(B``\Verb+serpentine.com+''$B$H$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
390
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
391 %\item[\tplkwfilt{author}{email}] Any text, but most useful for the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
392 % \tplkword{author} keyword. Extract the first string that looks like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
393 % an email address. For example,
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
394 % ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
395 % ``\Verb+bos@serpentine.com+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
396
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
397 \item[\tplkwfilt{author}{email}] $BG$0U$N%F%-%9%H!%(B\tplkword{author}$B%-!<%o!<(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
398 $B%I$G:G$bM-MQ!%:G=i$K8=$l$k(Bemail$B%"%I%l%97A<0(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
399 $B$NJ8;zNs$rH4$-=P$9!%Nc$($P(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
400 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
401 $B$O(B``\Verb+bos@serpentine.com+''$B$H$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
402
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
403 %\item[\tplfilter{escape}] Any text. Replace the special XML/XHTML
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
404 % characters ``\Verb+&+'', ``\Verb+<+'' and ``\Verb+>+'' with
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
405 % XML entities.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
406
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
407 \item[\tplfilter{escape}] $BG$0U$N%F%-%9%H!%(BXML/XHTML$BJ8;z(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
408 ``\Verb+&+'', ``\Verb+<+''$B$*$h$S(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
409 ``\Verb+>+''$B$r(BXML$B%(%s%F%#%F%#$GCV49$9$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
410
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
411 %\item[\tplfilter{fill68}] Any text. Wrap the text to fit in 68
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
412 % columns. This is useful before you pass text through the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
413 % \tplfilter{tabindent} filter, and still want it to fit in an
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
414 % 80-column fixed-font window.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
415
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
416 \item[\tplfilter{fill68}] $BG$0U$N%F%-%9%H!%%F%-%9%H$r(B68$B7e$K<}$^$k$h$&$K@0(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
417 $B7A$9$k!%$3$l$O(B80$B7e$K8GDj$5$l$?C<Kv$G$NI=<(MQ(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
418 $B$K(B\tplfilter{tabindent}$B%U%#%k%?$r;H$&:]$KJX(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
419 $BMx$G$"$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
420
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
421 %\item[\tplfilter{fill76}] Any text. Wrap the text to fit in 76
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
422 % columns.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
423
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
424 \item[\tplfilter{fill76}] $BG$0U$N%F%-%9%H!%(B76$B7e$K<}$^$k$h$&$K@07A$9$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
425
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
426 %\item[\tplfilter{firstline}] Any text. Yield the first line of text,
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
427 % without any trailing newlines.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
428
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
429 \item[\tplfilter{firstline}] $BG$0U$N%F%-%9%H:G=i$N9T$@$1$r=PNO$7!$8eB3$N(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
430 $B9T$O0l@Z=PNO$7$J$$!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
431
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
432 %\item[\tplkwfilt{date}{hgdate}] \tplkword{date} keyword. Render the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
433 % date as a pair of readable numbers. Yields a string like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
434 % ``\Verb+1157407993 25200+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
435
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
436 \item[\tplkwfilt{date}{hgdate}] \tplkword{date}$B%-!<%o!<%I!%F|;~$r2DFI$J(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
437 $B?t;z$N%Z%"$K@07A$9$k!%(B``\Verb+115740799325200+''$B$N$h$&$JJ8;zNs$r=PNO$9$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
438
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
439 %\item[\tplkwfilt{date}{isodate}] \tplkword{date} keyword. Render the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
440 % date as a text string in ISO~8601 format. Yields a string like
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
441 % ``\Verb+2006-09-04 15:13:13 -0700+''.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
442
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
443 \item[\tplkwfilt{date}{isodate}] \tplkword{date}$B%-!<%o!<%I!%F|;~$r(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
444 ISO~8601$B%U%)!<%^%C%H$K@07A$9$k!%=PNO$O(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
445 ``\Verb+2006-09-04 15:13:13 -0700+''$B$N$h$&$K(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
446 $B$J$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
447
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
448 %\item[\tplfilter{obfuscate}] Any text, but most useful for the
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
449 % \tplkword{author} keyword. Yield the input text rendered as a
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
450 % sequence of XML entities. This helps to defeat some particularly
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
451 % stupid screen-scraping email harvesting spambots.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
452
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
453 \item[\tplfilter{obfuscate}]$BG$0U$N%F%-%9%H!%(B\tplkword{author}$B%-!<%o!<%I$H(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
454 $BJ;$;$FMxMQ$9$k>l9g:G$bM-MQ!%F~NO$5$l$?%F%-%9(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
455 $B%H$r(BXML$B%(%s%F%#%F%#$N%7!<%1%s%9$H$7$F=PNO$9(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
456 $B$k!%$3$l$O2hLL$r%9%/%l%$%T%s%0$9$k4VH4$1$J%9(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
457 $B%Q%`%\%C%H$rHr$1$kF/$-$,$"$k!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
458
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
459 %\item[\tplkwfilt{author}{person}] Any text, but most useful for the
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
460 % \tplkword{author} keyword. Yield the text before an email address.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
461 % For example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
462 % becomes ``\Verb+Bryan O'Sullivan+''.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
463
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
464 \item[\tplkwfilt{author}{person}] $BG$0U$N%F%-%9%H!%(B\tplkword{author}$B%-!<(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
465 $B%o!<%I$H9g$o$;$F;H$&>l9g$b$C$H$bM-MQ!%(Bemail$B%"%I%l%9$NA0$N%F(B
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
466 $B%-%9%H$rCj=P$9$k!%Nc$($P(B``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''$B$O(B``\Verb+Bryan O'Sullivan+''$B$H$J$k!%(B
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
467
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
468 %\item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword. Render a
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
469 % date using the same format used in email headers. Yields a string
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
470 % like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
471
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
472 \item[\tplkwfilt{date}{rfc822date}] \tplkword{date}$B%-!<%o!<%I!%F|;~$r(B
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
473 email$B%X%C%@$HF1$87A<0$G@07A$9$k!%(B``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''$B$N$h$&$JJ8;zNs$r@8@.$9$k!%(B
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
474
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
475 %\item[\tplkwfilt{node}{short}] Changeset hash. Yield the short form
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
476 % of a changeset hash, i.e.~a 12-byte hexadecimal string.
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
477
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
478 \item[\tplkwfilt{node}{short}] $B%A%'%s%8%;%C%H%O%C%7%e!%C;7A<0$N%A%'%s%8(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
479 $B%;%C%H%O%C%7%e!$$9$J$o$A(B12$B%P%$%H$N(B16$B?J?tJ8;zNs$r@8@.$9$k!%(B
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
480
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
481 %\item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword. Render
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
482 % the year, month, and day of the date. Yields a string like
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
483 % ``\Verb+2006-09-04+''.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
484
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
485 \item[\tplkwfilt{date}{shortdate}] \tplkword{date}$B%-!<%o!<%I!%G/7nF|$r@0(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
486 $B7A$9$k!%(B``\Verb+2006-09-04+''$B$N$h$&$JJ8;zNs$r@8@.$9$k!%(B
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
487
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
488 %\item[\tplfilter{strip}] Any text. Strip all leading and trailing
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
489 % whitespace from the string.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
490
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
491 \item[\tplfilter{strip}] $BG$0U$N%F%-%9%H!%J8;zNs$NA08e$N6uGrItJ,$r=|5n$9(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
492 $B$k!%(B
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
493
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
494 %\item[\tplfilter{tabindent}] Any text. Yield the text, with every line
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
495 % except the first starting with a tab character.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
496
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
497 \item[\tplfilter{tabindent}] $BG$0U$N%F%-%9%H!%%?%VJ8;z$G;O$^$i$J$$9T$9$Y(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
498 $B$F$r=PNO$9$k!%(B
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
499
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
500 %\item[\tplfilter{urlescape}] Any text. Escape all characters that are
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
501 % considered ``special'' by URL parsers. For example, \Verb+foo bar+
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
502 % becomes \Verb+foo%20bar+.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
503
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
504 \item[\tplfilter{urlescape}] $BG$0U$N%F%-%9%H!%(BURL$B%Q!<%5$+$i8+$F(B``$BFCJL(B''$B$J(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
505 $BJ8;z$N%(%9%1!<%W$r9T$&!%Nc$($P(B \Verb+foo bar+ $B$O(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
506 \Verb+foo\%20bar+ $B$H$J$k!%(B
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
507
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
508 %\item[\tplkwfilt{author}{user}] Any text, but most useful for the
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
509 % \tplkword{author} keyword. Return the ``user'' portion of an email
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
510 % address. For example,
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
511 % ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
512 % ``\Verb+bos+''.
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
513
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
514 \item[\tplkwfilt{author}{user}] $BG$0U$N%F%-%9%H!%(B\tplkword{author}$B%-!<%o!<(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
515 $B%I$H6&$K;H$C$?>l9g$K:G$bM-MQ!%(Bemail$B%"%I%l%9$+$i%f!<%6L>$NIt(B
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
516 $BJ,$rH4$-=P$9!%Nc$($P(B``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''$B$O(B``\Verb+bos+''$B$H$J$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
517 \end{itemize}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
518
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
519 \begin{figure}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
520 \interaction{template.simple.manyfilters}
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
521 % \caption{Template filters in action}
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
522 \caption{$B%F%s%W%l!<%H%U%#%k%?$NF0:n(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
523 \label{fig:template:filters}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
524 \end{figure}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
525
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
526 \begin{note}
361
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
527 % If you try to apply a filter to a piece of data that it cannot
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
528 % process, Mercurial will fail and print a Python exception. For
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
529 % example, trying to run the output of the \tplkword{desc} keyword
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
530 % into the \tplkwfilt{date}{isodate} filter is not a good idea.
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
531 $B%U%#%k%?$rE,MQITG=$J%G!<%?$KBP$7$F;H$*$&$H$9$k$H(BMercurial$B$O%(%i!<$r5/$3(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
532 $B$7!$(BPython$B$+$i$NNc30$r=PNO$9$k!%Nc$($P(B\tplkword{desc}$B%-!<%o!<%I$N=PNO$K(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
533 \tplkwfilt{date}{isodate}$B%U%#%k%?$rE,MQ$9$k$N$O$$$$9M$($H$O8@$($J$$!%(B
96437101a088 more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 360
diff changeset
534
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
535 \end{note}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
536
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
537 %\subsection{Combining filters}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
538 \subsection{$BAH$_9g$o$;%U%#%k%?(B}
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
539
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
540 %It is easy to combine filters to yield output in the form you would
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
541 %like. The following chain of filters tidies up a description, then
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
542 %makes sure that it fits cleanly into 68 columns, then indents it by a
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
543 %further 8~characters (at least on Unix-like systems, where a tab is
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
544 %conventionally 8~characters wide).
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
545
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
546 $BK>$_$N=PNO$r$($k$?$a$KJ#?t$N%U%#%k%?$rAH$_9g$o$;$k$N$O$?$d$9$$!%0J2<$N0l(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
547 $BO"$N%U%#%k%?$O@bL@J8$r@0M}$7!$$-$l$$$K(B68$B7e$K<}$^$k$h$&$K@07A$7!$(B8$BJ8;z$N(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
548 $B%$%s%G%s%H$r9T$&!%!J(BUNIX$B%7%9%F%`$G$O%?%V$O=,47E*$K(B8$B7eJ,$NI}$r;}$D!%!K(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
549
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
550 \interaction{template.simple.combine}
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
551
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
552 %Note the use of ``\Verb+\t+'' (a tab character) in the template to
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
553 %force the first line to be indented; this is necessary since
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
554 %\tplkword{tabindent} indents all lines \emph{except} the first.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
555
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
556 $B%F%s%W%l!<%H$G:G=i$N9T$r%$%s%G%s%H$9$k$?$a$K$O(B``\Verb+\t+''$B!J%?%VJ8;z!K$r(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
557 $B;H$&I,MW$,$"$k!%$J$<$J$i(B\tplkword{tabindent}$B$O:G=i$N9T(B\emph{$B0J30(B}$B$N%$%s(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
558 $B%G%s%H$r9T$&$+$i$G$"$k!%(B
80
ea951cfb5cd9 Much template-related content.
Bryan O'Sullivan <bos@serpentine.com>
parents: 76
diff changeset
559
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
560 %Keep in mind that the order of filters in a chain is significant. The
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
561 %first filter is applied to the result of the keyword; the second to
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
562 %the result of the first filter; and so on. For example, using
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
563 %\Verb+fill68|tabindent+ gives very different results from
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
564 %\Verb+tabindent|fill68+.
76
df88df78288d Add template chapter to build.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
565
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
566 $B%U%#%k%?$rAH$_9g$o$;$k;~%U%#%k%?$N=g=x$,=EMW$G$"$k$3$H$rF,$KCV$$$F$*$/I,(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
567 $BMW$,$"$k!%:G=i$N%U%#%k%?$O%-!<%o!<%I$N7k2L$KBP$7$FE,MQ$5$l!$(B2$BHVL\$N%U%#%k(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
568 $B%?$O:G=i$N%U%#%k%?$N7k2L$KBP$7$FE,MQ$5$l$k!%Nc$r5s$2$k(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
569 $B$H!$(B\Verb+fill68|tabindent+ $B$H(B \Verb+tabindent|fill68+ $B$N7k2L$OA4$/0c$&(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
570 $B$b$N$G$"$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
571
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
572 %\section{From templates to styles}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
573 \section{$B%F%s%W%l!<%H$+$i%9%?%$%k$X(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
574
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
575 %A command line template provides a quick and simple way to format some
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
576 %output. Templates can become verbose, though, and it's useful to be
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
577 %able to give a template a name. A style file is a template with a
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
578 %name, stored in a file.
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
579
362
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
580 $B%3%^%s%I%i%$%s%F%s%W%l!<%H$O=PNO$r%U%)!<%^%C%H$9$k$?$a$NAGAa$/C1=c$JJ}K!(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
581 $B$rDs6!$9$k!%%F%s%W%l!<%H$O%a%C%;!<%8$rB?$/=PNO$9$k$h$&$K$b$G$-$k$,!$%F%s(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
582 $B%W%l!<%H$KL>A0$rIU$1$k$N$OM-1W$G$"$k!%%9%?%$%k%U%!%$%k$O!$%U%!%$%k$KJ]B8(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
583 $B$5$l$?L>A0$rIU$1$i$l$?%F%s%W%l!<%H$G$"$k!%(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
584
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
585 %More than that, using a style file unlocks the power of Mercurial's
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
586 %templating engine in ways that are not possible using the command line
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
587 %\hgopt{log}{--template} option.
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
588
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
589 $B$5$i$K!$%9%?%$%k%U%!%$%k$r;H$&$3$H$G!$(BMercurial$B$N%F%s%W%l!<%H%(%s%8%s$N%3(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
590 $B%^%s%I%i%$%s(B\hgopt{log}{--template}$B%*%W%7%g%s$+$i$G$OMxMQ$G$-$J$$NO$r:GBg(B
df4ac9043db0 a bit more template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 361
diff changeset
591 $B8B$K0z$-=P$9$3$H$,$G$-$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
592
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
593 %\subsection{The simplest of style files}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
594 \subsection{$B:G$bC1=c$J%9%?%$%k%U%!%$%k(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
595
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
596 %Our simple style file contains just one line:
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
597
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
598 $B%5%s%W%k%9%?%$%k%U%!%$%k$O$?$@$N(B1$B9T$+$i$J$k(B:
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
599
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
600 \interaction{template.simple.rev}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
601
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
602 %This tells Mercurial, ``if you're printing a changeset, use the text
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
603 %on the right as the template''.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
604
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
605 $B$3$l$O(BMercurial$B$K(B``$B%A%'%s%8%;%C%H$r=PNO$9$k;~$O1&$N%F%-%9%H$r%F%s%W%l!<%H(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
606 $B$H$7$F;H$((B''$B$H$$$&;X<($rM?$($k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
607
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
608 %\subsection{Style file syntax}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
609 \subsection{$B%9%?%$%k%U%!%$%k$NJ8K!(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
610
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
611 %The syntax rules for a style file are simple.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
612
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
613 $B%9%?%$%k%U%!%$%k$NJ8K!5,B'$OC1=c$G$"$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
614
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
615 \begin{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
616 %\item The file is processed one line at a time.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
617 \item $B%U%!%$%k$O0lEY$K(B1$B9T$:$D=hM}$5$l$k(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
618
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
619 %\item Leading and trailing white space are ignored.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
620 \item $BA08e$N6uGr$OL5;k$5$l$k(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
621
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
622 %\item Empty lines are skipped.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
623 \item $B6u9T$O%9%-%C%W$5$l$k(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
624
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
625 %\item If a line starts with either of the characters ``\texttt{\#}'' or
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
626 % ``\texttt{;}'', the entire line is treated as a comment, and skipped
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
627 % as if empty.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
628 \item $B9T$,(B``\texttt{\#}''$B$^$?$O(B``\texttt{;}''$B$G;O$^$k>l9g$O!$9TA4BN$,%3(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
629 $B%a%s%H$H$7$F07$o$l!$6uGr$HF1MM$K%9%-%C%W$5$l$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
630
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
631 %\item A line starts with a keyword. This must start with an
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
632 % alphabetic character or underscore, and can subsequently contain any
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
633 % alphanumeric character or underscore. (In regexp notation, a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
634 % keyword must match \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
635 \item $B9T$O%-!<%o!<%I$G;O$^$k!%I,$:%"%k%U%!%Y%C%H$+%"%s%@!<%9%3%"$G;O$^$k(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
636 $BI,MW$,$"$j!$8eB3$NJ8;z$O%"%k%U%!%Y%C%H!$?t;z!$%"%s%@!<%9%3%"$N$$$:(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
637 $B$l$+$G$"$C$F$h$$!%!J@55,I=8=$G$O(B\Verb+[A-Za-z_][A-Za-z0-9_]*+$B$H%^%C(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
638 $B%A$9$k!K(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
639
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
640 %\item The next element must be an ``\texttt{=}'' character, which can
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
641 % be preceded or followed by an arbitrary amount of white space.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
642 \item $B<!$NMWAG$OJ8;z(B``\texttt{=}''$B$G!$A08e$K6uGr$,F~$C$F$bNI$$!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
643
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
644 %\item If the rest of the line starts and ends with matching quote
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
645 % characters (either single or double quote), it is treated as a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
646 % template body.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
647 \item $B?t$ND`$j9g$C$?%7%s%0%k%/%)!<%H$^$?$O%@%V%k%/%)!<%H$G3g$i$l$kItJ,$,(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
648 $BB3$/>l9g$O$3$l$,%F%s%W%l!<%H%\%G%#$H$7$F07$o$l$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
649
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
650 %\item If the rest of the line \emph{does not} start with a quote
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
651 % character, it is treated as the name of a file; the contents of this
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
652 % file will be read and used as a template body.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
653 \item $BB3$/ItJ,$,%/%)!<%HJ8;z$G;O$^$i$J$$>l9g$O%U%!%$%kL>$H$7$F07$o$l!$%U%!(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
654 $B%$%k$NFbMF$,%F%s%W%l!<%H%\%G%#$H$7$F;H$o$l$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
655
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
656 \end{itemize}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
657
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
658 %\section{Style files by example}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
659 \section{$B%9%?%$%k%U%!%$%k$NNc(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
660
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
661 %To illustrate how to write a style file, we will construct a few by
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
662 %example. Rather than provide a complete style file and walk through
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
663 %it, we'll mirror the usual process of developing a style file by
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
664 %starting with something very simple, and walking through a series of
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
665 %successively more complete examples.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
666
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
667 $B%9%?%$%k%U%!%$%k$N=q$-J}$r@bL@$9$k$?$a$K$$$/$D$+$NNcBj$r5s$2$F$_$k!%40A4(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
668 $B$J%9%?%$%k%U%!%$%k$rMQ0U$7$F$3$l$r@bL@$9$k$N$G$O$J$/!$$H$F$bC1=c$JNc$+$i(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
669 $B;O$a$F!$$@$s$@$s$HJ#;($JNc$K?J$`$3$H$G%9%?%$%k%U%!%$%k$NDL>o$N3+H/%W%m%;(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
670 $B%9$rLOJo$7$F$_$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
671
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
672 %\subsection{Identifying mistakes in style files}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
673 \subsection{$B%9%?%$%k%U%!%$%k$G$N8m$j$rFCDj$9$k(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
674
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
675 %If Mercurial encounters a problem in a style file you are working on,
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
676 %it prints a terse error message that, once you figure out what it
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
677 %means, is actually quite useful.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
678
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
679 Mercurial$B$,%9%?%$%k%U%!%$%k$GLdBj$KD>LL$9$k$H!$4J7i$J%(%i!<%a%C%;!<%8$rI=(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
680 $B<($9$k!%$3$N%a%C%;!<%8$O$=$N0UL#$9$k$H$3$m$,J,$+$C$F$$$l$P$H$F$bM-1W$G$"(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
681 $B$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
682
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
683 \interaction{template.svnstyle.syntax.input}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
684
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
685 %Notice that \filename{broken.style} attempts to define a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
686 %\texttt{changeset} keyword, but forgets to give any content for it.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
687 %When instructed to use this style file, Mercurial promptly complains.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
688
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
689 \filename{broken.style}$B$G(B\texttt{changeset}$B%-!<%o!<%I$rDj5A$7$h$&$H$7$F$$(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
690 $B$k$,!$Dj5A$NFbMF$,A4$/M?$($i$l$F$$$J$$!%$3$N%9%?%$%k%U%!%$%k$r;H$*$&$H$9(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
691 $B$k$H!$(BMercurial$B$O$9$0$5$^%(%i!<$rI=<($9$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
692
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
693 \interaction{template.svnstyle.syntax.error}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
694
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
695 %This error message looks intimidating, but it is not too hard to
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
696 %follow.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
697
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
698 $B$3$N%(%i!<%a%C%;!<%8$O62$m$7$2$@$,!$BP1~$9$k$N$O$5$[$IFq$7$/$J$$!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
699
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
700 \begin{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
701 %\item The first component is simply Mercurial's way of saying ``I am
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
702 % giving up''.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
703 \item $B:G=i$NItJ,$O(B``$B%.%V%"%C%W(B''$B$N(BMercurial$BE*$JI=8=$G$"$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
704 \begin{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
705 \textbf{abort:} broken.style:1: parse error
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
706 \end{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
707
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
708 %\item Next comes the name of the style file that contains the error.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
709 \item $B<!$K%(%i!<$N$"$k%9%?%$%k%U%!%$%kL>$,I=<($5$l$k(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
710 \begin{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
711 abort: \textbf{broken.style}:1: parse error
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
712 \end{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
713
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
714 %\item Following the file name is the line number where the error was
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
715 % encountered.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
716 \item $B%U%!%$%kL>$N8e$K%(%i!<$N5/$-$?9THV9f$,B3$/!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
717 \begin{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
718 abort: broken.style:\textbf{1}: parse error
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
719 \end{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
720
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
721 %\item Finally, a description of what went wrong.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
722 \item $B:G8e$KLdBjE@$N@bL@$,I=<($5$l$k(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
723 \begin{codesample4}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
724 abort: broken.style:1: \textbf{parse error}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
725 \end{codesample4}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
726 % The description of the problem is not always clear (as in this
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
727 % case), but even when it is cryptic, it is almost always trivial to
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
728 % visually inspect the offending line in the style file and see what
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
729 % is wrong.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
730 $BLdBj$N@bL@$O>o$KL@2w$G$"$k$H$O8B$i$J$$!%!J$3$NNc$N$h$&$K!%!K$7$+$7Ff$a$$(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
731 $B$F$$$?$H$7$F$b!$KX$s$I$N>l9g!$%9%?%$%k%U%!%$%k$NLdBj$N$"$k9T$r8+(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
732 $B$k$H!$$4$/:3:Y$JLdBj$K$9$.$J$$$b$N$G$"$k!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
733 \end{itemize}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
734
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
735 %\subsection{Uniquely identifying a repository}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
736 \subsection{$B%j%]%8%H%j$NFCDj(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
737
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
738 %If you would like to be able to identify a Mercurial repository
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
739 %``fairly uniquely'' using a short string as an identifier, you can
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
740 %use the first revision in the repository.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
741 %\interaction{template.svnstyle.id}
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
742
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
743 %This is not guaranteed to be unique, but it is nevertheless useful in
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
744 %many cases.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
745
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
746 $BC;$$J8;zNs$r<1JL;R$K;H$C$F(BMercurial$B%j%]%8%H%j$rFCDj$7$?$$>l9g$O(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
747 $B%j%]%8%H%jFb$N:G=i$N%j%S%8%g%s$r;H$&$3$H$,$G$-$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
748 \interaction{template.svnstyle.id}
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
749 $B$3$l$O%f%K!<%/$G$"$k$3$H$,J]>Z$5$l$F$$$k$o$1$G$O$J$$$,!$B?$/$N>l9g$KM-MQ(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
750 $B$G$"$k$3$H$O$$$&$^$G$b$J$$!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
751
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
752 \begin{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
753 %\item It will not work in a completely empty repository, because such
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
754 % a repository does not have a revision~zero.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
755 \item $B40A4$K6u$N%j%]%8%H%j$G$O$3$NJ}K!$O;H$($J$$!%6u$N%j%]%8%H%j$K$O%j(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
756 $B%S%8%g%s(B~$B%<%m$9$iB8:_$7$J$$$?$a$G$"$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
757
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
758 %\item Neither will it work in the (extremely rare) case where a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
759 % repository is a merge of two or more formerly independent
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
760 % repositories, and you still have those repositories around.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
761 \item $BFHN)$7$?J#?t$N%j%]%8%H%j$r%^!<%8$7$F%j%]%8%H%j$r:n@.$7!$$3$l$i$N(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
762 $B%j%]%8%H%j$,0MA3$H$7$FB8:_$9$k$J$I$N!J$-$o$a$F5)$J!K>l9g$O$3$NJ}(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
763 $BK!$O;H$($J$$!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
764 \end{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
765 %Here are some uses to which you could put this identifier:
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
766 $B$3$N<1JL;R$N;HMQNc$r<($9(B:
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
767 \begin{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
768 %\item As a key into a table for a database that manages repositories
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
769 % on a server.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
770 \item $B%5!<%P>e$G%j%]%8%H%j$r4IM}$9$k%G!<%?%Y!<%9MQ$N%F!<%V%k$X$N%-!<$H$7$F!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
771
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
772 %\item As half of a \{\emph{repository~ID}, \emph{revision~ID}\} tuple.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
773 % Save this information away when you run an automated build or other
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
774 % activity, so that you can ``replay'' the build later if necessary.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
775 \item \{\emph{repository~ID}, \emph{revision~ID}\}$B%?%W%k$NH>J,$H$7$F!%<+(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
776 $BF0%S%k%I$d$=$NB>$NA`:n$r9T$&$H$-$K$3$N>pJs$r%;!<%V$7$F$*$-!$8e$G%S%k%I$r(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
777 $B:F8=$9$k$3$H$,I,MW$H$J$C$?$i(B``$B%j%W%l%$(B''$B$r9T$($k$h$&$K$9$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
778
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
779 \end{itemize}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
780
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
781 %\subsection{Mimicking Subversion's output}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
782 \subsection{Subversion$B=PNO$NLOJo(B}
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
783
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
784 %Let's try to emulate the default output format used by another
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
785 %revision control tool, Subversion.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
786 %\interaction{template.svnstyle.short}
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
787
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
788 $BJL$N%P!<%8%g%s4IM}%D!<%k$G$"$k(BSubversion$B$N=PNO$r%(%_%e%l!<%H$7$F$_$h$&!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
789 \interaction{template.svnstyle.short}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
790
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
791 %Since Subversion's output style is fairly simple, it is easy to
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
792 %copy-and-paste a hunk of its output into a file, and replace the text
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
793 %produced above by Subversion with the template values we'd like to see
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
794 %expanded.
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
795
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
796 Subversion$B$N=PNO%9%?%$%k$O$+$J$jC1=c$J$N$G!$=PNO$+$i%U%!%$%k$X(Bhunk$B$r%3%T!<(B
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
797 $B!u%Z!<%9%H$7!$(BSubversion$B$,@8@.$7$?%F%-%9%H$r%F%s%W%l!<%H$K$h$C$FCV49$9$k(B
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
798 $B$N$O4JC1$G$"$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
799 \interaction{template.svnstyle.template}
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
800
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
801 %There are a few small ways in which this template deviates from the
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
802 %output produced by Subversion.
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
803
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
804 $B%F%s%W%l!<%H$K$h$k=PNO$,(BSubversion$B$,@8@.$9$k=PNO$H0[$J$k(B2, 3$B$NNc$,$"$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
805
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
806 \begin{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
807 %\item Subversion prints a ``readable'' date (the ``\texttt{Wed, 27 Sep
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
808 % 2006}'' in the example output above) in parentheses. Mercurial's
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
809 % templating engine does not provide a way to display a date in this
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
810 % format without also printing the time and time zone.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
811 \item Subversion$B$OCf3g8L$G0O$^$l$?(B``$B2DFI$J(B''$BF|;~$r=PNO$9$k!%!J>e$NNc$G$O(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
812 ``\texttt{Wed, 27 Sep 2006}''$B!%!K(B Mercurial$B$N%F%s%W%l!<%H%(%s%8%s(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
813 $B$O$3$N%U%)!<%^%C%H$G;~9o$H%?%$%`%>!<%s$r4^$^$J$$7A$GF|;~$r=PNO$9$k(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
814 $B$3$H$,$G$-$J$$!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
815
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
816 %\item We emulate Subversion's printing of ``separator'' lines full of
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
817 % ``\texttt{-}'' characters by ending the template with such a line.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
818 % We use the templating engine's \tplkword{header} keyword to print a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
819 % separator line as the first line of output (see below), thus
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
820 % achieving similar output to Subversion.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
821 \item Subversion$B$N(B``$B%;%Q%l!<%?(B''$B9T$N=PNO$r%F%s%W%l!<%H$r9TI}0lGU$N(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
822 ``\texttt{-}''$BJ8;z$G=*$($k$3$H$G%(%_%e%l!<%H$7$F$$$k!%%F%s%W%l!<%H(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
823 $B%(%s%8%s$N(B\tplkword{header}$B%-!<%o!<%I$r;H$C$F%;%Q%l!<%?9T$r=PNO$N(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
824 $B:G=i$N9T$H$7$F=PNO$9$k!%!J2<5-$r;2>H!%!K$3$l$K$h$C$F(BSubversion$B$H;w(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
825 $BDL$C$?=PNO$r9T$C$F$$$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
826
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
827 %\item Subversion's output includes a count in the header of the number
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
828 % of lines in the commit message. We cannot replicate this in
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
829 % Mercurial; the templating engine does not currently provide a filter
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
830 % that counts the number of items it is passed.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
831 \item Subversion$B$N=PNO$O%X%C%@Fb$K%3%_%C%H%a%C%;!<%8$N9T?t$N%+%&%s%H$r(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
832 $B4^$s$G$$$k!%(BMercurial$B$G$O$3$l$r:F8=$9$k$3$H$O$G$-$J$$!%%F%s%W%l!<(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
833 $B%H%(%s%8%s$O8=>u$G$OEO$5$l$?%"%$%F%`$r?t$($k%U%#%k%?$r:n$k$3$H$,(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
834 $B$G$-$J$$!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
835 \end{itemize}
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
836 %It took me no more than a minute or two of work to replace literal
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
837 %text from an example of Subversion's output with some keywords and
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
838 %filters to give the template above. The style file simply refers to
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
839 %the template.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
840
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
841 Subversion$B$N=PNO$r;29M$K!$%F%-%9%H$rCV49$9$k%-!<%o!<%I!$%F%s%W%l!<%H$NF~$C(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
842 $B$?%U%#%k%?$r=`Hw$9$k$N$K$O$[$s$N#1!$#2J,$7$+$+$+$i$J$+$C$?!%%9%?%$%k%U%!(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
843 $B%$%k$OC1=c$K%F%s%W%l!<%H$r;2>H$9$k$N$_$G$"$k(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
844
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
845 \interaction{template.svnstyle.style}
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
846
363
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
847 %We could have included the text of the template file directly in the
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
848 %style file by enclosing it in quotes and replacing the newlines with
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
849 %``\texttt{\\n}'' sequences, but it would have made the style file too
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
850 %difficult to read. Readability is a good guide when you're trying to
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
851 %decide whether some text belongs in a style file, or in a template
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
852 %file that the style file points to. If the style file will look too
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
853 %big or cluttered if you insert a literal piece of text, drop it into a
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
854 %template instead.
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
855
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
856 $B%F%s%W%l!<%H%U%!%$%k$N%F%-%9%H$r%/%)!<%H$G3g$j!$2~9T$r(B``\texttt{\\n}''$B$G(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
857 $B%(%9%1!<%W$9$k$3$H$G%9%?%$%k%U%!%$%k$KD>@\DI2C$9$k$3$H$b2DG=$G$O$"$k!%$7(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
858 $B$+$7$=$&$7$?>l9g!$%9%?%$%k%U%!%$%k$,$[$H$s$IFI$a$J$$$[$IJ#;($K$J$C$F$7$^(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
859 $B$&$@$m$&!%%F%-%9%H$r%9%?%$%k%U%!%$%k$KF~$l$k$+!$%9%?%$%k%U%!%$%k$+$i8F$P(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
860 $B$l$k%F%s%W%l!<%H%U%!%$%k$KF~$l$k$+$O!$2DFI@-$r9MN8$7$F7hDj$9$Y$-$G$"$k!%(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
861 $B$b$7%F%-%9%H$rDI2C$7$?$3$H$G%9%?%$%k%U%!%$%k$,Bg$-$/$J$j2a$.$?$j!$Mp;($K(B
bc92b28fc970 finished template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 362
diff changeset
862 $B$J$C$?$j$7$?>l9g$O!$%F%s%W%l!<%H$X$N0\F0$r9MN8$9$k$H$h$$!%(B
83
b476081a9c04 Much progress in template chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents: 80
diff changeset
863
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
864 %%% Local Variables:
293
3b1291f24c0d - replaved latex-mode to yatex-mode
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 290
diff changeset
865 %%% mode: yatex
76
df88df78288d Add template chapter to build.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
866 %%% TeX-master: "00book"
360
45ad9986748a started template.tex
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 293
diff changeset
867 %%% End: