Skip to content

Commit 970e52c

Browse files
authored
Revert adding cancel package to default environment. (#272)
1 parent 76c6d83 commit 970e52c

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/Text/TeXMath/Types.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,6 @@ data Position = Under | Over
156156
-- | List of available packages
157157
type Env = [T.Text]
158158

159-
-- | Contains @amsmath@, @amssymbol@, and @cancel@
159+
-- | Contains @amsmath@ and @amssymbol@
160160
defaultEnv :: [T.Text]
161-
defaultEnv = ["amsmath", "amssymb", "cancel"]
161+
defaultEnv = ["amsmath", "amssymb"]

src/Text/TeXMath/Writers/TeX.hs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,11 @@ writeExp (EBoxed e) = do
263263
tellGroup (writeExp e)
264264
else writeExp e
265265
writeExp (ECancel st e) = do
266-
env <- asks mathEnv
267-
if "cancel" `elem` env
268-
then do
269-
case st of
270-
ForwardSlash -> tell [ControlSeq "\\cancel"]
271-
BackSlash -> tell [ControlSeq "\\bcancel"]
272-
XSlash -> tell [ControlSeq "\\xcancel"]
273-
tellGroup (writeExp e)
274-
else writeExp e
266+
case st of
267+
ForwardSlash -> tell [ControlSeq "\\cancel"]
268+
BackSlash -> tell [ControlSeq "\\bcancel"]
269+
XSlash -> tell [ControlSeq "\\xcancel"]
270+
tellGroup (writeExp e)
275271
writeExp (EScaled size e)
276272
| case e of
277273
(ESymbol Open _) -> True

0 commit comments

Comments
 (0)