RyotaUshio / obsidian-latex-theorem-equation-referencer

A powerful indexing & referencing system for theorems & equations in your Obsidian vault.
https://ryotaushio.github.io/obsidian-latex-theorem-equation-referencer/
MIT License
147 stars 6 forks source link

Example Callout not styling properly when in Custom Style #223

Open 0xOktAvIan opened 4 months ago

0xOktAvIan commented 4 months ago

Obsidian Debug Information

SYSTEM INFO: Obsidian version: v1.5.3 Installer version: v1.5.3 Operating system: Windows 10 Home 10.0.22631 Login status: not logged in Insider build toggle: off Live preview: on Base theme: adapt to system Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 2 Plugins enabled: 2 1: LaTeX-like Theorem & Equation Referencer v2.2.0 2: MathLinks v0.5.3

Description of the problem

I am tinkering with the custom style to get the callouts exactly to my liking, when I noticed this:

When in MathWiki style, all (to my knowledge) callouts render like this: MathWiki style.

When using this css file from the repository (and as linked to from here), which to my knowledge should have the same effect, the resulting render is this: Custom style. As you can see, the Example callout renders in the default Obsidian style.

Current workaround

Adding this css snippet to the file solves the issue:

.callout[data-callout="example"] {
    --callout-color: 248, 248, 255;
    --callout-icon: '[THE SVG FROM THE FILE ABOVE]';
}

fixes the issue.


Edit: typo/precision

RyotaUshio commented 4 months ago

Thank you for the detailed report.

In fact, this is not a bug. Please take a look at the following footnote in the docs:

> [!example] conflicts with Obsidian's built-in callout type. There is a setting called Don't treat "> [!example]" as a theorem callout, and if it's turned on, an "example" theorem callout can be inserted only with the alias syntax > [!exm].↩︎

RyotaUshio commented 4 months ago

Oh wait, it might be a bug. So you mean the option I mentioned above behaves differently between when in custom styles and when in The preset MathWiki style?

0xOktAvIan commented 4 months ago

Turning this option on / off does nothing when in Custom style unfortunately. In MathWiki style it works as intended.

RyotaUshio commented 4 months ago

Thanks, I will look into this when I have time!