Skip to content
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 Documenter.jl style LaTeX-math-fencing #9

Closed
frankier opened this issue Nov 17, 2023 · 4 comments
Closed

Support Documenter.jl style LaTeX-math-fencing #9

frankier opened this issue Nov 17, 2023 · 4 comments

Comments

@frankier
Copy link

frankier commented Nov 17, 2023

Thanks for your work on this extension. It's really nice seeing this inline in vscode.

Documenter.jl encourages LaTeX-math to be fenced with double backticks `` or else as ```math. This seems to currently be unsupported. See https://documenter.juliadocs.org/stable/man/latex/

@zhaouv
Copy link
Owner

zhaouv commented Nov 17, 2023

This is unrelated content to the extension. This can be easily achieved by mimicking vscode-python-highlight-cell-splitter and this extension. It will likely be less than 40 lines in the end, constituting a standalone new extension. I am not interested in it.

@frankier
Copy link
Author

Okay! Very understandable. Thanks for explaining.

@zhaouv
Copy link
Owner

zhaouv commented Nov 18, 2023

if you want to highlight them as a raw string. you could make a new extrension and match them and mark them as raw string by syntaxes json.
if you want to highlight them as a latex statement. you could make a new extension and match them and reinject latex grammer, only one additional line changed like "include": "text.html.markdown".
if you want to display them in preview mode, it is related. you could fork this extension, and change preview part js code. match and replace "``" to "$" and "```math" to "$$" before source code sent to vsc markdown parser, then MarkdownIt will show them as equ, it is not a widely used rule so i won't do it in this extension.

@zhaouv
Copy link
Owner

zhaouv commented May 13, 2024

have added a feature preview-inject for previewing latex. also done this

settings.json

    "markdown-everywhere.preview-mode-inject": [
        {"language":"julia","path":".*","beforeSource":" return args.src.replace(/```math/g,'$$$$\\n').replace(/```/g,'\\n$$$$').replace(/``/g,'$').replace(/\\\\\\\\/g,'\\\\') "}
    ],

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants