feat: add asciimathDelimiter and nemethDelimiter options#35
Merged
Conversation
wendyyuchensun
commented
May 2, 2026
| <span | ||
| data-seemark-element-type="math" | ||
| data-seemark-payload="{"math":"a+b=c","typed":"latex","mathMl":"<math xmlns=\\"http://www.w3.org/1998/Math/MathML\\">\\n <mi>a</mi>\\n <mo>+</mo>\\n <mi>b</mi>\\n <mo>=</mo>\\n <mi>c</mi>\\n</math>","svg":"<mjx-container class=\\"MathJax\\" jax=\\"SVG\\"><svg style=\\"vertical-align: -0.186ex;\\" xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"8.93ex\\" height=\\"1.756ex\\" role=\\"img\\" focusable=\\"false\\" viewBox=\\"0 -694 3947 776\\" xmlns:xlink=\\"http://www.w3.org/1999/xlink\\"><defs><path id=\\"MJX-4-TEX-I-1D44E\\" d=\\"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z\\"></path><path id=\\"MJX-4-TEX-N-2B\\" d=\\"M56 237T56 250T70 270H369V420L370 570Q380 583 389 583Q402 583 409 568V270H707Q722 262 722 250T707 230H409V-68Q401 -82 391 -82H389H387Q375 -82 369 -68V230H70Q56 237 56 250Z\\"></path><path id=\\"MJX-4-TEX-I-1D44F\\" d=\\"M73 647Q73 657 77 670T89 683Q90 683 161 688T234 694Q246 694 246 685T212 542Q204 508 195 472T180 418L176 399Q176 396 182 402Q231 442 283 442Q345 442 383 396T422 280Q422 169 343 79T173 -11Q123 -11 82 27T40 150V159Q40 180 48 217T97 414Q147 611 147 623T109 637Q104 637 101 637H96Q86 637 83 637T76 640T73 647ZM336 325V331Q336 405 275 405Q258 405 240 397T207 376T181 352T163 330L157 322L136 236Q114 150 114 114Q114 66 138 42Q154 26 178 26Q211 26 245 58Q270 81 285 114T318 219Q336 291 336 325Z\\"></path><path id=\\"MJX-4-TEX-N-3D\\" d=\\"M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z\\"></path><path id=\\"MJX-4-TEX-I-1D450\\" d=\\"M34 159Q34 268 120 355T306 442Q362 442 394 418T427 355Q427 326 408 306T360 285Q341 285 330 295T319 325T330 359T352 380T366 386H367Q367 388 361 392T340 400T306 404Q276 404 249 390Q228 381 206 359Q162 315 142 235T121 119Q121 73 147 50Q169 26 205 26H209Q321 26 394 111Q403 121 406 121Q410 121 419 112T429 98T420 83T391 55T346 25T282 0T202 -11Q127 -11 81 37T34 159Z\\"></path></defs><g stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" transform=\\"scale(1,-1)\\"><g data-mml-node=\\"math\\"><g data-mml-node=\\"mi\\"><use data-c=\\"1D44E\\" xlink:href=\\"#MJX-4-TEX-I-1D44E\\"></use></g><g data-mml-node=\\"mo\\" transform=\\"translate(751.2,0)\\"><use data-c=\\"2B\\" xlink:href=\\"#MJX-4-TEX-N-2B\\"></use></g><g data-mml-node=\\"mi\\" transform=\\"translate(1751.4,0)\\"><use data-c=\\"1D44F\\" xlink:href=\\"#MJX-4-TEX-I-1D44F\\"></use></g><g data-mml-node=\\"mo\\" transform=\\"translate(2458.2,0)\\"><use data-c=\\"3D\\" xlink:href=\\"#MJX-4-TEX-N-3D\\"></use></g><g data-mml-node=\\"mi\\" transform=\\"translate(3514,0)\\"><use data-c=\\"1D450\\" xlink:href=\\"#MJX-4-TEX-I-1D450\\"></use></g></g></g></svg></mjx-container>","position":{"start":2,"end":11}}" | ||
| data-seemark-payload="{"math":"a+b=c","typed":"latex","mathMl":"<math xmlns=\\"http://www.w3.org/1998/Math/MathML\\">\\n <mi>a</mi>\\n <mo>+</mo>\\n <mi>b</mi>\\n <mo>=</mo>\\n <mi>c</mi>\\n</math>","svg":"<mjx-container class=\\"MathJax\\" jax=\\"SVG\\"><svg style=\\"vertical-align: -0.186ex;\\" xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"8.93ex\\" height=\\"1.756ex\\" role=\\"img\\" focusable=\\"false\\" viewBox=\\"0 -694 3947 776\\" xmlns:xlink=\\"http://www.w3.org/1999/xlink\\"><defs><path id=\\"MJX-7-TEX-I-1D44E\\" d=\\"M33 157Q33 258 109 349T280 441Q331 441 370 392Q386 422 416 422Q429 422 439 414T449 394Q449 381 412 234T374 68Q374 43 381 35T402 26Q411 27 422 35Q443 55 463 131Q469 151 473 152Q475 153 483 153H487Q506 153 506 144Q506 138 501 117T481 63T449 13Q436 0 417 -8Q409 -10 393 -10Q359 -10 336 5T306 36L300 51Q299 52 296 50Q294 48 292 46Q233 -10 172 -10Q117 -10 75 30T33 157ZM351 328Q351 334 346 350T323 385T277 405Q242 405 210 374T160 293Q131 214 119 129Q119 126 119 118T118 106Q118 61 136 44T179 26Q217 26 254 59T298 110Q300 114 325 217T351 328Z\\"></path><path id=\\"MJX-7-TEX-N-2B\\" d=\\"M56 237T56 250T70 270H369V420L370 570Q380 583 389 583Q402 583 409 568V270H707Q722 262 722 250T707 230H409V-68Q401 -82 391 -82H389H387Q375 -82 369 -68V230H70Q56 237 56 250Z\\"></path><path id=\\"MJX-7-TEX-I-1D44F\\" d=\\"M73 647Q73 657 77 670T89 683Q90 683 161 688T234 694Q246 694 246 685T212 542Q204 508 195 472T180 418L176 399Q176 396 182 402Q231 442 283 442Q345 442 383 396T422 280Q422 169 343 79T173 -11Q123 -11 82 27T40 150V159Q40 180 48 217T97 414Q147 611 147 623T109 637Q104 637 101 637H96Q86 637 83 637T76 640T73 647ZM336 325V331Q336 405 275 405Q258 405 240 397T207 376T181 352T163 330L157 322L136 236Q114 150 114 114Q114 66 138 42Q154 26 178 26Q211 26 245 58Q270 81 285 114T318 219Q336 291 336 325Z\\"></path><path id=\\"MJX-7-TEX-N-3D\\" d=\\"M56 347Q56 360 70 367H707Q722 359 722 347Q722 336 708 328L390 327H72Q56 332 56 347ZM56 153Q56 168 72 173H708Q722 163 722 153Q722 140 707 133H70Q56 140 56 153Z\\"></path><path id=\\"MJX-7-TEX-I-1D450\\" d=\\"M34 159Q34 268 120 355T306 442Q362 442 394 418T427 355Q427 326 408 306T360 285Q341 285 330 295T319 325T330 359T352 380T366 386H367Q367 388 361 392T340 400T306 404Q276 404 249 390Q228 381 206 359Q162 315 142 235T121 119Q121 73 147 50Q169 26 205 26H209Q321 26 394 111Q403 121 406 121Q410 121 419 112T429 98T420 83T391 55T346 25T282 0T202 -11Q127 -11 81 37T34 159Z\\"></path></defs><g stroke=\\"currentColor\\" fill=\\"currentColor\\" stroke-width=\\"0\\" transform=\\"scale(1,-1)\\"><g data-mml-node=\\"math\\"><g data-mml-node=\\"mi\\"><use data-c=\\"1D44E\\" xlink:href=\\"#MJX-7-TEX-I-1D44E\\"></use></g><g data-mml-node=\\"mo\\" transform=\\"translate(751.2,0)\\"><use data-c=\\"2B\\" xlink:href=\\"#MJX-7-TEX-N-2B\\"></use></g><g data-mml-node=\\"mi\\" transform=\\"translate(1751.4,0)\\"><use data-c=\\"1D44F\\" xlink:href=\\"#MJX-7-TEX-I-1D44F\\"></use></g><g data-mml-node=\\"mo\\" transform=\\"translate(2458.2,0)\\"><use data-c=\\"3D\\" xlink:href=\\"#MJX-7-TEX-N-3D\\"></use></g><g data-mml-node=\\"mi\\" transform=\\"translate(3514,0)\\"><use data-c=\\"1D450\\" xlink:href=\\"#MJX-7-TEX-I-1D450\\"></use></g></g></g></svg></mjx-container>","position":{"start":2,"end":11}}" |
Collaborator
Author
There was a problem hiding this comment.
只是因為增加了 test case,所以既有測試 snapshot 裡的 MJX- 數字變了。
jamliaoo
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds configurable delimiter options for AsciiMath and Nemeth braille. Both
markdownProcessorandcreateTableOfContentsaccept the new options.asciimathDelimiterPreviously the AsciiMath delimiter was hardcoded to
graveaccent. Now accept:'graveaccent'(default) —`...`'asciimath'—\a...\anemethDelimiter'at'(default) —@...@'nemeth'—\n...\n