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

Allow a per-renderer macros file #22

Open
m-yaghini opened this issue May 20, 2023 · 1 comment
Open

Allow a per-renderer macros file #22

m-yaghini opened this issue May 20, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@m-yaghini
Copy link

Hello, and thanks a lot for making this so user-friendly,

Now that kroki and this plugin support tikz, I can put my old diagrams into my notes finally. However, this requires me to copy and paste my boilerplate preamble code (macros.tex) in every cell that I put in the notebook. This is clearly inefficient.

Similar libraries (for instance katex) allow to define preamble. Could this be added to the plugin? I'm thinking maybe another entry to the logseq/settings/logseq-diagrams-as-code.json file named latex_preamble.

This could be extended to a postamble too; which would allow us not to specify a document at all. Always load libraries and macros necessary + \begin{document} in the preamble and a bunch of additional commands plus a \end{document} to the postamble. From that point onwards, all one needs to put in the notes in \begin{tikzfigure} .... \end{tikzfigure}.

@npgrosser npgrosser added the enhancement New feature or request label May 27, 2023
@npgrosser
Copy link
Owner

Hey, thanks for the suggestion. That definitely sounds useful.
I will think about adding this as a general feature (not only limited to latex/tikz)

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

No branches or pull requests

2 participants