hgbook / ja / 99defs.tex

% Bug ID.
\newcommand{\bug}[1]{\index{Mercurial 
    $B%P%0%G!<%?%Y!<%9(B!
    \href{http://www.selenic.com/mercurial/bts/issue#1}{$B%P%0(B~#1}
    }\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial
    $B%P%0HV9f(B~#1}}

% File name in the user's home directory.
\newcommand{\tildefile}[1]{\texttt{\~{}/#1}}

% File name.
\newcommand{\filename}[1]{\texttt{#1}}

% Directory name.
\newcommand{\dirname}[1]{\texttt{#1}}

% File name, with index entry.
% The ``s'' prefix comes from ``special''.
\newcommand{\sfilename}[1]{\index{\texttt{#1} $B%U%!%$%k(B}\texttt{#1}}

% Directory name, with index entry.
\newcommand{\sdirname}[1]{\index{\texttt{#1} $B%G%#%l%/%H%j(B}\texttt{#1}}

% Mercurial extension.
\newcommand{\hgext}[1]{\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B}\texttt{#1}}

% Command provided by a Mercurial extension.
\newcommand{\hgxcmd}[2]{\index{\texttt{#2} $B%3%^%s%I(B (\texttt{#1}
    $B%$%/%9%F%s%7%g%s(B)
    }\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B!\texttt{#2} $B%3%^%s%I(B
    }``\texttt{hg #2}''}

% Mercurial command.
\newcommand{\hgcmd}[1]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{hg #1}''}

% Mercurial command, with arguments.
\newcommand{\hgcmdargs}[2]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{hg #1 #2}''}

\newcommand{\tplkword}[1]{\index{\texttt{#1} $B%F%s%W%l!<%H%-!<%o!<%I(B
    }\index{$B%F%s%W%l!<%H%-!<%o!<%I(B!\texttt{#1}}\texttt{#1}}

\newcommand{\tplkwfilt}[2]{
    \index{\texttt{#1} $B%F%s%W%l!<%H%-!<%o!<%I(B!\texttt{#2} $B%U%#%k%?(B
    }\index{$B%F%s%W%l!<%H%U%#%k%?(B!
    \texttt{#2}}\index{\texttt{#2} $B%F%s%W%l!<%H%U%#%k%?(B}\texttt{#2}}

\newcommand{\tplfilter}[1]{\index{$B%F%s%W%l!<%H%U%#%k%?(B!\texttt{#1}
    }\index{\texttt{#1} $B%F%s%W%l!<%H%U%#%k%?(B}\texttt{#1}}

% Shell/system command.
\newcommand{\command}[1]{\index{\texttt{#1} $B%7%9%F%`%3%^%s%I(B}\texttt{#1}}

% Shell/system command, with arguments.
\newcommand{\cmdargs}[2]{\index{\texttt{#1} $B%3%^%s%I(B}``\texttt{#1 #2}''}

% Mercurial command option.
\newcommand{\hgopt}[2]{\index{\texttt{#1} $B%3%^%s%I(B!\texttt{#2} $B%*%W%7%g%s(B
    }\texttt{#2}}

% Mercurial command option, provided by an extension command.
\newcommand{\hgxopt}[3]{
    \index{\texttt{#2} $B%3%^%s%I(B(\texttt{#1} $B%$%/%9%F%s%7%g%s(B)!
    \texttt{#3} $B%*%W%7%g%s(B
    }\index{\texttt{#1} $B%$%/%9%F%s%7%g%s(B!\texttt{#2} $B%3%^%s%I(B!
    \texttt{#3} $B%*%W%7%g%s(B}\texttt{#3}}

% Mercurial global option.
\newcommand{\hggopt}[1]{\index{$B%0%m!<%P%k%*%W%7%g%s(B!\texttt{#1} $B%*%W%7%g%s(B
    }\texttt{#1}}

% Shell/system command option.
\newcommand{\cmdopt}[2]{\index{\texttt{#1} $B%3%^%s%I(B!\texttt{#2} $B%*%W%7%g%s(B
    }\texttt{#2}}

% Command option.
\newcommand{\option}[1]{\texttt{#1}}

% Software package.
\newcommand{\package}[1]{\index{\texttt{#1} $B%Q%C%1!<%8(B}\texttt{#1}}

% Section name from a hgrc file.
\newcommand{\rcsection}[1]{\index{\texttt{hgrc} $B%U%!%$%k(B!\texttt{#1} $B%;%/%7%g%s(B
    }\texttt{[#1]}}

% Named item in a hgrc file section.
\newcommand{\rcitem}[2]{\index{\texttt{hgrc} $B%U%!%$%k(B!
    \texttt{#1} $B%;%/%7%g%s(B!\texttt{#2} $B9`L\(B}\texttt{#2}}

% hgrc file.
\newcommand{\hgrc}{\index{$B@_Dj%U%!%$%k(B!\texttt{hgrc}(Linux/Unix)
    }\index{\texttt{hgrc} $B@_Dj%U%!%$%k(B}\texttt{hgrc}}

% Mercurial.ini file.
\newcommand{\hgini}{\index{$B@_Dj%U%!%$%k(B!\texttt{Mercurial.ini}(Windows)
    }\index{\texttt{Mercurial.ini} $B@_Dj%U%!%$%k(B
    }\texttt{Mercurial.ini}}

% Hook name.
\newcommand{\hook}[1]{\index{\texttt{#1} $B%U%C%/(B
    }\index{$B%U%C%/(B!\texttt{#1}}\texttt{#1}}

% Environment variable.
\newcommand{\envar}[1]{\index{\texttt{#1} $B4D6-JQ?t(B
    }\index{$B4D6-JQ?t(B!\texttt{#1}}\texttt{#1}}

% Python module.
\newcommand{\pymod}[1]{\index{\texttt{#1} $B%b%8%e!<%k(B}\texttt{#1}}

% Python class in a module.
\newcommand{\pymodclass}[2]{\index{\texttt{#1} $B%b%8%e!<%k(B!\texttt{#2} $B%/%i%9(B
    }\texttt{#1.#2}}

% Python function in a module.
\newcommand{\pymodfunc}[2]{\index{\texttt{#1} $B%b%8%e!<%k(B!\texttt{#2} $B4X?t(B
    }\texttt{#1.#2}}

% Code sample, eating 4 characters of leading space.
\DefineVerbatimEnvironment{codesample4}{Verbatim}{
  frame=single,
  gobble=4,
  xleftmargin=0.1\textwidth,
  xrightmargin=0.1\textwidth,
  baselinestretch=0.8,
  numbers=left,
  commandchars=\\\{\}
}

% Code sample, eating 2 characters of leading space.
\DefineVerbatimEnvironment{codesample2}{Verbatim}{
  frame=single,
  gobble=2,
  xleftmargin=0.1\textwidth,
  xrightmargin=0.1\textwidth,
  baselinestretch=0.8,
  numbers=left,
  commandchars=\\\{\}
}

% Interaction from the examples directory.
\newcommand{\interaction}[1]{
  \vspace{1.5\kanjicharheight}
  \VerbatimInput[
    frame=single,
    xleftmargin=0.1\textwidth,
    xrightmargin=0.1\textwidth,
    baselinestretch=0.8,
    numbers=left,
    commandchars=\\\{\}
  ]{%
%    examples/#1.out
    examples/#1.lxo
  }
  \vspace{1.5\kanjicharheight}
}
% Example code from the examples directory.
\newcommand{\excode}[1]{
  \vspace{1.5\kanjicharheight}
  \VerbatimInput[
    frame=single,
    xleftmargin=0.1\textwidth,
    xrightmargin=0.1\textwidth,
    baselinestretch=0.8,
    numbers=left,
    commandchars=\\\{\}
  ]{../examples/#1}
  \vspace{1.5\kanjicharheight}
}

% Reference entry for a command.
\newcommand{\cmdref}[2]{\section{\hgcmd{#1}---#2}\label{cmdref:#1}
    \index{\texttt{#1} $B%3%^%s%I(B}}

% Reference entry for a command option with long and short forms.
\newcommand{\optref}[3]{\subsubsection{\hgopt{#1}{--#3} $B$J$$$7(B
    \hgopt{#1}{-#2}}}

% Reference entry for a command option with only long form.
\newcommand{\loptref}[2]{\subsubsection{\hgopt{#1}{--#2} $B%*%W%7%g%s(B}}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "00book"
%%% End: 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.