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

FR: Option to support additional preamble/includes from frontmatter #25

Open
jeetsukumaran opened this issue Feb 21, 2023 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jeetsukumaran
Copy link

Very useful plugin!

Would it be possible to load additional LaTeX on a file-by-file basis based on the frontmatter, using the header-includes field that Pandoc supports? This would make documents work both in Obsidian and pandoc.

Support from this will allow better organization of LaTeX preambles (abstracting out stuff shared between some files but not all).

@wei2912 wei2912 added the enhancement New feature or request label Feb 23, 2023
@wei2912
Copy link
Owner

wei2912 commented Feb 23, 2023

@jeetsukumaran That's a very nice idea (also see the past suggestion at #11). Unfortunately, the current way MathJax is loaded in Obsidian makes it difficult to have individual files load different MathJax configs (namely, it's hard to reliably reload MathJax for each tab individually when a file is opened).

For more details of the current implementation, you can take a look at https://github.com/wei2912/obsidian-latex/blob/master/main.ts#L42-L57 and the unload function below. I'd be happy to hear any suggestions for how this can be implemented :)

@wei2912 wei2912 added the help wanted Extra attention is needed label Dec 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants