From cf6e63e8ccb0d8e53abc0c7f02f5a0a65b45d7cb Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 28 Aug 2025 08:27:07 -0400 Subject: [PATCH 1/5] Make tags produce separate mtext nodes for the delimiters around the tag --- ts/input/tex/Tags.ts | 16 ++++++++++------ ts/input/tex/tagformat/TagFormatConfiguration.ts | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ts/input/tex/Tags.ts b/ts/input/tex/Tags.ts index aad89bbf7..f17e1e773 100644 --- a/ts/input/tex/Tags.ts +++ b/ts/input/tex/Tags.ts @@ -55,7 +55,7 @@ export class TagInfo { * is, but align* is not). * @param {string} tag The tag name (e.g., 1). * @param {string} tagId The unique id for that tag (e.g., mjx-eqn:1). - * @param {string} tagFormat The formatted tag (e.g., "(1)"). + * @param {string|string[]} tagFormat The formatted tag (e.g., "$\bullet$" or ['(','1',')']). * @param {boolean} noTag A no tagging command has been set (e.g., \notag, * \nonumber). * @param {string} labelId The label referring to the tag. @@ -66,7 +66,7 @@ export class TagInfo { readonly defaultTags: boolean = false, public tag: string = null, public tagId: string = '', - public tagFormat: string = '', + public tagFormat: string | string[] = '', public noTag: boolean = false, public labelId: string = '' ) {} @@ -149,7 +149,7 @@ export interface Tags { * @param {string} tag The tag string. * @returns {string} The formatted numbered tag. */ - formatTag(tag: string): string; + formatTag(tag: string): string | string[]; /** * How to format references to tags. @@ -157,7 +157,7 @@ export interface Tags { * @param {string} tag The tag string. * @returns {string} The formatted numbered tag. */ - formatRef(tag: string): string; + formatRef(tag: string): string | string[]; /** * How to format URLs for references. @@ -390,7 +390,7 @@ export class AbstractTags implements Tags { * @override */ public formatTag(tag: string) { - return '(' + tag + ')'; + return ['(', tag, ')']; } /** @@ -566,8 +566,12 @@ export class AbstractTags implements Tags { ); this.label = ''; } + const format = this.currentTag.tagFormat; + const tag = Array.isArray(format) + ? format + : format.match(/^(\(|\[|\{)(.*)(\}|\]|\))$/)?.slice(1) || [format]; const mml = new TexParser( - '\\text{' + this.currentTag.tagFormat + '}', + tag.map((part) => `\\text{${part}}`).join(''), {}, this.configuration ).mml(); diff --git a/ts/input/tex/tagformat/TagFormatConfiguration.ts b/ts/input/tex/tagformat/TagFormatConfiguration.ts index b3a5d08b7..0e1d16e23 100644 --- a/ts/input/tex/tagformat/TagFormatConfiguration.ts +++ b/ts/input/tex/tagformat/TagFormatConfiguration.ts @@ -125,7 +125,7 @@ export const TagFormatConfiguration = Configuration.create('tagformat', { [ConfigurationType.OPTIONS]: { tagformat: { number: (n: number) => n.toString(), - tag: (tag: string) => '(' + tag + ')', + tag: (tag: string) => ['(', tag, ')'], ref: '', // means use the tag function id: (id: string) => 'mjx-eqn:' + id.replace(/\s/g, '_'), url: (id: string, base: string) => base + '#' + encodeURIComponent(id), From 7545ae766dcb0161fa3796224de4cb40f01f053b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 28 Aug 2025 08:33:58 -0400 Subject: [PATCH 2/5] Update tags in ams and mathtools packages --- ts/input/tex/base/BaseMethods.ts | 4 ++-- ts/input/tex/mathtools/MathtoolsTags.ts | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ts/input/tex/base/BaseMethods.ts b/ts/input/tex/base/BaseMethods.ts index 206452de8..36739c9db 100644 --- a/ts/input/tex/base/BaseMethods.ts +++ b/ts/input/tex/base/BaseMethods.ts @@ -2218,7 +2218,7 @@ const BaseMethods: { [key: string]: ParseMethod } = { } ref = new Label(); } - let tag = ref.tag; + let tag: string | string[] = ref.tag; if (eqref) { // @test Eqref tag = parser.tags.formatRef(tag); @@ -2226,7 +2226,7 @@ const BaseMethods: { [key: string]: ParseMethod } = { const node = parser.create( 'node', 'mrow', - ParseUtil.internalMath(parser, tag), + ParseUtil.internalMath(parser, Array.isArray(tag) ? tag.join('') : tag), { href: parser.tags.formatUrl(ref.id, parser.options.baseURL), class: 'MathJax_ref', diff --git a/ts/input/tex/mathtools/MathtoolsTags.ts b/ts/input/tex/mathtools/MathtoolsTags.ts index 5dda69694..21475423d 100644 --- a/ts/input/tex/mathtools/MathtoolsTags.ts +++ b/ts/input/tex/mathtools/MathtoolsTags.ts @@ -104,9 +104,7 @@ export function MathtoolsTagFormat( public formatTag(tag: string) { if (this.mtCurrent) { const [left, right, format] = this.mtCurrent; - return format - ? `${left}${format}{${tag}}${right}` - : `${left}${tag}${right}`; + return format ? [left, `${format}{${tag}}`, right] : [left, tag, right]; } return super.formatTag(tag); } From 2f26005b572e7a37b2aea67a9ba57d88bcd5fd22 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 28 Aug 2025 20:57:19 -0400 Subject: [PATCH 3/5] Update tests for change in tag output --- testsuite/tests/input/tex/Ams.test.ts | 72 +++-- testsuite/tests/input/tex/Base.test.ts | 40 ++- testsuite/tests/input/tex/Cases.test.ts | 64 +++-- testsuite/tests/input/tex/Empheq.test.ts | 76 +++-- testsuite/tests/input/tex/Mathtools.test.ts | 24 +- testsuite/tests/input/tex/SetOptions.test.ts | 4 +- testsuite/tests/input/tex/Tag.test.ts | 284 ++++++++++++++----- testsuite/tests/input/tex/TagFormat.test.ts | 32 ++- 8 files changed, 446 insertions(+), 150 deletions(-) diff --git a/testsuite/tests/input/tex/Ams.test.ts b/testsuite/tests/input/tex/Ams.test.ts index 60534b58d..3f3f3eed2 100644 --- a/testsuite/tests/input/tex/Ams.test.ts +++ b/testsuite/tests/input/tex/Ams.test.ts @@ -1563,7 +1563,9 @@ describe('Ams Environments', () => { - (1) + ( + 1 + ) @@ -1866,7 +1868,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -1881,7 +1885,9 @@ describe('Ams Tagged Environments', () => { - (2) + ( + 2 + ) c @@ -1954,7 +1960,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) c @@ -2063,7 +2071,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2073,7 +2083,9 @@ describe('Ams Tagged Environments', () => { - (2) + ( + 2 + ) c @@ -2121,7 +2133,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2136,7 +2150,9 @@ describe('Ams Tagged Environments', () => { - (2) + ( + 2 + ) c @@ -2376,7 +2392,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2407,7 +2425,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2424,7 +2444,9 @@ describe('Ams Tagged Environments', () => { - (2) + ( + 2 + ) c @@ -2493,7 +2515,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2531,7 +2555,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) @@ -2583,7 +2609,9 @@ describe('Ams Tagged Environments', () => { - (1) + ( + 1 + ) a @@ -2692,7 +2720,9 @@ describe('Ams Tagged Environments Left', () => { - (1) + ( + 1 + ) @@ -2725,7 +2755,9 @@ describe('Ams Tagged Environments Left', () => { - (1) + ( + 1 + ) a @@ -2752,13 +2784,17 @@ describe('Ams Tagged Environments Left', () => { - (2) + ( + 2 + ) - (1) + ( + 1 + ) a diff --git a/testsuite/tests/input/tex/Base.test.ts b/testsuite/tests/input/tex/Base.test.ts index 7b70ffabe..95ec08fa4 100644 --- a/testsuite/tests/input/tex/Base.test.ts +++ b/testsuite/tests/input/tex/Base.test.ts @@ -12482,7 +12482,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -12502,7 +12504,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -12522,7 +12526,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -12530,7 +12536,9 @@ describe('Referencing', () => { - (2) + ( + 2 + ) c @@ -12564,7 +12572,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -12587,7 +12597,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -12610,7 +12622,9 @@ describe('Referencing', () => { - (1) + ( + 1 + ) a @@ -14121,7 +14135,7 @@ describe('User Defined Environments', () => { it('Cases star', () => { toXmlMatch( tex2mml('\\begin{mmtool} a & test a\\\\ b & test b \\end{mmtool}'), - ` + ` { @@ -14185,11 +14199,13 @@ describe('Tagged Environments', () => { it('EqnTest', () => { toXmlMatch( tex2mml('\\begin{eqntest} a & b \\end{eqntest}'), - ` + ` - (1) + ( + 1 + ) a @@ -14214,7 +14230,9 @@ describe('Tagged Environments', () => { - (1) + ( + 1 + ) x diff --git a/testsuite/tests/input/tex/Cases.test.ts b/testsuite/tests/input/tex/Cases.test.ts index 870e4d7ee..6dfc082bb 100644 --- a/testsuite/tests/input/tex/Cases.test.ts +++ b/testsuite/tests/input/tex/Cases.test.ts @@ -20,7 +20,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) @@ -37,7 +39,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) 1 @@ -61,7 +65,9 @@ describe('Cases', () => { - (2) + ( + 2 + ) 0 @@ -84,7 +90,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) 1 @@ -133,7 +141,9 @@ describe('Cases', () => { - (2) + ( + 2 + ) @@ -162,7 +172,9 @@ describe('Cases', () => { - (1a) + ( + 1a + ) @@ -179,7 +191,9 @@ describe('Cases', () => { - (1a) + ( + 1a + ) 1 @@ -203,7 +217,9 @@ describe('Cases', () => { - (1b) + ( + 1b + ) 0 @@ -226,7 +242,9 @@ describe('Cases', () => { - (1a) + ( + 1a + ) 1 @@ -275,7 +293,9 @@ describe('Cases', () => { - (1b) + ( + 1b + ) @@ -304,7 +324,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) @@ -318,7 +340,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) 1 @@ -341,7 +365,9 @@ describe('Cases', () => { - (1) + ( + 1 + ) 1 @@ -420,7 +446,9 @@ describe('Cases', () => { - (A) + ( + A + ) @@ -434,7 +462,9 @@ describe('Cases', () => { - (A) + ( + A + ) x @@ -457,7 +487,9 @@ describe('Cases', () => { - (A) + ( + A + ) x diff --git a/testsuite/tests/input/tex/Empheq.test.ts b/testsuite/tests/input/tex/Empheq.test.ts index 9837bb308..29ac1039b 100644 --- a/testsuite/tests/input/tex/Empheq.test.ts +++ b/testsuite/tests/input/tex/Empheq.test.ts @@ -20,7 +20,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) @@ -32,7 +34,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -47,7 +51,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) c @@ -69,7 +75,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -100,7 +108,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) @@ -128,7 +138,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -150,7 +162,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -165,7 +179,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) c @@ -187,7 +203,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -208,7 +226,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) c @@ -235,7 +255,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) @@ -249,7 +271,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -272,7 +296,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -379,7 +405,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -394,7 +422,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -402,7 +432,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) b @@ -424,7 +456,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a @@ -438,7 +472,9 @@ describe('Empheq', () => { - (2) + ( + 2 + ) b @@ -465,7 +501,9 @@ describe('Empheq', () => { - (1) + ( + 1 + ) a diff --git a/testsuite/tests/input/tex/Mathtools.test.ts b/testsuite/tests/input/tex/Mathtools.test.ts index c9975c4d7..e60be59a2 100644 --- a/testsuite/tests/input/tex/Mathtools.test.ts +++ b/testsuite/tests/input/tex/Mathtools.test.ts @@ -506,7 +506,9 @@ describe('Mathtools Tagging', () => { - [1] + [ + 1 + ] E @@ -532,7 +534,9 @@ describe('Mathtools Tagging', () => { - [\\textbf{1}] + [ + \\textbf{1} + ] E @@ -579,7 +583,9 @@ describe('Mathtools Tagging', () => { - ((1)) + (( + 1 + )) E @@ -639,7 +645,9 @@ describe('Mathtools Tagging', () => { - |1| + | + 1 + | x @@ -6106,7 +6114,9 @@ describe('Mathtools options', () => { - [[\\mathbf{x}]] + [[ + \\mathbf{x} + ]] a @@ -6149,7 +6159,9 @@ describe('Mathtools options', () => { - (1) + ( + 1 + ) a diff --git a/testsuite/tests/input/tex/SetOptions.test.ts b/testsuite/tests/input/tex/SetOptions.test.ts index abdf100a5..92458a028 100644 --- a/testsuite/tests/input/tex/SetOptions.test.ts +++ b/testsuite/tests/input/tex/SetOptions.test.ts @@ -28,7 +28,9 @@ describe('Setoptions', () => { - (1) + ( + 1 + ) a diff --git a/testsuite/tests/input/tex/Tag.test.ts b/testsuite/tests/input/tex/Tag.test.ts index c59313fd3..4694d3d64 100644 --- a/testsuite/tests/input/tex/Tag.test.ts +++ b/testsuite/tests/input/tex/Tag.test.ts @@ -26,7 +26,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -46,7 +48,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -76,7 +80,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) c @@ -96,7 +102,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -116,7 +124,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -197,7 +207,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -220,7 +232,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -243,7 +257,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -266,7 +282,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -276,7 +294,9 @@ describe('TagAll', () => { - (2) + ( + 2 + ) c @@ -331,7 +351,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -351,7 +373,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -371,7 +395,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -379,7 +405,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) b @@ -399,7 +427,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -407,7 +437,9 @@ describe('TagAll', () => { - (B) + ( + B + ) b @@ -427,7 +459,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -447,7 +481,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -467,7 +503,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -475,7 +513,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) b @@ -497,7 +537,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -505,7 +547,9 @@ describe('TagAll', () => { - (B) + ( + B + ) b @@ -525,7 +569,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) a @@ -548,7 +594,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -573,7 +621,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -581,7 +631,9 @@ describe('TagAll', () => { - (1) + ( + 1 + ) b @@ -609,7 +661,9 @@ describe('TagAll', () => { - (A) + ( + A + ) a @@ -617,7 +671,9 @@ describe('TagAll', () => { - (B) + ( + B + ) b @@ -664,7 +720,9 @@ describe('TagNone', () => { - (0) + ( + 0 + ) a @@ -952,7 +1010,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -972,7 +1032,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -997,7 +1059,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1005,7 +1069,9 @@ describe('TagNone', () => { - (B) + ( + B + ) b @@ -1042,7 +1108,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1062,7 +1130,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1089,7 +1159,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1097,7 +1169,9 @@ describe('TagNone', () => { - (B) + ( + B + ) b @@ -1137,7 +1211,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1162,7 +1238,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1195,7 +1273,9 @@ describe('TagNone', () => { - (A) + ( + A + ) a @@ -1203,7 +1283,9 @@ describe('TagNone', () => { - (B) + ( + B + ) b @@ -1250,7 +1332,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1297,7 +1381,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) c @@ -1317,7 +1403,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1337,7 +1425,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1418,7 +1508,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1441,7 +1533,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1464,7 +1558,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1487,7 +1583,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1497,7 +1595,9 @@ describe('TagAms', () => { - (2) + ( + 2 + ) c @@ -1552,7 +1652,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1572,7 +1674,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1592,7 +1696,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1600,7 +1706,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) b @@ -1620,7 +1728,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1628,7 +1738,9 @@ describe('TagAms', () => { - (B) + ( + B + ) b @@ -1648,7 +1760,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1668,7 +1782,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1688,7 +1804,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1696,7 +1814,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) b @@ -1718,7 +1838,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1726,7 +1848,9 @@ describe('TagAms', () => { - (B) + ( + B + ) b @@ -1746,7 +1870,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) a @@ -1769,7 +1895,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1794,7 +1922,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1802,7 +1932,9 @@ describe('TagAms', () => { - (1) + ( + 1 + ) b @@ -1830,7 +1962,9 @@ describe('TagAms', () => { - (A) + ( + A + ) a @@ -1838,7 +1972,9 @@ describe('TagAms', () => { - (B) + ( + B + ) b @@ -1877,7 +2013,9 @@ describe('Page References', () => { - (1) + ( + 1 + ) a @@ -1909,7 +2047,9 @@ describe('Page References', () => { - (1) + ( + 1 + ) a @@ -1931,7 +2071,9 @@ describe('Page References', () => { - (1) + ( + 1 + ) a diff --git a/testsuite/tests/input/tex/TagFormat.test.ts b/testsuite/tests/input/tex/TagFormat.test.ts index fe2ed47bc..0940570a0 100644 --- a/testsuite/tests/input/tex/TagFormat.test.ts +++ b/testsuite/tests/input/tex/TagFormat.test.ts @@ -27,7 +27,9 @@ describe('Tagformat', () => { - [1] + [ + 1 + ] x @@ -47,7 +49,9 @@ describe('Tagformat', () => { - [x] + [ + x + ] x @@ -67,7 +71,9 @@ describe('Tagformat', () => { - [x] + [ + x + ] x @@ -75,7 +81,9 @@ describe('Tagformat', () => { - [A1] + [ + A1 + ] @@ -97,7 +105,9 @@ describe('Tagformat', () => { - [x] + [ + x + ] x @@ -105,7 +115,9 @@ describe('Tagformat', () => { - [A1] + [ + A1 + ] @@ -133,7 +145,9 @@ describe('Tagformat', () => { - (x) + ( + x + ) x @@ -141,7 +155,9 @@ describe('Tagformat', () => { - (1) + ( + 1 + ) From 0740675ada5c9f38ffb378817281c6c94f9e3ae1 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 4 Sep 2025 15:08:35 -0400 Subject: [PATCH 4/5] Update mathtools tag example --- testsuite/package.json | 2 +- testsuite/tests/input/tex/Mathtools.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/package.json b/testsuite/package.json index ef7e0abda..7bc8f84f8 100644 --- a/testsuite/package.json +++ b/testsuite/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@jest/globals": "^29.7.0", - "@mathjax/mathjax-bbm-font-extension": "0.4.2-beta.8", + "@mathjax/mathjax-bbm-font-extension": "^4.0.0", "@types/jest": "^29.5.14", "jest": "^29.7.0", "ts-jest": "^29.3.4", diff --git a/testsuite/tests/input/tex/Mathtools.test.ts b/testsuite/tests/input/tex/Mathtools.test.ts index e60be59a2..a8c5712c5 100644 --- a/testsuite/tests/input/tex/Mathtools.test.ts +++ b/testsuite/tests/input/tex/Mathtools.test.ts @@ -6176,7 +6176,7 @@ describe('Mathtools options', () => { test('non-ams tags', () => { class myTags extends AbstractTags { - formatTag(tag: string) {return `[[${tag}]]`} + formatTag(tag: string) {return ['[[', tag, ']]']} }; Configuration.create('mytags', { [ConfigurationType.TAGS]: {mytags: myTags}, From c97db4892dd44933c0848a9890d43b89a1478bf1 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 4 Sep 2025 17:06:41 -0400 Subject: [PATCH 5/5] Update lock file --- testsuite/pnpm-lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testsuite/pnpm-lock.yaml b/testsuite/pnpm-lock.yaml index 9a5d25485..6d5af4376 100644 --- a/testsuite/pnpm-lock.yaml +++ b/testsuite/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^29.7.0 version: 29.7.0 '@mathjax/mathjax-bbm-font-extension': - specifier: 0.4.2-beta.8 - version: 0.4.2-beta.8 + specifier: ^4.0.0 + version: 4.0.0 '@types/jest': specifier: ^29.5.14 version: 29.5.14 @@ -296,8 +296,8 @@ packages: '@jridgewell/trace-mapping@0.3.9': resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - '@mathjax/mathjax-bbm-font-extension@0.4.2-beta.8': - resolution: {integrity: sha512-FU/M4IJ6dRCRxxfnxRSAwWgEEvcpgqqzupiSe3JW8TCl2zR0co3zaYtO1oaHGrmmlqAkARPRJnpxViIWhfPr6A==} + '@mathjax/mathjax-bbm-font-extension@4.0.0': + resolution: {integrity: sha512-4ElFHV3T4oXP9DhyLXcvnAfqqmjf4lINFvShXFkcx7/va/TUL3EpZm/s130JQH3Sp5xX6UG09wY2/dcLONLfjQ==} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -1643,7 +1643,7 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.0 - '@mathjax/mathjax-bbm-font-extension@0.4.2-beta.8': {} + '@mathjax/mathjax-bbm-font-extension@4.0.0': {} '@sinclair/typebox@0.27.8': {}