mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Add latin-1 letters as math symbols (#796)
Additional work is required to render them using Computer Modern, currently we use the fallback font which is Times New Roman.
This commit is contained in:
committed by
Kevin Barabash
parent
2cd961dbe0
commit
81037e5d10
@@ -671,16 +671,19 @@ for (let i = 0; i < letters.length; i++) {
|
||||
// Latin-1 letters
|
||||
for (let i = 0x00C0; i <= 0x00D6; i++) {
|
||||
const ch = String.fromCharCode(i);
|
||||
defineSymbol(math, main, mathord, ch, ch);
|
||||
defineSymbol(text, main, textord, ch, ch);
|
||||
}
|
||||
|
||||
for (let i = 0x00D8; i <= 0x00F6; i++) {
|
||||
const ch = String.fromCharCode(i);
|
||||
defineSymbol(math, main, mathord, ch, ch);
|
||||
defineSymbol(text, main, textord, ch, ch);
|
||||
}
|
||||
|
||||
for (let i = 0x00F8; i <= 0x00FF; i++) {
|
||||
const ch = String.fromCharCode(i);
|
||||
defineSymbol(math, main, mathord, ch, ch);
|
||||
defineSymbol(text, main, textord, ch, ch);
|
||||
}
|
||||
|
||||
|
@@ -70,8 +70,8 @@ describe("unicode", function() {
|
||||
expect('\\text{ÀàÇçÉéÏïÖöÛû}').toParse();
|
||||
});
|
||||
|
||||
it("should not parse Latin-1 outside \\text{}", function() {
|
||||
expect('ÀàÇçÉéÏïÖöÛû').toNotParse();
|
||||
it("should parse Latin-1 outside \\text{}", function() {
|
||||
expect('ÀàÇçÉéÏïÖöÛû').toParse();
|
||||
});
|
||||
|
||||
it("should parse Cyrillic inside \\text{}", function() {
|
||||
|
Reference in New Issue
Block a user