hgbook
annotate en/99defs.tex @ 171:8c1703a98266
Add a dependency on htlatex to HTML targets, even though we don't call it.
If the files it ships with aren't present, we can't build HTML.
If the files it ships with aren't present, we can't build HTML.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Mon Mar 26 23:57:58 2007 -0700 (2007-03-26) |
parents | 1e013fbe35f7 |
children | 7b812c428074 |
rev | line source |
---|---|
bos@37 | 1 % Bug ID. |
bos@38 | 2 \newcommand{\bug}[1]{\index{Mercurial bug |
bos@38 | 3 database!\href{http://www.selenic.com/mercurial/bts/issue#1}{bug |
bos@38 | 4 ~#1}}\href{http://www.selenic.com/mercurial/bts/issue#1}{Mercurial |
bos@38 | 5 bug no.~#1}} |
bos@37 | 6 |
bos@37 | 7 % File name in the user's home directory. |
bos@4 | 8 \newcommand{\tildefile}[1]{\texttt{\~{}/#1}} |
bos@37 | 9 |
bos@37 | 10 % File name. |
bos@2 | 11 \newcommand{\filename}[1]{\texttt{#1}} |
bos@37 | 12 |
bos@37 | 13 % Directory name. |
bos@16 | 14 \newcommand{\dirname}[1]{\texttt{#1}} |
bos@37 | 15 |
bos@37 | 16 % File name, with index entry. |
bos@37 | 17 % The ``s'' prefix comes from ``special''. |
bos@16 | 18 \newcommand{\sfilename}[1]{\index{\texttt{#1} file}\texttt{#1}} |
bos@37 | 19 |
bos@37 | 20 % Directory name, with index entry. |
bos@16 | 21 \newcommand{\sdirname}[1]{\index{\texttt{#1} directory}\texttt{#1}} |
bos@37 | 22 |
bos@37 | 23 % Mercurial extension. |
bos@16 | 24 \newcommand{\hgext}[1]{\index{\texttt{#1} extension}\texttt{#1}} |
bos@37 | 25 |
bos@37 | 26 % Mercurial command. |
bos@16 | 27 \newcommand{\hgcmd}[1]{\index{\texttt{#1} command}``\texttt{hg #1}''} |
bos@37 | 28 |
bos@37 | 29 % Mercurial command, with arguments. |
bos@37 | 30 \newcommand{\hgcmdargs}[2]{\index{\texttt{#1} command}``\texttt{hg #1 #2}''} |
bos@37 | 31 |
bos@80 | 32 \newcommand{\tplkword}[1]{\index{\texttt{#1} template keyword}\index{template keywords!\texttt{#1}}\texttt{#1}} |
bos@80 | 33 |
bos@80 | 34 \newcommand{\tplkwfilt}[2]{\index{\texttt{#1} template keyword!\texttt{#2} |
bos@80 | 35 filter}\index{template filters!\texttt{#2}}\index{\texttt{#2} |
bos@80 | 36 template filter}\texttt{#2}} |
bos@80 | 37 |
bos@80 | 38 \newcommand{\tplfilter}[1]{\index{template |
bos@80 | 39 filters!\texttt{#1}}\index{\texttt{#1} template |
bos@80 | 40 filter}\texttt{#1}} |
bos@80 | 41 |
bos@37 | 42 % Shell/system command. |
bos@16 | 43 \newcommand{\command}[1]{\index{\texttt{#1} command}\texttt{#1}} |
bos@37 | 44 |
bos@37 | 45 % Shell/system command, with arguments. |
bos@26 | 46 \newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''} |
bos@37 | 47 |
bos@37 | 48 % Mercurial command option. |
bos@17 | 49 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}} |
bos@37 | 50 |
bos@37 | 51 % Mercurial global option. |
bos@37 | 52 \newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}} |
bos@37 | 53 |
bos@37 | 54 % Shell/system command option. |
bos@19 | 55 \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}} |
bos@37 | 56 |
bos@37 | 57 % Command option. |
bos@27 | 58 \newcommand{\option}[1]{\texttt{#1}} |
bos@37 | 59 |
bos@37 | 60 % Software package. |
bos@16 | 61 \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}} |
bos@37 | 62 |
bos@37 | 63 % Section name from a hgrc file. |
bos@34 | 64 \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}} |
bos@37 | 65 |
bos@37 | 66 % Named item in a hgrc file section. |
bos@34 | 67 \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1} |
bos@62 | 68 section!\texttt{#2} entry}\texttt{#2}} |
bos@37 | 69 |
bos@37 | 70 % hgrc file. |
bos@34 | 71 \newcommand{\hgrc}{\index{\texttt{hgrc} file}\texttt{hgrc}} |
bos@37 | 72 |
bos@37 | 73 % Hook name. |
bos@34 | 74 \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}} |
bos@37 | 75 |
bos@37 | 76 % Environment variable. |
bos@34 | 77 \newcommand{\envar}[1]{\index{\texttt{#1} environment |
bos@34 | 78 variable}\index{environment variables!\texttt{#1}}\texttt{#1}} |
bos@0 | 79 |
bos@37 | 80 % Python module. |
bos@37 | 81 \newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}} |
bos@37 | 82 |
bos@37 | 83 % Python class in a module. |
bos@37 | 84 \newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2} |
bos@37 | 85 class}\texttt{#1.#2}} |
bos@37 | 86 |
bos@62 | 87 % Python function in a module. |
bos@62 | 88 \newcommand{\pymodfunc}[2]{\index{\texttt{#1} module!\texttt{#2} |
bos@62 | 89 function}\texttt{#1.#2}} |
bos@62 | 90 |
bos@37 | 91 % Note: blah blah. |
bos@7 | 92 \newsavebox{\notebox} |
bos@11 | 93 \newenvironment{note}% |
bos@11 | 94 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}% |
bos@11 | 95 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}} |
jeffpc@56 | 96 \newenvironment{caution}% |
jeffpc@56 | 97 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Caution:}\space}% |
jeffpc@56 | 98 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}} |
bos@7 | 99 |
bos@37 | 100 % Code sample, eating 4 characters of leading space. |
bos@4 | 101 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}} |
bos@37 | 102 |
bos@37 | 103 % Code sample, eating 2 characters of leading space. |
bos@37 | 104 \DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}} |
bos@37 | 105 |
bos@37 | 106 % Interaction from the examples directory. |
bos@146 | 107 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.lxo}} |
bos@106 | 108 % Example code from the examples directory. |
bos@106 | 109 \newcommand{\excode}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{../examples/#1}} |
bos@106 | 110 |
bos@37 | 111 % Graphics inclusion. |
bos@11 | 112 \ifpdf |
bos@103 | 113 \newcommand{\grafix}[1]{\includegraphics{#1}} |
bos@11 | 114 \else |
bos@11 | 115 \newcommand{\grafix}[1]{\includegraphics{#1.png}} |
bos@11 | 116 \fi |
bos@11 | 117 |
bos@132 | 118 % Reference entry for a command. |
bos@133 | 119 \newcommand{\cmdref}[2]{\section{\hgcmd{#1}---#2}\label{cmdref:#1}\index{\texttt{#1} command}} |
bos@132 | 120 |
bos@133 | 121 % Reference entry for a command option with long and short forms. |
bos@133 | 122 \newcommand{\optref}[3]{\subsubsection{\hgopt{#1}{--#3}, also \hgopt{#1}{-#2}}} |
bos@133 | 123 |
bos@133 | 124 % Reference entry for a command option with only long form. |
bos@133 | 125 \newcommand{\loptref}[2]{\subsubsection{\hgopt{#1}{--#2} option}} |
bos@132 | 126 |
bos@0 | 127 %%% Local Variables: |
bos@0 | 128 %%% mode: latex |
bos@0 | 129 %%% TeX-master: "00book" |
bos@0 | 130 %%% End: |