Debian Codegraph @

texmf-dist/doc/latex/cancel/cancel.tex

raw
1 \documentclass[pagesize=auto]{scrartcl}
2
3 \usepackage{fixltx2e}
4 \usepackage{lmodern}
5 \usepackage[T1]{fontenc}
6 \usepackage{textcomp}
7 \usepackage{booktabs}
8 \usepackage{microtype}
9 \usepackage{hyperref}
10
11 \newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
12 \newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
13 \newcommand*{\cmd}[1]{\texttt{\string#1}}
14
15 \addtokomafont{title}{\rmfamily}
16
17 \title{The \textsf{cancel} package\thanks{This manual corresponds to \textsf{cancel}~v2.2, dated~12--Apr--2013.}}
18 \author{Donald Arseneau\\\href{mailto:[email protected]}{\texttt{[email protected]}}}
19 \date{12--Apr--2013}
20 \publishers{I contribute this software to the public domain. No rights reserved.}
21
22
23 \begin{document}
24
25 \maketitle
26
27 \section{Commands:}
28
29
30
31 \begin{labeling}{\cmd{\cancelto}\marg{value}\marg{expression}}
32 \item[\cmd{\cancel}] draws a diagonal line (slash) through its argument.
33 \item[\cmd{\bcancel}] uses the negative slope (a backslash).
34 \item[\cmd{\xcancel}] draws an X (actually \cmd{\cancel} plus \cmd{\bcancel}).
35 \item[\cmd{\cancelto}\marg{value}\marg{expression}] draws a diagonal arrow through the \meta{expression}, pointing to the \meta{value}.
36 \end{labeling}
37 %
38 The first three work in math and text mode, but \cmd{\cancelto} is only
39 for math mode.
40 The slope of the line or arrow depends on what is being cancelled.
41
42
43 \section{Options:}
44
45 By default, none of these commands affects the horizontal spacing,
46 so they might over-print neighboring parts of the formula (or text).
47 They do add their height to the expression, so there should never be
48 unintended vertical overlap. There is a package option \texttt{[makeroom]} to
49 increase the horizontal spacing to make room for the cancellation value.
50
51 If you use the color package, then you can declare
52 %
53 \begin{verbatim}
54 \renewcommand{\CancelColor}{<color_command>}
55 \end{verbatim}
56 %
57 and the cancellation marks will be printed in that color (e.\,g., \cmd{\blue}).
58 However, if you are using color, I recommend lightly shaded blocks rather
59 than diagonal arrows for cancelling.
60
61 The option \texttt{[thicklines]} asks for heavier lines and arrows. This may be
62 useful when the lines are colored a light shade.
63
64 \begin{samepage}
65 The size (math style) of the \cmd{\cancelto} value depends on package options
66 according to this table:
67 %
68 \begin{center}
69 \small
70 \begin{tabular}{@{}llll@{}}
71 \toprule
72 \textbf{Current style} & \textbf{\texttt{[samesize]}} & \textbf{\texttt{[smaller]}} & \textbf{\texttt{[Smaller]}} \\
73 \midrule
74 \cmd{\displaystyle} & \cmd{\displaystyle} & \cmd{\textstyle} & \cmd{\scriptstyle} \\
75 \cmd{\textstyle} & \cmd{\textstyle} & \cmd{\scriptstyle} & \cmd{\scriptstyle} \\
76 \cmd{\scriptstyle} & \cmd{\scriptstyle} & \cmd{\scriptscriptstyle} & \cmd{\scriptscriptstyle} \\
77 \cmd{\scriptscriptstyle} & \cmd{\scriptscriptstyle} & \cmd{\scriptscriptstyle} & \cmd{\scriptscriptstyle} \\
78 \bottomrule
79 \end{tabular}
80 \end{center}
81 %
82 (``\texttt{smaller}'' is the default behavior. It gives textstyle limits in
83 displaystyle, whereas ``\texttt{Smaller}'' gives scriptstyle limits.)
84 \end{samepage}
85
86 This package is provided without guarantees or support. Drawing slashes
87 through math to indicate ``cancellation'' is poor design. I don't recommend
88 that you use this package at all.
89
90 \end{document}