mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-24 07:34:22 +00:00
* (bug 27754) Archaic Greek letters for math
May require texlive-lang-greek package to be installed; but it's only loaded when these bits are used. Reapplied r87298 plus parser test case to confirm the new chars can render and the existing \digamma hasn't changed.
This commit is contained in:
parent
dd490761b5
commit
8d495dcc32
|
@ -45,18 +45,21 @@ let modules_ams = ref false
|
|||
let modules_nonascii = ref false
|
||||
let modules_encoding = ref UTF8
|
||||
let modules_color = ref false
|
||||
let modules_teubner = ref false
|
||||
let modules_euro = ref false
|
||||
|
||||
(* wrappers to easily set / reset module properties *)
|
||||
let tex_use_ams () = modules_ams := true
|
||||
let tex_use_nonascii () = modules_nonascii := true
|
||||
let tex_use_color () = modules_color := true
|
||||
let tex_use_teubner () = modules_teubner := true
|
||||
let tex_use_euro () = modules_euro := true
|
||||
let tex_mod_reset () = (
|
||||
modules_ams := false;
|
||||
modules_nonascii := false;
|
||||
modules_encoding := UTF8;
|
||||
modules_color := false;
|
||||
modules_teubner := false;
|
||||
modules_euro := false;
|
||||
)
|
||||
|
||||
|
@ -71,6 +74,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 "") ^
|
||||
(if !modules_teubner then "\\usepackage[greek]{babel}\n\\usepackage{teubner}\n" else "") ^
|
||||
(if !modules_euro then "\\usepackage{eurosym}\n" else "") ^
|
||||
"\\usepackage{cancel}\n\\pagestyle{empty}\n\\begin{document}\n$$\n"
|
||||
|
||||
|
@ -428,6 +432,17 @@ let find = function
|
|||
| "\\geneuronarrow" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\geneuronarrow}"))
|
||||
| "\\geneurowide" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\geneurowide}"))
|
||||
| "\\officialeuro" -> (tex_use_euro (); LITERAL (TEX_ONLY "\\mbox{\\officialeuro}"))
|
||||
| "\\Coppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Coppa}", "Ϙ")))
|
||||
| "\\coppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\coppa}", "ϙ")))
|
||||
| "\\varcoppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\coppa}", "ϙ")))
|
||||
| "\\Digamma" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Digamma}", "Ϝ")))
|
||||
| "\\Koppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\Koppa}", "Ϙ")))
|
||||
| "\\koppa" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\koppa}", "ϟ")))
|
||||
| "\\Sampi" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\Sampi}"))
|
||||
| "\\sampi" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\sampi}", "ϡ")))
|
||||
| "\\Stigma" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\Stigma}"))
|
||||
| "\\stigma" -> (tex_use_teubner (); LITERAL (HTMLABLE (FONT_UF, "\\mbox{\\stigma}", "ϛ")))
|
||||
| "\\varstigma" -> (tex_use_teubner (); LITERAL (TEX_ONLY "\\mbox{\\varstigma}"))
|
||||
| "\\implies" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\implies ", "⇒")))
|
||||
| "\\mod" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UFH,"\\mod ", "mod")))
|
||||
| "\\Diamond" -> (tex_use_ams (); LITERAL (HTMLABLE (FONT_UF, "\\Diamond ", "◊")))
|
||||
|
|
|
@ -66,3 +66,22 @@ BUG 27324: Euro symbol for math
|
|||
<img class="tex" alt="\officialeuro" src="/images/math/d/7/0/d708de0eed23dbd6f02b99ea9073547b.png" />
|
||||
</p>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
BUG 27754: Archaic Greek letters for math (may require texlive-lang-greek)
|
||||
!! input
|
||||
<math>\digamma</math><!-- Lowercase digamma was already available -->
|
||||
<math>\Coppa\coppa\varcoppa</math>
|
||||
<math>\Digamma</math>
|
||||
<math>\Koppa\koppa</math>
|
||||
<math>\Sampi\sampi</math>
|
||||
<math>\Stigma\stigma\varstigma</math>
|
||||
!! result
|
||||
<p><img class="tex" alt="\digamma" src="/images/math/2/f/0/2f057b6e514c8ca2d9cf9a3e549f8865.png" />
|
||||
<img class="tex" alt="\Coppa\coppa\varcoppa" src="/images/math/8/3/0/8308ee5003aa36112414cad8ef874f85.png" />
|
||||
<img class="tex" alt="\Digamma" src="/images/math/5/c/f/5cfd6e5df6c87798542dca2e22c1e7cb.png" />
|
||||
<img class="tex" alt="\Koppa\koppa" src="/images/math/5/2/5/52593a0cdac178d165985ac014788b97.png" />
|
||||
<img class="tex" alt="\Sampi\sampi" src="/images/math/e/9/d/e9dabb19e4c27bf23d3c2a3629474562.png" />
|
||||
<img class="tex" alt="\Stigma\stigma\varstigma" src="/images/math/7/b/9/7b9233276816994a33a5e968202cef6e.png" />
|
||||
</p>
|
||||
!! end
|
||||
|
|
Loading…
Reference in a new issue