summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/cancel/cancel.tex
blob: 11dfe3b8c49896733b595706ae5f8ed8ba2cb411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
\documentclass[pagesize=auto]{scrartcl}

\usepackage{fixltx2e}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{booktabs}
\usepackage{microtype}
\usepackage{hyperref}

\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
\newcommand*{\cmd}[1]{\texttt{\string#1}}

\addtokomafont{title}{\rmfamily}

\title{The \textsf{cancel} package\thanks{This manual corresponds to \textsf{cancel}~v2.1, dated~12--Mar--2000.}}
\author{Donald Arseneau\\\href{mailto:asnd@triumf.ca}{\texttt{asnd@triumf.ca}}}
\date{12--Mar--2000}
\publishers{I contribute this software to the public domain.  No rights reserved.}


\begin{document}

\maketitle

\section{Commands:}



\begin{labeling}{\cmd{\cancelto}\marg{value}\marg{expression}}
\item[\cmd{\cancel}] draws a diagonal line (slash) through its argument.
\item[\cmd{\bcancel}] uses the negative slope (a backslash).
\item[\cmd{\xcancel}] draws an X (actually \cmd{\cancel} plus \cmd{\bcancel}).
\item[\cmd{\cancelto}\marg{value}\marg{expression}] draws a diagonal arrow through the \meta{expression}, pointing to the \meta{value}.
\end{labeling}
%
The first three work in math and text mode, but \cmd{\cancelto} is only
for math mode.
The slope of the line or arrow depends on what is being cancelled.  


\section{Options:}

Bt default, none of these commands affects the horizontal spacing, 
so they might over-print neighboring parts of the formula (or text).
They do add their height to the expression, so there should never be 
unintended vertical overlap.  There is a package option \texttt{[makeroom]} to 
increase the horizontal spacing to make room for the cancellation value.  

If you use the color package, then you can declare
%
\begin{verbatim}
  \renewcommand{\CancelColor}{<color_command>}
\end{verbatim}
%
and the cancellation marks will be printed in that color (e.\,g., \cmd{\blue}).
However, if you are using color, I recommend lightly shaded blocks rather
than diagonal arrows for cancelling.

The option \texttt{[thicklines]} asks for heavier lines and arrows. This may be
useful when the lines are colored a light shade.

\begin{samepage}
  The size (math style) of the \cmd{\cancelto} value depends on package options 
  according to this table:
  % 
  \begin{center}
    \small
    \begin{tabular}{@{}llll@{}}
      \toprule
      \textbf{Current style}   & \textbf{\texttt{[samesize]}} & \textbf{\texttt{[smaller]}} & \textbf{\texttt{[Smaller]}} \\
      \midrule
      \cmd{\displaystyle}      & \cmd{\displaystyle}          & \cmd{\textstyle}            & \cmd{\scriptstyle}          \\
      \cmd{\textstyle}         & \cmd{\textstyle}             & \cmd{\scriptstyle}          & \cmd{\scriptstyle}          \\
      \cmd{\scriptstyle}       & \cmd{\scriptstyle}           & \cmd{\scriptscriptstyle}    & \cmd{\scriptscriptstyle}    \\
      \cmd{\scriptscriptstyle} & \cmd{\scriptscriptstyle}     & \cmd{\scriptscriptstyle}    & \cmd{\scriptscriptstyle}    \\
      \bottomrule
    \end{tabular}
  \end{center}
  % 
  (``\texttt{smaller}'' is the default behavior.  It gives textstyle limits in 
  displaystyle, whereas ``\texttt{Smaller}'' gives scriptstyle limits.)
\end{samepage}

This package is provided without guarantees or support.  Drawing slashes
through math to indicate ``cancellation'' is poor design.  I don't recommend
that you use this package at all.

\end{document}