mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 04:28:41 +00:00
Add \yen support to text mode (#1208)
Fix #1204 by adding `\yen` support to text mode. More generally, I checked all the text+mode symbols supported by [amsfonts](http://mirrors.ctan.org/fonts/amsfonts/doc/amsfonts.pdf) (see Section 6), and found that `\yen` is the only one lacking text-mode support.
This commit is contained in:
committed by
Kevin Barabash
parent
75b55a63b1
commit
0d3cf000d2
@@ -276,6 +276,7 @@ defineSymbol(math, ams, textord, "\u25a1", "\\Box");
|
||||
defineSymbol(math, ams, textord, "\u25ca", "\\Diamond");
|
||||
// unicode-math maps U+A5 to \mathyen. We map to AMS function \yen
|
||||
defineSymbol(math, ams, textord, "\u00a5", "\\yen", true);
|
||||
defineSymbol(text, ams, textord, "\u00a5", "\\yen", true);
|
||||
defineSymbol(math, ams, textord, "\u2713", "\\checkmark", true);
|
||||
defineSymbol(text, ams, textord, "\u2713", "\\checkmark");
|
||||
|
||||
|
@@ -2612,6 +2612,16 @@ describe("The symbol table integrity", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Symbols", function() {
|
||||
it("should support AMS symbols in both text and math mode", function() {
|
||||
// These text+math symbols are from Section 6 of
|
||||
// http://mirrors.ctan.org/fonts/amsfonts/doc/amsfonts.pdf
|
||||
const symbols = "\\yen\\checkmark\\circledR\\maltese";
|
||||
expect(symbols).toBuild();
|
||||
expect(`\\text{${symbols}}`).toBuild();
|
||||
});
|
||||
});
|
||||
|
||||
describe("A macro expander", function() {
|
||||
|
||||
const compareParseTree = function(actual, expected, macros) {
|
||||
|
Reference in New Issue
Block a user