hgbook

view en/99defs.tex @ 58:3649ee841264

Merge with bos
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Tue Jul 25 09:07:20 2006 -0400 (2006-07-25)
parents fa8bafe467cb 18210d46491f
children 0aae9d676e0f
line source
1 % Bug ID.
2 \newcommand{\bug}[1]{\index{Mercurial bug
3 database!\href{http://www.selenic.com/mercurial/bts/issue#1}{bug
4 ~#1}}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial
5 bug no.~#1}}
7 % File name in the user's home directory.
8 \newcommand{\tildefile}[1]{\texttt{\~{}/#1}}
10 % File name.
11 \newcommand{\filename}[1]{\texttt{#1}}
13 % Directory name.
14 \newcommand{\dirname}[1]{\texttt{#1}}
16 % File name, with index entry.
17 % The ``s'' prefix comes from ``special''.
18 \newcommand{\sfilename}[1]{\index{\texttt{#1} file}\texttt{#1}}
20 % Directory name, with index entry.
21 \newcommand{\sdirname}[1]{\index{\texttt{#1} directory}\texttt{#1}}
23 % Mercurial extension.
24 \newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}}
26 % Mercurial command.
27 \newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''}
29 % Mercurial command, with arguments.
30 \newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''}
32 % Shell/system command.
33 \newcommand{\command}[1]{\index{\texttt{#1} command}\texttt{#1}}
35 % Shell/system command, with arguments.
36 \newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''}
38 % Mercurial command option.
39 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
41 % Mercurial global option.
42 \newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}}
44 % Shell/system command option.
45 \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
47 % Command option.
48 \newcommand{\option}[1]{\texttt{#1}}
50 % Software package.
51 \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}}
53 % Section name from a hgrc file.
54 \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}}
56 % Named item in a hgrc file section.
57 \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1}
58 section!\texttt{#2} entry}\texttt{#1.#2}}
60 % hgrc file.
61 \newcommand{\hgrc}{\index{\texttt{hgrc} file}\texttt{hgrc}}
63 % Hook name.
64 \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}}
66 % Environment variable.
67 \newcommand{\envar}[1]{\index{\texttt{#1} environment
68 variable}\index{environment variables!\texttt{#1}}\texttt{#1}}
70 % Python module.
71 \newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}}
73 % Bundled extension.
74 \newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}}
76 % Python class in a module.
77 \newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2}
78 class}\texttt{#1.#2}}
80 % Note: blah blah.
81 \newsavebox{\notebox}
82 \newenvironment{note}%
83 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}%
84 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
85 \newenvironment{caution}%
86 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Caution:}\space}%
87 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
89 % Code sample, eating 4 characters of leading space.
90 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}}
92 % Code sample, eating 2 characters of leading space.
93 \DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}}
95 % Interaction from the examples directory.
96 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}}
98 % Graphics inclusion.
99 \ifpdf
100 \newcommand{\grafix}[1]{\includegraphics{#1.pdf}}
101 \else
102 \newcommand{\grafix}[1]{\includegraphics{#1.png}}
103 \fi
105 %%% Local Variables:
106 %%% mode: latex
107 %%% TeX-master: "00book"
108 %%% End: