obsidian-latex icon indicating copy to clipboard operation
obsidian-latex copied to clipboard

Setting for preamble.sty location

Open JeppeKlitgaard opened this issue 4 years ago • 11 comments
trafficstars

Hi @xldenis

Thank you for making this plugin - I am finding it super useful.

I do find it slightly untidy to have my preamble in the root of the vault though, and I am wondering if you would implement a setting that can be used to specify the path to the preamble file? Perhaps this could include the option to specify more than one preamble file as well.

If you don't want to implement this yourself, I would be happy to submit a PR for it at some point during the next month.

JeppeKlitgaard avatar Jun 03 '21 19:06 JeppeKlitgaard

Hi! That sounds like a great idea. If you want to write a PR for it that will definitely be welcomed, otherwise I'll add this to my todo list, but I likely can't touch it until after a paper deadline in early july.

xldenis avatar Jun 04 '21 09:06 xldenis

Fantastic!

I have a few busy weeks ahead as well, but after that I'll have a look at putting together a quick PR!

JeppeKlitgaard avatar Jun 04 '21 10:06 JeppeKlitgaard

Here's hoping that you have time to institute this setting!

Thank you for the plugin. I consider it essential.

Hunanbean avatar Jan 12 '22 22:01 Hunanbean

oh hey! yea, I think this should be fairly simple to achieve.

xldenis avatar Jan 13 '22 10:01 xldenis

I have a personal setup that does this currently, but I am not sufficiently happy with the state of the code to make it available. I am having some trouble with the reliability of loading the MathJax, particularly on 0.13.

JeppeKlitgaard avatar Jan 13 '22 10:01 JeppeKlitgaard

If you push your code I can also take over. I'm currently investigating the issues with the live preview mode. Unfortunately, the way Obsidian & MathJax are built means this plugin is necessarily going to be a major hack.

xldenis avatar Jan 13 '22 11:01 xldenis

@xldenis I implemented this as part of another plugin I am making, but which is not yet published -- it really was just a setting and a vault read call, so nothing fancy

JeppeKlitgaard avatar Jan 15 '22 21:01 JeppeKlitgaard

Hi! Are there any news on that great FR ? Thanks :)

Elaws avatar Feb 14 '22 11:02 Elaws

Hi, noting the nature of this FR, I wonder if it would be possible to "choose the closest preamble" - i.e. have folder-level preamble settings.

The method would be this: Look for a preamble.sty file in the folder the note is contained in. If not found, check progressively the parent folders, until the root, which would be the global preamble.

Would this be possible to implement?

amzon-ex avatar Sep 05 '22 16:09 amzon-ex

That suggestion from @amzon-ex sounds really useful!

mayurankv avatar Oct 25 '22 11:10 mayurankv

I'm no longer actively maintaining this, as indicated in the README I would be happy to hand off this plugin to someone else. If someone wants to write a PR, I'm happy to merge it though.

xldenis avatar Oct 25 '22 16:10 xldenis