Mercurial > hgbook
annotate en/99defs.tex @ 37:9fd0c59b009a
Add to hook chapter.
Document each macro in 99defs.tex.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon, 17 Jul 2006 00:01:01 -0700 |
parents | e68f4a96c16e |
children | b49a7dd4e564 |
rev | line source |
---|---|
37 | 1 % Bug ID. |
26 | 2 \newcommand{\bug}[1]{\index{Mercurial issue!no.~#1}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial issue no.~#1}} |
37 | 3 |
4 % File name in the user's home directory. | |
4
33a2e7b9978d
Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3
diff
changeset
|
5 \newcommand{\tildefile}[1]{\texttt{\~{}/#1}} |
37 | 6 |
7 % File name. | |
2 | 8 \newcommand{\filename}[1]{\texttt{#1}} |
37 | 9 |
10 % Directory name. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
11 \newcommand{\dirname}[1]{\texttt{#1}} |
37 | 12 |
13 % File name, with index entry. | |
14 % The ``s'' prefix comes from ``special''. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
15 \newcommand{\sfilename}[1]{\index{\texttt{#1} file}\texttt{#1}} |
37 | 16 |
17 % Directory name, with index entry. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
18 \newcommand{\sdirname}[1]{\index{\texttt{#1} directory}\texttt{#1}} |
37 | 19 |
20 % Mercurial extension. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
21 \newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}} |
37 | 22 |
23 % Mercurial command. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
24 \newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''} |
37 | 25 |
26 % Mercurial command, with arguments. | |
27 \newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''} | |
28 | |
29 % Shell/system command. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
30 \newcommand{\command}[1]{\index{\texttt{#1} command}\texttt{#1}} |
37 | 31 |
32 % Shell/system command, with arguments. | |
26 | 33 \newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''} |
37 | 34 |
35 % Mercurial command option. | |
17
2668e15c76e9
MQ: write up patch rebasing.
Bryan O'Sullivan <bos@serpentine.com>
parents:
16
diff
changeset
|
36 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}} |
37 | 37 |
38 % Mercurial global option. | |
39 \newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}} | |
40 | |
41 % Shell/system command option. | |
19
187702df428b
Piles of new content for MQ chapter - cookbook stuff.
Bryan O'Sullivan <bos@serpentine.com>
parents:
17
diff
changeset
|
42 \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}} |
37 | 43 |
44 % Command option. | |
27
535e87792eb1
More MQ content and examples.
Bryan O'Sullivan <bos@serpentine.com>
parents:
26
diff
changeset
|
45 \newcommand{\option}[1]{\texttt{#1}} |
37 | 46 |
47 % Software package. | |
16
81454425eee9
Progress on a few fronts, mainly indexing and MQ chapter content
Bryan O'Sullivan <bos@serpentine.com>
parents:
14
diff
changeset
|
48 \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}} |
37 | 49 |
50 % Section name from a hgrc file. | |
34
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
51 \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}} |
37 | 52 |
53 % Named item in a hgrc file section. | |
34
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
54 \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1} |
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
55 section!\texttt{#2} entry}\texttt{#1.#2}} |
37 | 56 |
57 % hgrc file. | |
34
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
58 \newcommand{\hgrc}{\index{\texttt{hgrc} file}\texttt{hgrc}} |
37 | 59 |
60 % Hook name. | |
34
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
61 \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}} |
37 | 62 |
63 % Environment variable. | |
34
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
64 \newcommand{\envar}[1]{\index{\texttt{#1} environment |
c0979ed1eabd
Get started on hook chapter.
Bryan O'Sullivan <bos@serpentine.com>
parents:
27
diff
changeset
|
65 variable}\index{environment variables!\texttt{#1}}\texttt{#1}} |
0
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
66 |
37 | 67 % Python module. |
68 \newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}} | |
69 | |
70 % Python class in a module. | |
71 \newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2} | |
72 class}\texttt{#1.#2}} | |
73 | |
74 % Note: blah blah. | |
7
339e75288632
More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents:
4
diff
changeset
|
75 \newsavebox{\notebox} |
11 | 76 \newenvironment{note}% |
77 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}% | |
78 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}} | |
7
339e75288632
More progress on MQ chapter and general support.
Bryan O'Sullivan <bos@serpentine.com>
parents:
4
diff
changeset
|
79 |
37 | 80 % Code sample, eating 4 characters of leading space. |
4
33a2e7b9978d
Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3
diff
changeset
|
81 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}} |
37 | 82 |
83 % Code sample, eating 2 characters of leading space. | |
84 \DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}} | |
85 | |
86 % Interaction from the examples directory. | |
4
33a2e7b9978d
Make it possible to include example input and output from real programs.
Bryan O'Sullivan <bos@serpentine.com>
parents:
3
diff
changeset
|
87 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}} |
3
906d9021f9e5
Making progress on autogenerated example output.
Bryan O'Sullivan <bos@serpentine.com>
parents:
2
diff
changeset
|
88 |
37 | 89 % Graphics inclusion. |
11 | 90 \ifpdf |
35
e68f4a96c16e
Fixed the \grafix macro to work for PDFs again.
Josef "Jeff" Sipek <jeffpc@josefsipek.net>
parents:
34
diff
changeset
|
91 \newcommand{\grafix}[1]{\includegraphics{#1}} |
11 | 92 \else |
93 \newcommand{\grafix}[1]{\includegraphics{#1.png}} | |
94 \fi | |
95 | |
0
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
96 %%% Local Variables: |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
97 %%% mode: latex |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
98 %%% TeX-master: "00book" |
76fba5835a1b
Beginnings of a build process and file layout.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
99 %%% End: |