mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-17 08:48:39 +00:00
Improve \cancel (#1398)
* Fix \cancel Fixes #1080. Improve `\cancel` in three ways: 1. Better lateral spacing. 2. Steeper `\cancel` lines on single characters. 3. Treat height and depth to match the `cancel` package behavior, not its documentation. * Update screenshots
This commit is contained in:
@@ -538,15 +538,10 @@
|
||||
.cancel-pad {
|
||||
padding: 0 0.2em 0 0.2em; // ref: cancel package \advance\dimen@ 2\p@ % "+2"
|
||||
}
|
||||
.mord + .cancel-lap,
|
||||
.mbin + .cancel-lap {
|
||||
margin-left: -0.2em;
|
||||
}
|
||||
.cancel-lap + .mord,
|
||||
.cancel-lap + .mbin,
|
||||
.cancel-lap + .msupsub {
|
||||
margin-left: -0.2em;
|
||||
}
|
||||
.cancel-lap {
|
||||
margin-left: -0.2em; // \cancel does not affect horizontal spacing.
|
||||
margin-right: -0.2em; // Apply negative margin to correct for 0.2em padding
|
||||
} // inside the \cancel group.
|
||||
.sout {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 0.08em;
|
||||
|
Reference in New Issue
Block a user