Questions tagged [cancel]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer
38 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 &...
user avatar
  • 121
1 vote
1 answer
39 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 ...
user avatar
  • 1,177
2 votes
2 answers
93 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}{\...
user avatar
  • 33
2 votes
1 answer
25 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}...
user avatar
2 votes
2 answers
154 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 ...
user avatar
  • 2,262
-1 votes
2 answers
207 views

How I can use cancel package? [closed]

\dfrac{\cancel{4} \times \cancel{5} \times \cancel{3}}{\cancel{2} \times \cancel{10}}
user avatar
4 votes
1 answer
116 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 ...
user avatar
3 votes
1 answer
60 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 ...
user avatar
5 votes
1 answer
377 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.
user avatar
  • 95
3 votes
1 answer
98 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} ...
user avatar
1 vote
1 answer
97 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:...
user avatar
  • 13
1 vote
0 answers
105 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$$ ...
user avatar
  • 203
9 votes
2 answers
660 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 ...
user avatar
  • 645
2 votes
1 answer
189 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 ...
user avatar
  • 275
3 votes
2 answers
611 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
user avatar
  • 690
0 votes
1 answer
226 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$ ...
user avatar
0 votes
1 answer
80 views

How to cancel powered number?

How to get the result circled in red? I tried 3^\cancel{4} but it doesn't work.
user avatar
3 votes
1 answer
262 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 ...
user avatar
  • 1,285
1 vote
1 answer
453 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-...
user avatar
5 votes
2 answers
233 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".
user avatar
  • 51
2 votes
1 answer
311 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{...
user avatar
0 votes
0 answers
50 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{...
user avatar
0 votes
1 answer
1k 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> <...
user avatar
2 votes
1 answer
125 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 ...
user avatar
2 votes
1 answer
365 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 \...
user avatar
5 votes
1 answer
3k 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 ...
user avatar
  • 2,949
2 votes
2 answers
250 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 ...
user avatar
  • 53
3 votes
1 answer
566 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}{&...
user avatar
  • 213
1 vote
1 answer
716 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{...
user avatar
2 votes
1 answer
110 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} % ...
user avatar
4 votes
1 answer
3k 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$$ \...
user avatar
  • 1,213
1 vote
2 answers
385 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 ...
user avatar
  • 415
3 votes
1 answer
400 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 ...
user avatar
  • 105
2 votes
1 answer
1k 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 ...
user avatar
  • 23
0 votes
1 answer
409 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 ...
user avatar
  • 1,479
4 votes
1 answer
553 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. ...
user avatar
0 votes
0 answers
112 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 ...
user avatar
  • 238
6 votes
1 answer
1k 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 ...
user avatar
  • 409
3 votes
1 answer
771 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. $...
user avatar
  • 179
4 votes
2 answers
733 views

How to cross-out a number several times?

Hello. I want to be able to cross out a number several times (just like in the picture!) at least 3 times. How do i do that? And how do i make a circle around a number?
user avatar
  • 43
10 votes
1 answer
181 views

Active ! Character Hangs within TikZ

The MWE below makes the ! active in math mode using the solution from Make Characters Active via Macro in Math Mode and uses the tikz \hcancel via Diagonal strikeout starting too low and ending too ...
user avatar
2 votes
1 answer
748 views

Cancel out factorial fractions

I have the following fraction: How can I use a line and cross off the 3, 2, and 1s in the numerator and denominator? I need a line crossing off the 3s in the numerator and denominator - one line. ...
user avatar
  • 240
6 votes
1 answer
324 views

How do I strike through the first text on a line using the cancel module?

I'm new to latex so please be gentle. I installed cancel using this command: tlmgr install cancel Then I created a test file called test.tex with the following content: \documentclass[12pt]{...
user avatar
  • 195
4 votes
1 answer
2k views

cancel package: combine bcancel and cancelto (bcancelto?)

Is there a way to create a negative slope with the cancel package, but using \cancelto? i.e. I would like to combine the two commands so that I have a negative slope but with an arrow and number. ...
user avatar
  • 550
3 votes
1 answer
257 views

cancel line through a tikz picture in the background

I have defined a command \kr to draw a small circle to use it as a letter. Later I want to cancel out a circle. But the cancel line is in the background, see picture. How can I make the cancel line be ...
user avatar
  • 573
4 votes
2 answers
1k views

Equation overlapping with body text

In the MWE below, my equation is clashing with the text of the body of the document and also the header. How can I get the equation to not clash/overlap with the document text? Here is my code: \...
user avatar
  • 8,674
4 votes
1 answer
2k views

Make "cancel line" thicker

In the MWE below, I wanted: to make the cancel line with arrow slightly thicker and have the arrow end before the vertical }. Here is my code: \documentclass{article} \usepackage{amsmath} \...
user avatar
  • 8,674
1 vote
1 answer
395 views

Packages siunitx and cancel not working together [closed]

So I tried to use the MWE in the answer to this question. However my output looks identical to the original post's problem. I checked using \listfiles and my version of siunitx has cancel support. ...
user avatar
  • 356
4 votes
2 answers
342 views

Cancel a superscript so that the cancel is not as large

I would like to have a "not asterisk" symbol. I try to do such a feature with the cancel package. My current favourite is: A^{\xcancel{\ast}} But the cancel sign goes down very far. I would like to ...
user avatar
  • 1,209
1 vote
1 answer
201 views

How to write like that picture [duplicate]

I have a problem in latex. I can't write like that picture. how to write like that. Please.
user avatar