Skip to content

latex support #7

@bluuas

Description

@bluuas

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 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions