I use a snippet to highlight text, as I find it easier to navigate my text quicker then.
These started out with @pseudometa’s Shimmering Focus theme, though he removed some of them, such as turning italic text green, bold blue. I just added something that turns text in [square brackets] orange. I’d like to add something like that for {curly brackets} but when I try using the inspector, that text just comes up as regular text.
Does this mean there’s no way to add color here?
to be more specific, I just switched to using LaTeX style citations, and I’d like these to be better visible. These look like this: \footcite[5]{Smith2020}
This gets rendered as Chicago Author-Date (for me): Smith 2020, 5
You can use the Dynamics highlights plugin to define your own highlights for that with a basic regex:
(if you are not familiar with regex, it is quite beneficial to learn it, since it allows you to do all sorts of things, and is a widely supported standards across many apps.)
Another quick question: According to regexr.com this should work: (?<=\\)(.*?)(?=\}), i.e. it should highlight everything between a backslash \ and a }, so that \cite{Smith2020} would be highlighted.
The plugin doesn’t like that though. When I do it via the GUI nothing happens, but when I try importing a highlighter, using the template from the github page:
I tried the plugin briefly, and I couldn’t get it to match bare words, so I’m not sure if it’s compatible with the current version of Obsidian.
In addition, if it works, it says something about not working in reading and/or preview mode, which I’m unsure what it actually means. How much would that effect it in your case? For me, it was a show stopper in addition to not matching my regex nor bare words.
I think it means that it currently only works in Live Preview mode, as far as I can tell. Which would be fine, as I just want to be able to quickly tell where I’m citing something. But yes, I agree that it doesn’t appear to work right now. Thanks for confirming that!