hgbook

annotate es/template.tex @ 425:2b4022f9e3f8

translated 2 paragraphs
author Javier Rojas <jerojasro@devnull.li>
date Fri Nov 21 00:07:44 2008 -0500 (2008-11-21)
parents 04c08ad7e92e
children 012631b248de
rev   line source
igor@402 1 \chapter{Customising the output of Mercurial}
igor@402 2 \label{chap:template}
igor@402 3
igor@402 4 Mercurial provides a powerful mechanism to let you control how it
igor@402 5 displays information. The mechanism is based on templates. You can
igor@402 6 use templates to generate specific output for a single command, or to
igor@402 7 customise the entire appearance of the built-in web interface.
igor@402 8
igor@402 9 \section{Using precanned output styles}
igor@402 10 \label{sec:style}
igor@402 11
igor@402 12 Packaged with Mercurial are some output styles that you can use
igor@402 13 immediately. A style is simply a precanned template that someone
igor@402 14 wrote and installed somewhere that Mercurial can find.
igor@402 15
igor@402 16 Before we take a look at Mercurial's bundled styles, let's review its
igor@402 17 normal output.
igor@402 18
igor@402 19 \interaction{template.simple.normal}
igor@402 20
igor@402 21 This is somewhat informative, but it takes up a lot of space---five
igor@402 22 lines of output per changeset. The \texttt{compact} style reduces
igor@402 23 this to three lines, presented in a sparse manner.
igor@402 24
igor@402 25 \interaction{template.simple.compact}
igor@402 26
igor@402 27 The \texttt{changelog} style hints at the expressive power of
igor@402 28 Mercurial's templating engine. This style attempts to follow the GNU
igor@402 29 Project's changelog guidelines\cite{web:changelog}.
igor@402 30
igor@402 31 \interaction{template.simple.changelog}
igor@402 32
igor@402 33 You will not be shocked to learn that Mercurial's default output style
igor@402 34 is named \texttt{default}.
igor@402 35
igor@402 36 \subsection{Setting a default style}
igor@402 37
igor@402 38 You can modify the output style that Mercurial will use for every
igor@402 39 command by editing your \hgrc\ file, naming the style you would
igor@402 40 prefer to use.
igor@402 41
igor@402 42 \begin{codesample2}
igor@402 43 [ui]
igor@402 44 style = compact
igor@402 45 \end{codesample2}
igor@402 46
igor@402 47 If you write a style of your own, you can use it by either providing
igor@402 48 the path to your style file, or copying your style file into a
igor@402 49 location where Mercurial can find it (typically the \texttt{templates}
igor@402 50 subdirectory of your Mercurial install directory).
igor@402 51
igor@402 52 \section{Commands that support styles and templates}
igor@402 53
igor@402 54 All of Mercurial's ``\texttt{log}-like'' commands let you use styles
igor@402 55 and templates: \hgcmd{incoming}, \hgcmd{log}, \hgcmd{outgoing}, and
igor@402 56 \hgcmd{tip}.
igor@402 57
igor@402 58 As I write this manual, these are so far the only commands that
igor@402 59 support styles and templates. Since these are the most important
igor@402 60 commands that need customisable output, there has been little pressure
igor@402 61 from the Mercurial user community to add style and template support to
igor@402 62 other commands.
igor@402 63
igor@402 64 \section{The basics of templating}
igor@402 65
igor@402 66 At its simplest, a Mercurial template is a piece of text. Some of the
igor@402 67 text never changes, while other parts are \emph{expanded}, or replaced
igor@402 68 with new text, when necessary.
igor@402 69
igor@402 70 Before we continue, let's look again at a simple example of
igor@402 71 Mercurial's normal output.
igor@402 72
igor@402 73 \interaction{template.simple.normal}
igor@402 74
igor@402 75 Now, let's run the same command, but using a template to change its
igor@402 76 output.
igor@402 77
igor@402 78 \interaction{template.simple.simplest}
igor@402 79
igor@402 80 The example above illustrates the simplest possible template; it's
igor@402 81 just a piece of static text, printed once for each changeset. The
igor@402 82 \hgopt{log}{--template} option to the \hgcmd{log} command tells
igor@402 83 Mercurial to use the given text as the template when printing each
igor@402 84 changeset.
igor@402 85
igor@402 86 Notice that the template string above ends with the text
igor@402 87 ``\Verb+\n+''. This is an \emph{escape sequence}, telling Mercurial
igor@402 88 to print a newline at the end of each template item. If you omit this
igor@402 89 newline, Mercurial will run each piece of output together. See
igor@402 90 section~\ref{sec:template:escape} for more details of escape sequences.
igor@402 91
igor@402 92 A template that prints a fixed string of text all the time isn't very
igor@402 93 useful; let's try something a bit more complex.
igor@402 94
igor@402 95 \interaction{template.simple.simplesub}
igor@402 96
igor@402 97 As you can see, the string ``\Verb+{desc}+'' in the template has been
igor@402 98 replaced in the output with the description of each changeset. Every
igor@402 99 time Mercurial finds text enclosed in curly braces (``\texttt{\{}''
igor@402 100 and ``\texttt{\}}''), it will try to replace the braces and text with
igor@402 101 the expansion of whatever is inside. To print a literal curly brace,
igor@402 102 you must escape it, as described in section~\ref{sec:template:escape}.
igor@402 103
igor@402 104 \section{Common template keywords}
igor@402 105 \label{sec:template:keyword}
igor@402 106
igor@402 107 You can start writing simple templates immediately using the keywords
igor@402 108 below.
igor@402 109
igor@402 110 \begin{itemize}
igor@402 111 \item[\tplkword{author}] String. The unmodified author of the changeset.
igor@402 112 \item[\tplkword{branches}] String. The name of the branch on which
igor@402 113 the changeset was committed. Will be empty if the branch name was
igor@402 114 \texttt{default}.
igor@402 115 \item[\tplkword{date}] Date information. The date when the changeset
igor@402 116 was committed. This is \emph{not} human-readable; you must pass it
igor@402 117 through a filter that will render it appropriately. See
igor@402 118 section~\ref{sec:template:filter} for more information on filters.
igor@402 119 The date is expressed as a pair of numbers. The first number is a
igor@402 120 Unix UTC timestamp (seconds since January 1, 1970); the second is
igor@402 121 the offset of the committer's timezone from UTC, in seconds.
igor@402 122 \item[\tplkword{desc}] String. The text of the changeset description.
igor@402 123 \item[\tplkword{files}] List of strings. All files modified, added, or
igor@402 124 removed by this changeset.
igor@402 125 \item[\tplkword{file\_adds}] List of strings. Files added by this
igor@402 126 changeset.
igor@402 127 \item[\tplkword{file\_dels}] List of strings. Files removed by this
igor@402 128 changeset.
igor@402 129 \item[\tplkword{node}] String. The changeset identification hash, as a
igor@402 130 40-character hexadecimal string.
igor@402 131 \item[\tplkword{parents}] List of strings. The parents of the
igor@402 132 changeset.
igor@402 133 \item[\tplkword{rev}] Integer. The repository-local changeset revision
igor@402 134 number.
igor@402 135 \item[\tplkword{tags}] List of strings. Any tags associated with the
igor@402 136 changeset.
igor@402 137 \end{itemize}
igor@402 138
igor@402 139 A few simple experiments will show us what to expect when we use these
igor@402 140 keywords; you can see the results in
igor@402 141 figure~\ref{fig:template:keywords}.
igor@402 142
igor@402 143 \begin{figure}
igor@402 144 \interaction{template.simple.keywords}
igor@402 145 \caption{Template keywords in use}
igor@402 146 \label{fig:template:keywords}
igor@402 147 \end{figure}
igor@402 148
igor@402 149 As we noted above, the date keyword does not produce human-readable
igor@402 150 output, so we must treat it specially. This involves using a
igor@402 151 \emph{filter}, about which more in section~\ref{sec:template:filter}.
igor@402 152
igor@402 153 \interaction{template.simple.datekeyword}
igor@402 154
igor@402 155 \section{Escape sequences}
igor@402 156 \label{sec:template:escape}
igor@402 157
igor@402 158 Mercurial's templating engine recognises the most commonly used escape
igor@402 159 sequences in strings. When it sees a backslash (``\Verb+\+'')
igor@402 160 character, it looks at the following character and substitutes the two
igor@402 161 characters with a single replacement, as described below.
igor@402 162
igor@402 163 \begin{itemize}
igor@402 164 \item[\Verb+\textbackslash\textbackslash+] Backslash, ``\Verb+\+'',
igor@402 165 ASCII~134.
igor@402 166 \item[\Verb+\textbackslash n+] Newline, ASCII~12.
igor@402 167 \item[\Verb+\textbackslash r+] Carriage return, ASCII~15.
igor@402 168 \item[\Verb+\textbackslash t+] Tab, ASCII~11.
igor@402 169 \item[\Verb+\textbackslash v+] Vertical tab, ASCII~13.
igor@402 170 \item[\Verb+\textbackslash \{+] Open curly brace, ``\Verb+{+'', ASCII~173.
igor@402 171 \item[\Verb+\textbackslash \}+] Close curly brace, ``\Verb+}+'', ASCII~175.
igor@402 172 \end{itemize}
igor@402 173
igor@402 174 As indicated above, if you want the expansion of a template to contain
igor@402 175 a literal ``\Verb+\+'', ``\Verb+{+'', or ``\Verb+{+'' character, you
igor@402 176 must escape it.
igor@402 177
igor@402 178 \section{Filtering keywords to change their results}
igor@402 179 \label{sec:template:filter}
igor@402 180
igor@402 181 Some of the results of template expansion are not immediately easy to
igor@402 182 use. Mercurial lets you specify an optional chain of \emph{filters}
igor@402 183 to modify the result of expanding a keyword. You have already seen a
igor@402 184 common filter, \tplkwfilt{date}{isodate}, in action above, to make a
igor@402 185 date readable.
igor@402 186
igor@402 187 Below is a list of the most commonly used filters that Mercurial
igor@402 188 supports. While some filters can be applied to any text, others can
igor@402 189 only be used in specific circumstances. The name of each filter is
igor@402 190 followed first by an indication of where it can be used, then a
igor@402 191 description of its effect.
igor@402 192
igor@402 193 \begin{itemize}
igor@402 194 \item[\tplfilter{addbreaks}] Any text. Add an XHTML ``\Verb+<br/>+''
igor@402 195 tag before the end of every line except the last. For example,
igor@402 196 ``\Verb+foo\nbar+'' becomes ``\Verb+foo<br/>\nbar+''.
igor@402 197 \item[\tplkwfilt{date}{age}] \tplkword{date} keyword. Render the
igor@402 198 age of the date, relative to the current time. Yields a string like
igor@402 199 ``\Verb+10 minutes+''.
igor@402 200 \item[\tplfilter{basename}] Any text, but most useful for the
igor@402 201 \tplkword{files} keyword and its relatives. Treat the text as a
igor@402 202 path, and return the basename. For example, ``\Verb+foo/bar/baz+''
igor@402 203 becomes ``\Verb+baz+''.
igor@402 204 \item[\tplkwfilt{date}{date}] \tplkword{date} keyword. Render a date
igor@402 205 in a similar format to the Unix \tplkword{date} command, but with
igor@402 206 timezone included. Yields a string like
igor@402 207 ``\Verb+Mon Sep 04 15:13:13 2006 -0700+''.
igor@402 208 \item[\tplkwfilt{author}{domain}] Any text, but most useful for the
igor@402 209 \tplkword{author} keyword. Finds the first string that looks like
igor@402 210 an email address, and extract just the domain component. For
igor@402 211 example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
igor@402 212 ``\Verb+serpentine.com+''.
igor@402 213 \item[\tplkwfilt{author}{email}] Any text, but most useful for the
igor@402 214 \tplkword{author} keyword. Extract the first string that looks like
igor@402 215 an email address. For example,
igor@402 216 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
igor@402 217 ``\Verb+bos@serpentine.com+''.
igor@402 218 \item[\tplfilter{escape}] Any text. Replace the special XML/XHTML
igor@402 219 characters ``\Verb+&+'', ``\Verb+<+'' and ``\Verb+>+'' with
igor@402 220 XML entities.
igor@402 221 \item[\tplfilter{fill68}] Any text. Wrap the text to fit in 68
igor@402 222 columns. This is useful before you pass text through the
igor@402 223 \tplfilter{tabindent} filter, and still want it to fit in an
igor@402 224 80-column fixed-font window.
igor@402 225 \item[\tplfilter{fill76}] Any text. Wrap the text to fit in 76
igor@402 226 columns.
igor@402 227 \item[\tplfilter{firstline}] Any text. Yield the first line of text,
igor@402 228 without any trailing newlines.
igor@402 229 \item[\tplkwfilt{date}{hgdate}] \tplkword{date} keyword. Render the
igor@402 230 date as a pair of readable numbers. Yields a string like
igor@402 231 ``\Verb+1157407993 25200+''.
igor@402 232 \item[\tplkwfilt{date}{isodate}] \tplkword{date} keyword. Render the
igor@402 233 date as a text string in ISO~8601 format. Yields a string like
igor@402 234 ``\Verb+2006-09-04 15:13:13 -0700+''.
igor@402 235 \item[\tplfilter{obfuscate}] Any text, but most useful for the
igor@402 236 \tplkword{author} keyword. Yield the input text rendered as a
igor@402 237 sequence of XML entities. This helps to defeat some particularly
igor@402 238 stupid screen-scraping email harvesting spambots.
igor@402 239 \item[\tplkwfilt{author}{person}] Any text, but most useful for the
igor@402 240 \tplkword{author} keyword. Yield the text before an email address.
igor@402 241 For example, ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+''
igor@402 242 becomes ``\Verb+Bryan O'Sullivan+''.
igor@402 243 \item[\tplkwfilt{date}{rfc822date}] \tplkword{date} keyword. Render a
igor@402 244 date using the same format used in email headers. Yields a string
igor@402 245 like ``\Verb+Mon, 04 Sep 2006 15:13:13 -0700+''.
igor@402 246 \item[\tplkwfilt{node}{short}] Changeset hash. Yield the short form
igor@402 247 of a changeset hash, i.e.~a 12-byte hexadecimal string.
igor@402 248 \item[\tplkwfilt{date}{shortdate}] \tplkword{date} keyword. Render
igor@402 249 the year, month, and day of the date. Yields a string like
igor@402 250 ``\Verb+2006-09-04+''.
igor@402 251 \item[\tplfilter{strip}] Any text. Strip all leading and trailing
igor@402 252 whitespace from the string.
igor@402 253 \item[\tplfilter{tabindent}] Any text. Yield the text, with every line
igor@402 254 except the first starting with a tab character.
igor@402 255 \item[\tplfilter{urlescape}] Any text. Escape all characters that are
igor@402 256 considered ``special'' by URL parsers. For example, \Verb+foo bar+
igor@402 257 becomes \Verb+foo%20bar+.
igor@402 258 \item[\tplkwfilt{author}{user}] Any text, but most useful for the
igor@402 259 \tplkword{author} keyword. Return the ``user'' portion of an email
igor@402 260 address. For example,
igor@402 261 ``\Verb+Bryan O'Sullivan <bos@serpentine.com>+'' becomes
igor@402 262 ``\Verb+bos+''.
igor@402 263 \end{itemize}
igor@402 264
igor@402 265 \begin{figure}
igor@402 266 \interaction{template.simple.manyfilters}
igor@402 267 \caption{Template filters in action}
igor@402 268 \label{fig:template:filters}
igor@402 269 \end{figure}
igor@402 270
igor@402 271 \begin{note}
igor@402 272 If you try to apply a filter to a piece of data that it cannot
igor@402 273 process, Mercurial will fail and print a Python exception. For
igor@402 274 example, trying to run the output of the \tplkword{desc} keyword
igor@402 275 into the \tplkwfilt{date}{isodate} filter is not a good idea.
igor@402 276 \end{note}
igor@402 277
igor@402 278 \subsection{Combining filters}
igor@402 279
igor@402 280 It is easy to combine filters to yield output in the form you would
igor@402 281 like. The following chain of filters tidies up a description, then
igor@402 282 makes sure that it fits cleanly into 68 columns, then indents it by a
igor@402 283 further 8~characters (at least on Unix-like systems, where a tab is
igor@402 284 conventionally 8~characters wide).
igor@402 285
igor@402 286 \interaction{template.simple.combine}
igor@402 287
igor@402 288 Note the use of ``\Verb+\t+'' (a tab character) in the template to
igor@402 289 force the first line to be indented; this is necessary since
igor@402 290 \tplkword{tabindent} indents all lines \emph{except} the first.
igor@402 291
igor@402 292 Keep in mind that the order of filters in a chain is significant. The
igor@402 293 first filter is applied to the result of the keyword; the second to
igor@402 294 the result of the first filter; and so on. For example, using
igor@402 295 \Verb+fill68|tabindent+ gives very different results from
igor@402 296 \Verb+tabindent|fill68+.
igor@402 297
igor@402 298
igor@402 299 \section{From templates to styles}
igor@402 300
igor@402 301 A command line template provides a quick and simple way to format some
igor@402 302 output. Templates can become verbose, though, and it's useful to be
igor@402 303 able to give a template a name. A style file is a template with a
igor@402 304 name, stored in a file.
igor@402 305
igor@402 306 More than that, using a style file unlocks the power of Mercurial's
igor@402 307 templating engine in ways that are not possible using the command line
igor@402 308 \hgopt{log}{--template} option.
igor@402 309
igor@402 310 \subsection{The simplest of style files}
igor@402 311
igor@402 312 Our simple style file contains just one line:
igor@402 313
igor@402 314 \interaction{template.simple.rev}
igor@402 315
igor@402 316 This tells Mercurial, ``if you're printing a changeset, use the text
igor@402 317 on the right as the template''.
igor@402 318
igor@402 319 \subsection{Style file syntax}
igor@402 320
igor@402 321 The syntax rules for a style file are simple.
igor@402 322
igor@402 323 \begin{itemize}
igor@402 324 \item The file is processed one line at a time.
igor@402 325
igor@402 326 \item Leading and trailing white space are ignored.
igor@402 327
igor@402 328 \item Empty lines are skipped.
igor@402 329
igor@402 330 \item If a line starts with either of the characters ``\texttt{\#}'' or
igor@402 331 ``\texttt{;}'', the entire line is treated as a comment, and skipped
igor@402 332 as if empty.
igor@402 333
igor@402 334 \item A line starts with a keyword. This must start with an
igor@402 335 alphabetic character or underscore, and can subsequently contain any
igor@402 336 alphanumeric character or underscore. (In regexp notation, a
igor@402 337 keyword must match \Verb+[A-Za-z_][A-Za-z0-9_]*+.)
igor@402 338
igor@402 339 \item The next element must be an ``\texttt{=}'' character, which can
igor@402 340 be preceded or followed by an arbitrary amount of white space.
igor@402 341
igor@402 342 \item If the rest of the line starts and ends with matching quote
igor@402 343 characters (either single or double quote), it is treated as a
igor@402 344 template body.
igor@402 345
igor@402 346 \item If the rest of the line \emph{does not} start with a quote
igor@402 347 character, it is treated as the name of a file; the contents of this
igor@402 348 file will be read and used as a template body.
igor@402 349 \end{itemize}
igor@402 350
igor@402 351 \section{Style files by example}
igor@402 352
igor@402 353 To illustrate how to write a style file, we will construct a few by
igor@402 354 example. Rather than provide a complete style file and walk through
igor@402 355 it, we'll mirror the usual process of developing a style file by
igor@402 356 starting with something very simple, and walking through a series of
igor@402 357 successively more complete examples.
igor@402 358
igor@402 359 \subsection{Identifying mistakes in style files}
igor@402 360
igor@402 361 If Mercurial encounters a problem in a style file you are working on,
igor@402 362 it prints a terse error message that, once you figure out what it
igor@402 363 means, is actually quite useful.
igor@402 364
igor@402 365 \interaction{template.svnstyle.syntax.input}
igor@402 366
igor@402 367 Notice that \filename{broken.style} attempts to define a
igor@402 368 \texttt{changeset} keyword, but forgets to give any content for it.
igor@402 369 When instructed to use this style file, Mercurial promptly complains.
igor@402 370
igor@402 371 \interaction{template.svnstyle.syntax.error}
igor@402 372
igor@402 373 This error message looks intimidating, but it is not too hard to
igor@402 374 follow.
igor@402 375
igor@402 376 \begin{itemize}
igor@402 377 \item The first component is simply Mercurial's way of saying ``I am
igor@402 378 giving up''.
igor@402 379 \begin{codesample4}
igor@402 380 \textbf{abort:} broken.style:1: parse error
igor@402 381 \end{codesample4}
igor@402 382
igor@402 383 \item Next comes the name of the style file that contains the error.
igor@402 384 \begin{codesample4}
igor@402 385 abort: \textbf{broken.style}:1: parse error
igor@402 386 \end{codesample4}
igor@402 387
igor@402 388 \item Following the file name is the line number where the error was
igor@402 389 encountered.
igor@402 390 \begin{codesample4}
igor@402 391 abort: broken.style:\textbf{1}: parse error
igor@402 392 \end{codesample4}
igor@402 393
igor@402 394 \item Finally, a description of what went wrong.
igor@402 395 \begin{codesample4}
igor@402 396 abort: broken.style:1: \textbf{parse error}
igor@402 397 \end{codesample4}
igor@402 398 The description of the problem is not always clear (as in this
igor@402 399 case), but even when it is cryptic, it is almost always trivial to
igor@402 400 visually inspect the offending line in the style file and see what
igor@402 401 is wrong.
igor@402 402 \end{itemize}
igor@402 403
igor@402 404 \subsection{Uniquely identifying a repository}
igor@402 405
igor@402 406 If you would like to be able to identify a Mercurial repository
igor@402 407 ``fairly uniquely'' using a short string as an identifier, you can
igor@402 408 use the first revision in the repository.
igor@402 409 \interaction{template.svnstyle.id}
igor@402 410 This is not guaranteed to be unique, but it is nevertheless useful in
igor@402 411 many cases.
igor@402 412 \begin{itemize}
igor@402 413 \item It will not work in a completely empty repository, because such
igor@402 414 a repository does not have a revision~zero.
igor@402 415 \item Neither will it work in the (extremely rare) case where a
igor@402 416 repository is a merge of two or more formerly independent
igor@402 417 repositories, and you still have those repositories around.
igor@402 418 \end{itemize}
igor@402 419 Here are some uses to which you could put this identifier:
igor@402 420 \begin{itemize}
igor@402 421 \item As a key into a table for a database that manages repositories
igor@402 422 on a server.
igor@402 423 \item As half of a \{\emph{repository~ID}, \emph{revision~ID}\} tuple.
igor@402 424 Save this information away when you run an automated build or other
igor@402 425 activity, so that you can ``replay'' the build later if necessary.
igor@402 426 \end{itemize}
igor@402 427
igor@402 428 \subsection{Mimicking Subversion's output}
igor@402 429
igor@402 430 Let's try to emulate the default output format used by another
igor@402 431 revision control tool, Subversion.
igor@402 432 \interaction{template.svnstyle.short}
igor@402 433
igor@402 434 Since Subversion's output style is fairly simple, it is easy to
igor@402 435 copy-and-paste a hunk of its output into a file, and replace the text
igor@402 436 produced above by Subversion with the template values we'd like to see
igor@402 437 expanded.
igor@402 438 \interaction{template.svnstyle.template}
igor@402 439
igor@402 440 There are a few small ways in which this template deviates from the
igor@402 441 output produced by Subversion.
igor@402 442 \begin{itemize}
igor@402 443 \item Subversion prints a ``readable'' date (the ``\texttt{Wed, 27 Sep
igor@402 444 2006}'' in the example output above) in parentheses. Mercurial's
igor@402 445 templating engine does not provide a way to display a date in this
igor@402 446 format without also printing the time and time zone.
igor@402 447 \item We emulate Subversion's printing of ``separator'' lines full of
igor@402 448 ``\texttt{-}'' characters by ending the template with such a line.
igor@402 449 We use the templating engine's \tplkword{header} keyword to print a
igor@402 450 separator line as the first line of output (see below), thus
igor@402 451 achieving similar output to Subversion.
igor@402 452 \item Subversion's output includes a count in the header of the number
igor@402 453 of lines in the commit message. We cannot replicate this in
igor@402 454 Mercurial; the templating engine does not currently provide a filter
igor@402 455 that counts the number of items it is passed.
igor@402 456 \end{itemize}
igor@402 457 It took me no more than a minute or two of work to replace literal
igor@402 458 text from an example of Subversion's output with some keywords and
igor@402 459 filters to give the template above. The style file simply refers to
igor@402 460 the template.
igor@402 461 \interaction{template.svnstyle.style}
igor@402 462
igor@402 463 We could have included the text of the template file directly in the
igor@402 464 style file by enclosing it in quotes and replacing the newlines with
igor@402 465 ``\verb!\n!'' sequences, but it would have made the style file too
igor@402 466 difficult to read. Readability is a good guide when you're trying to
igor@402 467 decide whether some text belongs in a style file, or in a template
igor@402 468 file that the style file points to. If the style file will look too
igor@402 469 big or cluttered if you insert a literal piece of text, drop it into a
igor@402 470 template instead.
igor@402 471
igor@402 472 %%% Local Variables:
igor@402 473 %%% mode: latex
igor@402 474 %%% TeX-master: "00book"
igor@402 475 %%% End: