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

Feature request: simplifying entry #83

Open
madsmh opened this issue Sep 24, 2024 · 3 comments
Open

Feature request: simplifying entry #83

madsmh opened this issue Sep 24, 2024 · 3 comments

Comments

@madsmh
Copy link

madsmh commented Sep 24, 2024

I mostly use TikzJax for commutative diagrams with tikzcd, and rarely, if ever, change the preamble. It would nice to be able to specify a standard preamble so I wouldn't have to enter the same one many times. It would also be nice to get avoid having to type \begin{document} and \end{document} in each diagram.

Best, Mads

@Silloky
Copy link

Silloky commented Oct 20, 2024

Hi @madsmh ,
I use the Latex Suite plugin, and I set myself a replacement for chemistry :

{
    trigger: "!chem", 
    replacement: "```tikz\n\\usepackage{chemfig}\n\\begin{document}\n\t\\chemname{\n\t\t\\chemfig{ $0 }\n\t}{$1}\n\\end{document}\n```", 
    options: "tA"
}

So now I just have to type !chem and the whole boilerplate pops up !
I'm sure you could come up with something similar for tikzcd, although it would be nice to have this in the plugin automatically.

@madsmh
Copy link
Author

madsmh commented Oct 20, 2024

Thanks! This is very helpful!

@Silloky
Copy link

Silloky commented Oct 21, 2024

You're welcome!

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