-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Doxygen formula delimiter syntax #31
Comments
Hi, please add ... doxygen: {
inline: [
{ name: 'math_inline',
rex: /\\f\$(.+?)\\f\$/gy,
tmpl: '<eq>$1</eq>',
tag: '\\f$'
},
block: [
{ name: 'math_block_eqno',
rex: /\\f\[([^$]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,
tmpl: '<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>',
tag: 'f[f]'
},
{ name: 'math_block',
rex: /\\f\[([^$]+?)\\f\]/gmy,
tmpl: '<section><eqn>$1</eqn></section>',
tag: ''f[f]'
}
} to the If it does, I can add it in a later version. Do not forget to change ... const md = require('markdown-it')({html:true})
.use(tm, { engine: require('katex'),
delimiters: 'doxygen',
katexOptions: { macros: {"\\RR": "\\mathbb{R}"} } }); or change the delimiter in mdmath preferences. -- |
closed due to missing interest ... might be reopened some time ... |
Hi @goessner, sorry I forgot about this issue.
|
Ah sorry, I still had the markdown-preview-enhanced extension enabled (which supports configuring arbitrary math delimiter pairs). I disabled all Markdown extensions now, except the built-in one. The following code snippet in texmath.js, and configuring the mdmath.delimiters option to "doxygen", works for me:
Some flaw I noticed with this regexp is that it supports block math on a single line, but not on a separate line as example 2:
|
@arwedus ... thanks for testing 'doxygen' delimiters and positive feedback. Changing your regexes to
should make them work with multiple lines now. I included them to version 0.9.4 thanks again ... |
I assume #28 was closed by accident? Does the VS Code plug-in now support \f$ and \f[ \f] as delimiters?
The text was updated successfully, but these errors were encountered: