hgbook

view en/99defs.tex @ 926:730d912ef843

Work in progress on translating the introduction chapter. I also added a non exhaustive list of major Open Source projet using Mercurial. This list still needs to be 'linked' with the appropriate URLs, and also to be 'backported' into the english and spanish version of hgbooks.
author Romain PELISSE <romain.pelisse@atosorigin.com>
date Sun Feb 08 14:17:16 2009 +0100 (2009-02-08)
parents 4ed483f08e33
children
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 % Command provided by a Mercurial extension.
27 \newcommand{\hgxcmd}[2]{\index{\texttt{#2} command (\texttt{#1}
28 extension)}\index{\texttt{#1} extension!\texttt{#2} command}``\texttt{hg #2}''}
30 % Mercurial command.
31 \newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''}
33 % Mercurial command, with arguments.
34 \newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''}
36 \newcommand{\tplkword}[1]{\index{\texttt{#1} template keyword}\index{template keywords!\texttt{#1}}\texttt{#1}}
38 \newcommand{\tplkwfilt}[2]{\index{\texttt{#1} template keyword!\texttt{#2}
39 filter}\index{template filters!\texttt{#2}}\index{\texttt{#2}
40 template filter}\texttt{#2}}
42 \newcommand{\tplfilter}[1]{\index{template
43 filters!\texttt{#1}}\index{\texttt{#1} template
44 filter}\texttt{#1}}
46 % Shell/system command.
47 \newcommand{\command}[1]{\index{\texttt{#1} system command}\texttt{#1}}
49 % Shell/system command, with arguments.
50 \newcommand{\cmdargs}[2]{\index{\texttt{#1} system command}``\texttt{#1 #2}''}
52 % Mercurial command option.
53 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
55 % Mercurial command option, provided by an extension command.
56 \newcommand{\hgxopt}[3]{\index{\texttt{#2} command (\texttt{#1} extension)!\texttt{#3} option}\index{\texttt{#1} extension!\texttt{#2} command!\texttt{#3} option}\texttt{#3}}
58 % Mercurial global option.
59 \newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}}
61 % Shell/system command option.
62 \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
64 % Command option.
65 \newcommand{\option}[1]{\texttt{#1}}
67 % Software package.
68 \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}}
70 % Section name from a hgrc file.
71 \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}}
73 % Named item in a hgrc file section.
74 \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1}
75 section!\texttt{#2} entry}\texttt{#2}}
77 % hgrc file.
78 \newcommand{\hgrc}{\index{configuration file!\texttt{hgrc}
79 (Linux/Unix)}\index{\texttt{hgrc} configuration file}\texttt{hgrc}}
81 % Mercurial.ini file.
82 \newcommand{\hgini}{\index{configuration file!\texttt{Mercurial.ini}
83 (Windows)}\index{\texttt{Mercurial.ini} configuration file}\texttt{Mercurial.ini}}
85 % Hook name.
86 \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}}
88 % Environment variable.
89 \newcommand{\envar}[1]{\index{\texttt{#1} environment
90 variable}\index{environment variables!\texttt{#1}}\texttt{#1}}
92 % Python module.
93 \newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}}
95 % Python class in a module.
96 \newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2}
97 class}\texttt{#1.#2}}
99 % Python function in a module.
100 \newcommand{\pymodfunc}[2]{\index{\texttt{#1} module!\texttt{#2}
101 function}\texttt{#1.#2}}
103 % Note: blah blah.
104 \newsavebox{\notebox}
105 \newenvironment{note}%
106 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}%
107 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
108 \newenvironment{caution}%
109 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Caution:}\space}%
110 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
112 % Code sample, eating 4 characters of leading space.
113 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}}
115 % Code sample, eating 2 characters of leading space.
116 \DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}}
118 % Interaction from the examples directory.
119 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.lxo}}
120 % Example code from the examples directory.
121 \newcommand{\excode}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{../examples/#1}}
123 % Graphics inclusion.
124 \ifpdf
125 \newcommand{\grafix}[1]{\includegraphics{#1}}
126 \else
127 \newcommand{\grafix}[1]{\includegraphics{#1.png}}
128 \fi
130 % Reference entry for a command.
131 \newcommand{\cmdref}[2]{\section{\hgcmd{#1}---#2}\label{cmdref:#1}\index{\texttt{#1} command}}
133 % Reference entry for a command option with long and short forms.
134 \newcommand{\optref}[3]{\subsubsection{\hgopt{#1}{--#3}, also \hgopt{#1}{-#2}}}
136 % Reference entry for a command option with only long form.
137 \newcommand{\loptref}[2]{\subsubsection{\hgopt{#1}{--#2} option}}
139 % command to generate a footnote to be used as a translator's note
140 \newcommand{\ndt}[1]{\footnote{\textbf{N. del T.} #1}}
143 %%% Local Variables:
144 %%% mode: latex
145 %%% TeX-master: "00book"
146 %%% End: