mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 03:08:40 +00:00
Add support for \mathring (#1125)
Fix #1124. \mathring is the math-mode equivalent to the \r accent. Support follows from a rather trivial symbol aliasing, plus (for Unicode support) listing it in `unicodeAccents.js`.
This commit is contained in:
committed by
Kevin Barabash
parent
58c4c7c4a4
commit
684df05a86
@@ -174,7 +174,7 @@ const mathmlBuilder = (group, options) => {
|
||||
|
||||
const NON_STRETCHY_ACCENT_REGEX = new RegExp([
|
||||
"\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve",
|
||||
"\\check", "\\hat", "\\vec", "\\dot",
|
||||
"\\check", "\\hat", "\\vec", "\\dot", "\\mathring",
|
||||
].map(accent => `\\${accent}`).join("|"));
|
||||
|
||||
// Accents
|
||||
@@ -182,7 +182,7 @@ defineFunction({
|
||||
type: "accent",
|
||||
names: [
|
||||
"\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve",
|
||||
"\\check", "\\hat", "\\vec", "\\dot",
|
||||
"\\check", "\\hat", "\\vec", "\\dot", "\\mathring",
|
||||
"\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow",
|
||||
"\\Overrightarrow", "\\overleftrightarrow", "\\overgroup",
|
||||
"\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon",
|
||||
|
@@ -646,6 +646,7 @@ defineSymbol(math, main, accent, "\u02c7", "\\check");
|
||||
defineSymbol(math, main, accent, "\u005e", "\\hat");
|
||||
defineSymbol(math, main, accent, "\u20d7", "\\vec");
|
||||
defineSymbol(math, main, accent, "\u02d9", "\\dot");
|
||||
defineSymbol(math, main, accent, "\u02da", "\\mathring");
|
||||
defineSymbol(math, main, mathord, "\u0131", "\\imath", true);
|
||||
defineSymbol(math, main, mathord, "\u0237", "\\jmath", true);
|
||||
defineSymbol(text, main, textord, "\u0131", "\\i", true);
|
||||
|
@@ -13,6 +13,6 @@ module.exports = {
|
||||
'\u030c': {text: '\\v', math: '\\check'},
|
||||
'\u0302': {text: '\\^', math: '\\hat'},
|
||||
'\u0307': {text: '\\.', math: '\\dot'},
|
||||
'\u030a': {text: '\\r'},
|
||||
'\u030a': {text: '\\r', math: '\\mathring'},
|
||||
'\u030b': {text: '\\H'},
|
||||
};
|
||||
|
Reference in New Issue
Block a user