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

latex support #7

Open
bluuas opened this issue May 30, 2024 · 1 comment
Open

latex support #7

bluuas opened this issue May 30, 2024 · 1 comment

Comments

@bluuas
Copy link

bluuas commented May 30, 2024

Latex language support with the \includesvg command

It works like this, but I am not sure if other things need to be changed too

langs.ts, line 55:

    // https://hyperpolyglot.org/lightweight-markup
    switch (editor.document.languageId) {
...
        case 'latex':
            return `
\\begin{figure}[htbp]
    \\centering
    \\includesvg[width=0.8\\textwidth]{${filename.replace(/\\/g, '/').replace(/^\.\.\//, '')}}
\\end{figure}`;

(there are probably better options to replace the leading ../ of the path )

@hall
Copy link
Owner

hall commented Oct 27, 2024

Hi @bluuas! I'm not actively using this extension lately so won't likely add support for this myself but I'd be happy to review an MR for it.

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