Questions tagged [cancel]

The cancel package is used to draw diagonal lines through words and symbols.

Filter by
Sorted by
Tagged with
3 votes
2 answers
150 views

Strikethrough text and formula in LaTeX

I would like to strikethrough a combination of text and formula in LaTeX (to get the output in Image 1) and also strike out an aligned/multiline equation (like the output in Image 2). I would ...
Vahid's user avatar
  • 109
7 votes
3 answers
469 views

The cancel package doesn't work sometimes in Hebrew

I use babel to write documents in Hebrew, and I use the cancel package to draw lines on terms in an equation for cancelation. Until now, this has been working fine. Recently, I tried to cancel a term, ...
Shai Avr's user avatar
  • 685
4 votes
2 answers
402 views

Cancel math with underbrace but ignore extra height

I regularly use the cancel package to cancel out terms in mathematical expressions, but sometimes those terms contain underbraces. Take the following (contrived) example: \[abc + \cancel{d \underbrace{...
bonk's user avatar
  • 887
1 vote
1 answer
61 views

Cancel more than one unit with siunitx and cancel

Please see the behavior in these different examples. There's clearly something about \text command in the SIUnit qty doing something that I don't understand. But I'm using this all over my work, so ...
J M's user avatar
  • 1,102
3 votes
1 answer
114 views

Cancel circled text under circledsteps?

Given the following MWE: \documentclass{article} \usepackage{circledsteps} \usepackage{cancel} \begin{document} \(\odot, \cancel\odot\) \(\Circled{1}, \cancel\Circled{1}\) \end{document} How may ...
Frode Alfson Bjørdal's user avatar
4 votes
2 answers
1k views

How to draw a horizontal line on a word in LaTeX

I want to draw a horizontal line on a word in LaTeX. I've tried \cancel but it draws a diagonal line. I checked the \cancel documentation and couldn't find anything about drawing a horizontal line.
negar pourmoazemi's user avatar
2 votes
2 answers
81 views

cancelto goes outside of the brackets

Here is a simple equation: \begin{equation} \delta\psi=c\left(\int a\delta b dR+\cancelto{O^2(a)}{\int b\delta a dR} \right) \end{equation} and the cancelto part goes ouside of the right bracket. ...
yangyang's user avatar
  • 199
2 votes
1 answer
43 views

\amsmath \align \display Please identify log errors

The mwe code below compiles and produces the desired layout. However, the log shows 3 errors which I can't find after going through the code several times. Your assistance identifying the source of ...
Siuslaw Math's user avatar
0 votes
2 answers
169 views

How to type cancel to with a line not an arrow

I want to use cancel to but with just a line instead of an arrow
Mahmoud Tabasi's user avatar
0 votes
2 answers
85 views

RStudio not exporting while TeXworks does

Problem Overview I want to use the cancel-package for my R-Markdown-file project.rmd. For that, I created a preamble.tex-file with following content: \usepackage{amsmath} \usepackage[makeroom]{cancel} ...
Taxifahrer's user avatar
1 vote
0 answers
48 views

Siunitx and Cancel packages : bad alignment

Cancel package disturbs Sunitx tabular alignment : \documentclass{article} \usepackage{siunitx,cancel} \begin{document} \begin{tabular}{S[table-format=3]|S[table-format=4]} \cancel{14} & \cancel{...
Tarass's user avatar
  • 16.9k
2 votes
0 answers
91 views

Cross out a multiline expression inside an align* environment

I'd like to cross out a subsection of an aligned environment, as below (the actual content doesn't matter). \documentclass{article} \usepackage{amsmath,cancel} \begin{document} \begin{align*} 4h + b &...
Exr0n's user avatar
  • 121
1 vote
1 answer
169 views

Uniformly oriented cancelling lines across math or texts

How do I cross out maths to show they vanish with evenly oriented diagonal lines (i.e., all lines parallel?) I don't like how the crossing lines appear due to size of the expressions. It doesn't ...
SolidMark's user avatar
  • 1,389
2 votes
2 answers
717 views

How show rational simplification?

I need to show the path to simplify fractions, i.e., through their common divisors, so that show the first simplifications. For example: 18/6 I'd want to show some like this: \frac{\cancel{18}^9}{\...
Darío's user avatar
  • 111
2 votes
1 answer
96 views

Formatting is off with cancel to package

I am trying to use the cancel package when showing a term is zero and therefore can be discounted. Here is a MWE: \documentclass{article} \usepackage{cancel} \begin{document} $\Gamma_{yy}^x = \frac{1}...
Harry Spratt's user avatar
2 votes
2 answers
176 views

How to cancel the prefixes only?

See my MWE: \documentclass{scrartcl} \usepackage{siunitx, cancel} \begin{document} Test $\qty{1}{\cancel\mega\W}\cdot\SI{1}{\cancel\micro\ohm}$ test. \end{document} It is possible ...
Su-47's user avatar
  • 2,478
0 votes
2 answers
780 views

How I can use cancel package? [closed]

\dfrac{\cancel{4} \times \cancel{5} \times \cancel{3}}{\cancel{2} \times \cancel{10}}
bayaraa surenjav's user avatar
4 votes
1 answer
152 views

How could I typeset this? (Horizontal and aligned cancelling)

Let's say I have a reducible fraction, like 77/33, and I want to show its reduction. I'd like to create something similar to cancel's \cancelto, in that it overlaps the superseded digit, but ...
schuelermine's user avatar
3 votes
1 answer
106 views

Selective coloration of polynomial parts of rational expressions

I'm teaching high school students how to simplify rational expressions by cancelling factors. The cancelled expressions should be colored red (incl. L /R parenthesis), but not the fraction bar. The ...
Siuslaw Math's user avatar
5 votes
1 answer
456 views

How can I write one number vertically above another?

I wonder if you can help me in how to place one number on top of another (vertically) just as I show in the following image. I appreciate too much any help.
Kami's user avatar
  • 95
3 votes
1 answer
273 views

Cancel command spans multiple lines of equations

I am trying to cancel out an equation term that is simply too long, and the cancelling arrow overlaps the equations above and below what I want to cancel: Minimal code: \documentclass[8pt]{extarticle} ...
morphicphicus's user avatar
1 vote
1 answer
174 views

\cancel or \bcancel draws non-parallel lines in math mode; looking for better solutions

I have very similar lines in math mode under a \align environment. When I use \cancel or \bcancel it doesn't draw parallel lines for what should be similar width terms. I think a simple repro would be:...
hax0r's user avatar
  • 13
1 vote
0 answers
244 views

Is it possible to use \cancel without imports? [closed]

I was writing a response to someone for a math class of mine in Piazza (a sort of chat forum for classes) when I tried to use $$\usepackage{cancel}\cancel{x}$$ when I realized that $$\usepackage$$ ...
John D's user avatar
  • 213
9 votes
2 answers
862 views

How to cancel the root but not the expression inside it?

I wanted to cancel the root of an expression like this \documentclass{article} \usepackage{cancel} \begin{document} \[\cancel{\sqrt{\left(a+b+c+d+f+g+h+e\right)^{\cancel{2}}}}\] \end{document} I'm ...
Concept7's user avatar
  • 645
2 votes
1 answer
332 views

`cancelto` : choppy arrow problem

I am using the package cancel to do the operation as shown in figure. As you can see the arrow is choppy. I read another question mentioning the same error : here. As suggested in the accepted ...
Nitin's user avatar
  • 295
4 votes
2 answers
4k views

How do cross out text in math mode?

Since \sout does not work in math mode, what can I use instead? I don't want the diagonal strikeout like with cancelf
Hao S's user avatar
  • 858
0 votes
1 answer
411 views

Using "cancel" package in pandoc

I'm trying to convert a .md file that contains the "\cancel" control sequence, but pandoc throws error due to the package "cancel" not being included. example: file.md $\cancel{X+2}-\cancel{X+2}=c$ ...
giuliano-macedo's user avatar
0 votes
1 answer
266 views

How to cancel powered number?

How to get the result circled in red? I tried 3^\cancel{4} but it doesn't work.
Simeon Simeonov's user avatar
3 votes
1 answer
976 views

Cancel package enhancement

How difficult is it to enhance (=copy the code of the package in my project and adapt it) the Cancel package, Cancel package, with a command \cancelno{〈label〉}{〈expression〉} such that a slash is put ...
PeptideChain's user avatar
  • 1,335
1 vote
1 answer
805 views

Aborting a compilation in Texmaker

Well, I've read this, but doesn't solve the problem for Texmaker, and I'm really clumsy, instantly seeing errors after a tedious long time wrong compilation. As I really don't expect any self-...
juan's user avatar
  • 112
5 votes
2 answers
412 views

Equivalent of cancelto in ConTeXt

Is there any equivalent of \cancelto in ConTeXt? I want to cancel math expression with an arrow as in "goes to zero".
Magda's user avatar
  • 51
2 votes
1 answer
556 views

Error on using "\rl{}" inside "inline math"

I use TeXstudio 2.12.16 and want to write Farsi words in \cancelto{value}{expression}. So I used xepersian package and \rl. What I tried is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{...
hasanghaforian's user avatar
0 votes
0 answers
90 views

Repetition of terms due to \cancel error

I'm writing the following equations \[k_f^\dagger k_f = M_f U_f^\dagger (y_f ^\dagger)^{-1}(y_f)^{-1}U_f M_f = M_f \cancel{U_f^\dagger} \cancel{(U_f^\dagger)^{-1}}(M_f^2)^{-1}\cancel{U_f^{-1}}\cancel{...
edinorog's user avatar
0 votes
1 answer
2k views

How to use $$ in mathjax to be inline? [closed]

I have used the following code to display inline mathjax <script type="text/x-mathjax-config"> MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); </script> <...
Shayaan Mustafa's user avatar
2 votes
1 answer
198 views

Cancel a term using tikzmark package

Recently, @marmot in Need help to create a more flexible \cancel command that works inside an align environment suggested the use of the \tikzmarknode command of the last version (1.6) of the tikzmark ...
Joao Alberto's user avatar
2 votes
1 answer
601 views

Need help to create a more flexible \cancel command that works inside an align environment

Please, consider the snippet below. I would like to cancel out the two middle terms of equation (1) and to cancel to 1 the expression in between the braces in equation (2). If I use \cancel and \...
Joao Alberto's user avatar
5 votes
1 answer
4k views

How to strike through or cancel using different colors in the same line

For example, suppose I had an equation x = 2 + 1 - 2 - 1 (obviously toy example) I want the +2 to cancel out with the -2, +1 to cancel out with the -1 So in Latex I would want something like Is there ...
Fraïssé's user avatar
  • 3,109
2 votes
2 answers
304 views

How to strikeout an flalign block?

I am trying to strikeout an entire flalign block. This post shows how to strikeout an aligned block using the cancel package, but I'm not able to get it to work for the flalign environment. Any ...
Jeff's user avatar
  • 53
3 votes
1 answer
760 views

cancel package documentation, shaded blocks to cancel

I would like to use some kind of colored cancel lines to mark simplifications. The cancel package documentation reads: If you use the color package, then you can declare \renewcommand{\CancelColor}{&...
dietervdf's user avatar
  • 213
1 vote
1 answer
956 views

Conflict between cancel and align

It seems that the cancel package does not behave well as one needs to cross out 'large' amount of text as the bar crosses the next line, and the result clearly seems unacceptable. \documentclass{...
Paul-Benjamin's user avatar
2 votes
1 answer
119 views

Packages cancel and schulschriften_lin not working together?

When I use the "schulschriften_lin"-package, cancellation is no longer working (see MWE). \documentclass{article} \usepackage{amsmath} \usepackage{cancel} \usepackage{schulschriften_lin} % ...
Hermann Gebhard's user avatar
4 votes
1 answer
4k views

Coloring the cancellation line with \cancel

I would like the strike-out line colored grey when using the \cancel command from the cancel package. The code... \documentclass{article} \usepackage{cancel} \begin{document} $$a+\cancel b+c$$ \...
Steeven's user avatar
  • 1,407
1 vote
2 answers
495 views

cancel package and tables

I have a "friend" who needs to do some kind of strikethrough or cancel but for a whole row or column (or both) of a table at a time. It should ideally be something supported by MathJax, so various ...
kcrisman's user avatar
  • 415
3 votes
1 answer
539 views

Line jump using the \xcancel macro in beamer

My question is related to this one : Latex - Beamer: Applies the \cancel command only a specified slides. I tried to apply Loop Space's answer to this question, but I get a line jump when the xcancel ...
pmassat's user avatar
  • 115
4 votes
1 answer
2k views

Unable to get cancel.sty to work

I'm a newbie in using Latex. I use the TexMaths Equations editor within LibreOffice. I installed cancel package in MiKTex Package Manager. I'm not sure where it was installed or whether it was ...
Alex's user avatar
  • 43
0 votes
1 answer
444 views

fun style cross-strike-out

I want to cross out (strike out) words or letters in fun ways for poster-sized text for children. ulem and cancel produce rather formal/sterile-looking cancellations, as do tikz-based combinations of ...
Tim's user avatar
  • 1,539
4 votes
1 answer
745 views

How do I cancel an exponent in an equation using siunitx?

The minimum working example below demonstrates the problem. I have a number of equations formatted like the first one below, where say the numerator has square meters and the denominator has meters. ...
Jack Twilley's user avatar
0 votes
0 answers
144 views

Lualatex compilation problem using cancel and breqn packages [duplicate]

foo.tex \documentclass{article} \usepackage{cancel} \usepackage{breqn} % <= this include is causing troubles \begin{document} \[\cancelto{0}{foo}\] \end{document} compiling produces these ...
t-bltg's user avatar
  • 237
8 votes
1 answer
2k views

multiple colors to cancelto

Is it possible to assign multiple colors to the command "cancelto" of the package cancel? This answer change color cancelto is almost there, but it changed the color for all the environments, at ...
unmark1's user avatar
  • 469
3 votes
1 answer
1k views

\cancel: double strike

Is it possible to generate multiple \cancel stripes? Say for instance I have $f(x,y) = 3x^2 +2xy +4y^2 - 3x^3 - 3x^2 - 2xy + 4xy^3$ and I want to cancel the 3x^2-term once and the 2xy-term twice. $...
Werner's user avatar
  • 179