Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

strikethrough within equation in jupyter markdown

is it possible to strike-through part of an latex equation when using jupyter notebook’s markdown? example:

enter image description here

strike-through the denominator (11-4)! numerator 7!. I’ve tried using ~~(11-4)!~~ and ~(11-4)!~ which both work on their own but when use them within latex $\frac{11!}{(11-4)!4!}\frac{7!}{(7-4)!4!}$ neither work.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

if it matters, I’m running in on Ubuntu.
kindly advise

@osbm this is my output with the code suggest;
enter image description here

>Solution :

To be able to use the MathJax cancel
extension
you have to add it at the beginning of your markdown cell, like so.

$$\require{cancel}$$  

$\frac{11!}{\cancel{(11-4)!}4!}\frac{\cancel{7!}}{(7!-4!)4!}$

It provides similar results to the LaTeX cancel package.

If you want more flexibility, use the MathJax enclose extension

$$\require{enclose}$$

$\frac{11!}{\enclose{horizontalstrike}{(11-4)!}4!}\frac{\enclose{horizontalstrike}{7!}}{(7!-4!)4!}$

$\frac{11!}{\enclose{verticalstrike}{(11-4)!}4!}\frac{\enclose{verticalstrike}{7!}}{(7!-4!)4!}$

$\frac{11!}{\enclose{updiagonalstrike}{(11-4)!}4!}\frac{\enclose{updiagonalstrike}{7!}}{(7!-4!)4!}$ this is similar to `\cancel`

$\frac{11!}{\enclose{downdiagonalstrike}{(11-4)!}4!}\frac{\enclose{downdiagonalstrike}{7!}}{(7!-4!)4!}$

$\frac{11!}{\enclose{updiagonalstrike, downdiagonalstrike}{(11-4)!}4!}\frac{\enclose{updiagonalstrike, downdiagonalstrike}{7!}}{(7!-4!)4!}$

The results are:
enter image description here

In this stackexchange post you find all the info you need.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading