IMPORTANT
This plugin had been called Math Booster until version 2.1.4, but has been renamed for better clarity and discoverability. A big thank you to those who shared their thoughts here.
Hi everyone,
LaTeX-like Theorem & Equation Referencer is an Obsidian.md plugin that provides a powerful indexing & referencing system for theorems & equations in your vault, bringing LaTeX-like mathematical note-taking experience into Obsidian.
NOTE
For more modular and focused enhancements, some features are planned to be transitioned from this plugin to dedicated, specialized plugins in the near future. Below are the upcoming changes:
Theorems & equations can be dynamically/automatically numbered, while you can statically/manually number them if you want.
The number prefix can be either explicitly specified or automatically inferred from the note title.
Thanks to the integration with MathLinks, links to theorems/equations are displayed with their title or number, similarly to the cleveref package in LaTeX. (No need for manually typing aliases!)
You can also customize the appearance of theorem callouts using CSS snippets; see here.
create the following CSS file and place it under the folder <root of your vault>/.obsidian/snippets/. Then, enable this snippet in the appearance tab of the app settings.
I noticed a bug in the setting loading mechanism, and it might be the reason why you have trouble. I’ve just fixed it, so could you update your Math Booster to the latest version (0.6.9 as of August 27, 2023)?
If it still doesn’t work, please let me know via a GitHub issue.
I forgot to announce that Math Booster is now available in the community plugin browser!
Also, any help in beta-testing via BRAT will be still appreciated!
I love this plugin! I apologize if this is a really simple question, but it seems like all of the Theorem, Definition, etc. environments are always in italics. Is it possible to change it to normal font? Or have an option to change it to normal font?
Even if you are not familiar with CSS (like I was a few months ago), please don’t be discouraged; in the documentation page above, you can find the CSS snippets that are used for the preset styles (plain/framed/MathWiki/vivid). So all you have to do is just copy the snippet and modify the part you want to tweak.
font-style: italic; at the bottom makes your theorem text italic. So you can change it to normal font by:
creating a CSS snippet under <root of your vault>/.obsidian/snippets folder by copying the above framed.css
Note: Only include the code between /* START */ and /* END */ to your snippet file.
delete the last three lines
and enable this snippet in the app’s appearance settings.
Also don’t forget to go to Math Booster settings > Global > Theorem callouts > styles and set it to “custom”. (You might have to reloading Math Booster after this)
(by the way, I’m thinking about enabling customizing theorem styles via the Style Settings plugin)
Thank you for taking the time to respond! That’s a very neat solution, I will try to implement it sometime. (Currently I only use on iPad and I’m not at all familiar with coding, so it’ll take some effort, but it appears that people have found workarounds.)
If you do end up implementing a style-customization directly in the plugin, that would be amazing! Thanks again for all of your work!
Math Booster version 2 introduces a new format for theorem callouts, which is much cleaner, more intuitive, more keyboard-friendly, and less plugin-dependent than the previous one!
%% basic syntax for automatically numbered theorem environments %%
> [!theorem] Title
>
> [!corollary]
>
%% you can type "thm" instead of "theorem", "cor" instead of "corollary", etc. %%
> [!thm] Title
>
> [!cor]
>
%% unnumbered environments like "\begin{lemma*}" in LaTeX %%
> [!lemma|*] Title
>
%% explicitly specifying a theorem number %%
> [!def|A.1] Title
>
Playing around with it, and it proves to be super useful. Does anyone know if there is a thread of custom CSS styling for the callouts? I’m interested in how people style them.
I’m thinking of making a GitHub discussion thread where people can share their custom CSS snippets for theorem callouts, just like Latex Suite’s snippet sharing thread.
It’s a litlte silly question, but I can’t use custom style. Even I off my theme, put snippet with code one of basic style in folder and on “Сustom style” nothing happens. What am I do wrong?
@Nomemes_Jokemuch Sorry for the poor documentation, changing the Style option takes effect for newly opened notes. So you need to reopen already open notes to see your custom styles. Does it help? If not, can you show me your snippet?
framed {
/*
If you're going to use this file as a CSS snippet, only include the code between
the START and END comments to your snippet file.
*/
/* START */
.theorem-callout {
--callout-color: var(--text-normal);
background-color: rgb(0, 0, 0, 0);
border: solid var(--border-width);
border-radius: var(--size-2-3);
font-family: CMU Serif, Times, Noto Serif JP;
}
.theorem-callout .callout-icon {
display: none;
}
.theorem-callout-main-title {
font-family: CMU Serif, Times, Noto Sans JP;
font-weight: bolder;
}
.theorem-callout-subtitle {
font-weight: normal;
}
:not(.theorem-callout-axiom):not(.theorem-callout-definition):not(.theorem-callout-remark).theorem-callout-en .callout-content {
font-style: italic;
}
/* END */
}