hgbook

annotate en/99defs.tex @ 48:e8ab09bf5d7d

Force the \grafix macro to use the PDF image

It would seem that the \includegraphics macro is moody and sometimes it
prefers the png over the pdf. This should force it to always use the right
file type.
author Josef "Jeff" Sipek <jeffpc@josefsipek.net>
date Mon Jul 24 15:58:33 2006 -0400 (2006-07-24)
parents b49a7dd4e564
children 18210d46491f
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@37 32 % Shell/system command.
bos@16 33 \newcommand{\command}[1]{\index{\texttt{#1} command}\texttt{#1}}
bos@37 34
bos@37 35 % Shell/system command, with arguments.
bos@26 36 \newcommand{\cmdargs}[2]{\index{\texttt{#1} command}``\texttt{#1 #2}''}
bos@37 37
bos@37 38 % Mercurial command option.
bos@17 39 \newcommand{\hgopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
bos@37 40
bos@37 41 % Mercurial global option.
bos@37 42 \newcommand{\hggopt}[1]{\index{global options!\texttt{#1} option}\texttt{#1}}
bos@37 43
bos@37 44 % Shell/system command option.
bos@19 45 \newcommand{\cmdopt}[2]{\index{\texttt{#1} command!\texttt{#2} option}\texttt{#2}}
bos@37 46
bos@37 47 % Command option.
bos@27 48 \newcommand{\option}[1]{\texttt{#1}}
bos@37 49
bos@37 50 % Software package.
bos@16 51 \newcommand{\package}[1]{\index{\texttt{#1} package}\texttt{#1}}
bos@37 52
bos@37 53 % Section name from a hgrc file.
bos@34 54 \newcommand{\rcsection}[1]{\index{\texttt{hgrc} file!\texttt{#1} section}\texttt{[#1]}}
bos@37 55
bos@37 56 % Named item in a hgrc file section.
bos@34 57 \newcommand{\rcitem}[2]{\index{\texttt{hgrc} file!\texttt{#1}
bos@34 58 section!\texttt{#2} entry}\texttt{#1.#2}}
bos@37 59
bos@37 60 % hgrc file.
bos@34 61 \newcommand{\hgrc}{\index{\texttt{hgrc} file}\texttt{hgrc}}
bos@37 62
bos@37 63 % Hook name.
bos@34 64 \newcommand{\hook}[1]{\index{\texttt{#1} hook}\index{hooks!\texttt{#1}}\texttt{#1}}
bos@37 65
bos@37 66 % Environment variable.
bos@34 67 \newcommand{\envar}[1]{\index{\texttt{#1} environment
bos@34 68 variable}\index{environment variables!\texttt{#1}}\texttt{#1}}
bos@0 69
bos@37 70 % Python module.
bos@37 71 \newcommand{\pymod}[1]{\index{\texttt{#1} module}\texttt{#1}}
bos@37 72
bos@37 73 % Python class in a module.
bos@37 74 \newcommand{\pymodclass}[2]{\index{\texttt{#1} module!\texttt{#2}
bos@37 75 class}\texttt{#1.#2}}
bos@37 76
bos@37 77 % Note: blah blah.
bos@7 78 \newsavebox{\notebox}
bos@11 79 \newenvironment{note}%
bos@11 80 {\begin{lrbox}{\notebox}\begin{minipage}{0.7\textwidth}\textbf{Note:}\space}%
bos@11 81 {\end{minipage}\end{lrbox}\fbox{\usebox{\notebox}}}
bos@7 82
bos@37 83 % Code sample, eating 4 characters of leading space.
bos@4 84 \DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}}
bos@37 85
bos@37 86 % Code sample, eating 2 characters of leading space.
bos@37 87 \DefineVerbatimEnvironment{codesample2}{Verbatim}{frame=single,gobble=2,numbers=left,commandchars=\\\{\}}
bos@37 88
bos@37 89 % Interaction from the examples directory.
bos@4 90 \newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}}
bos@3 91
bos@37 92 % Graphics inclusion.
bos@11 93 \ifpdf
jeffpc@48 94 \newcommand{\grafix}[1]{\includegraphics{#1.pdf}}
bos@11 95 \else
bos@11 96 \newcommand{\grafix}[1]{\includegraphics{#1.png}}
bos@11 97 \fi
bos@11 98
bos@0 99 %%% Local Variables:
bos@0 100 %%% mode: latex
bos@0 101 %%% TeX-master: "00book"
bos@0 102 %%% End: