From b916a7b95087adae57632384418bb641e541e98c Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Thu, 18 Dec 2008 23:24:00 +0000 Subject: [PATCH] Enable \cancel and \cancelto in texvc This works on Hardy, but may break all math support in the event that some platform doesn't have support for \cancel. I don't know much OCaml or LaTeX, so I'm not sure how to make it import the package only if it exists or something similarly useful. If this gets reverted, though, at least I'll have committed it and won't have to keep the diff in git stash forever. :) Clearly this requires a texvc recompile in any event. --- RELEASE-NOTES | 1 + math/texutil.ml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bc5c640bc7..edb8d8c87a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -235,6 +235,7 @@ The following extensions are migrated into MediaWiki 1.14: * Add a 'change block' link to Special:IPBlockList and Special:Log * (bug 16459) Use native getElementsByClassName where possible, for better performance in modern browsers +* Enable \cancel and \cancelto in texvc (recompile required) === Bug fixes in 1.14 === diff --git a/math/texutil.ml b/math/texutil.ml index e26ecba8d1..7355bd645f 100644 --- a/math/texutil.ml +++ b/math/texutil.ml @@ -57,7 +57,7 @@ let get_preface () = "\\nonstopmode\n\\documentclass[12pt]{article}\n" ^ (if !modules_nonascii then get_encoding !modules_encoding else "") ^ (if !modules_ams then "\\usepackage{amsmath}\n\\usepackage{amsfonts}\n\\usepackage{amssymb}\n" else "") ^ (if !modules_color then "\\usepackage[dvips,usenames]{color}\n" else "") ^ - "\\pagestyle{empty}\n\\begin{document}\n$$\n" + "\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n$$\n" let get_footer () = "\n$$\n\\end{document}\n" let set_encoding = function @@ -507,6 +507,8 @@ let find = function | "\\cfrac" -> (tex_use_ams (); FUN_AR2h ("\\cfrac ", fun num den -> Html.html_render [num], "
", Html.html_render [den])) | "\\over" -> FUN_INFIXh ("\\over ", fun num den -> Html.html_render num, "
", Html.html_render den) | "\\sqrt" -> FUN_AR1 "\\sqrt " + | "\\cancel" -> FUN_AR1 "\\cancel " + | "\\cancelto" -> FUN_AR2 "\\cancelto " | "\\pmod" -> FUN_AR1hl ("\\pmod ", ("(mod ", ")")) | "\\bmod" -> FUN_AR1hl ("\\bmod ", ("mod ", "")) | "\\emph" -> FUN_AR1 "\\emph " -- 2.20.1