\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.2, dated~12--Apr--2013.}}
\author{Donald Arseneau\\\href{mailto:asnd@triumf.ca}{\texttt{asnd@triumf.ca}}}
\date{12--Apr--2013}
\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:}

By 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}
