hgbook

diff en/99defs.tex @ 57:fa8bafe467cb

Merge with upstream
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Tue Jul 25 00:02:24 2006 -0400 (2006-07-25)
parents b8539d91c84d b49a7dd4e564
children 3649ee841264
line diff
     1.1 --- a/en/99defs.tex	Mon Jul 24 23:57:52 2006 -0400
     1.2 +++ b/en/99defs.tex	Tue Jul 25 00:02:24 2006 -0400
     1.3 @@ -1,26 +1,80 @@
     1.4 -\newcommand{\bug}[1]{\index{Mercurial issue!no.~#1}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial issue no.~#1}}
     1.5 +% Bug ID.
     1.6 +\newcommand{\bug}[1]{\index{Mercurial bug
     1.7 +    database!\href{http://www.selenic.com/mercurial/bts/issue#1}{bug
     1.8 +      ~#1}}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial
     1.9 +    bug no.~#1}}
    1.10 +
    1.11 +% File name in the user's home directory.
    1.12  \newcommand{\tildefile}[1]{\texttt{\~{}/#1}}
    1.13 +
    1.14 +% File name.
    1.15  \newcommand{\filename}[1]{\texttt{#1}}
    1.16 +
    1.17 +% Directory name.
    1.18  \newcommand{\dirname}[1]{\texttt{#1}}
    1.19 +
    1.20 +% File name, with index entry.
    1.21 +% The ``s'' prefix comes from ``special''.
    1.22  \newcommand{\sfilename}[1]{\index{\texttt{#1} file}\texttt{#1}}
    1.23 +
    1.24 +% Directory name, with index entry.
    1.25  \newcommand{\sdirname}[1]{\index{\texttt{#1} directory}\texttt{#1}}
    1.26 +
    1.27 +% Mercurial extension.
    1.28  \newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}}
    1.29 +
    1.30 +% Mercurial command.
    1.31  \newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''}
    1.32 +
    1.33 +% Mercurial command, with arguments.
    1.34 +\newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''}
    1.35 +
    1.36 +% Shell/system command.
    1.37  \newcommand{\command}[1]{\index{\texttt{#1} command}\texttt{#1}}
    1.38 +
    1.39 +% Shell/system command, with arguments.
    1.40  \newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''}
    1.41 -\newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''}
    1.42 +
    1.43 +% Mercurial command option.
    1.44  \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
    1.45 +
    1.46 +% Mercurial global option.
    1.47 +\newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}}
    1.48 +
    1.49 +% Shell/system command option.
    1.50  \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
    1.51 +
    1.52 +% Command option.
    1.53  \newcommand{\option}[1]{\texttt{#1}}
    1.54 +
    1.55 +% Software package.
    1.56  \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}}
    1.57 +
    1.58 +% Section name from a hgrc file.
    1.59  \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}}
    1.60 +
    1.61 +% Named item in a hgrc file section.
    1.62  \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1}
    1.63      section!\texttt{#2} entry}\texttt{#1.#2}}
    1.64 +
    1.65 +% hgrc file.
    1.66  \newcommand{\hgrc}{\index{\texttt{hgrc} file}\texttt{hgrc}}
    1.67 +
    1.68 +% Hook name.
    1.69  \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}}
    1.70 +
    1.71 +% Environment variable.
    1.72  \newcommand{\envar}[1]{\index{\texttt{#1} environment
    1.73      variable}\index{environment variables!\texttt{#1}}\texttt{#1}}
    1.74  
    1.75 +% Python module.
    1.76 +\newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}}
    1.77 +
    1.78 +% Python class in a module.
    1.79 +\newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2}
    1.80 +    class}\texttt{#1.#2}}
    1.81 +
    1.82 +% Note: blah blah.
    1.83  \newsavebox{\notebox}
    1.84  \newenvironment{note}%
    1.85    {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}%
    1.86 @@ -29,11 +83,18 @@
    1.87    {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Caution:}\space}%
    1.88    {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
    1.89  
    1.90 +% Code sample, eating 4 characters of leading space.
    1.91  \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}}
    1.92 +
    1.93 +% Code sample, eating 2 characters of leading space.
    1.94 +\DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}}
    1.95 +
    1.96 +% Interaction from the examples directory.
    1.97  \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}}
    1.98  
    1.99 +% Graphics inclusion.
   1.100  \ifpdf
   1.101 -  \newcommand{\grafix}[1]{\includegraphics[scale=0.2]{#1_pdf.png}}
   1.102 +  \newcommand{\grafix}[1]{\includegraphics{#1}}
   1.103  \else
   1.104    \newcommand{\grafix}[1]{\includegraphics{#1.png}}
   1.105  \fi