You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the following in my shared preamble to adapt to light and dark Obsidian themes:
#letforeground=ifTHEME=="dark" { white } else { black }
#settext(fill: foreground, size: SIZE)
This works OK as long as the Obsidian theme doesn't change, but at sunrise/sunset when my Obidian switches, the rendered Typst output doesn't. Can an Obsidian plugin re-render when the theme changes? If not, is there a keyboard shortcut for "re-render all of my Typst content"?
The text was updated successfully, but these errors were encountered:
Can an Obsidian plugin re-render when the theme changes?
I'm not aware of an event fired by Obsidian for it and it could be possible using a Mutation Observer but that would be difficult/buggy as each typst block instance manages itself.
Is there a keyboard shortcut for "re-render all of my Typst content"?
Not directly no for the same reasons as before. You have the option to close and reopen the page, select everything in the page then deselect (doesn't work for math blocks, inline math blocks work). Or the best catch-all is the built-in command "Reload without saving", which is basically a page refresh. Don't worry about the "without saving" part as long as you have auto-save on/save before reloading. Its not assigned to a hotkey by default but on my windows machine I have it on ctrl+r.
I'm using the following in my shared preamble to adapt to light and dark Obsidian themes:
This works OK as long as the Obsidian theme doesn't change, but at sunrise/sunset when my Obidian switches, the rendered Typst output doesn't. Can an Obsidian plugin re-render when the theme changes? If not, is there a keyboard shortcut for "re-render all of my Typst content"?
The text was updated successfully, but these errors were encountered: