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

Clever referencing Display Function Only Works for Theorems #221

Closed LynetteCullens closed 4 months ago

LynetteCullens commented 4 months ago

First of all, I apologize if I'm not using the proper using the proper template. I couldn't find one. Issue: I can't get the Display function of Clever referencing to work with any callout but a Theorem. display function edit 2

Works: `# Links Link to $\frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1}$: [[#^8xih4x]]

[!theorem] Fourier Equation %% display: $\scriptsize\frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1}$ %%

Cartesian_Coordinates #One-dimensional_form #Equation

$$ \frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1} $$

${\Large\color{red}\blacksquare}=$ Heat Flow Rate
${\Large\color{yellow}\blacksquare}=$ In the x-direction
${\Large\color{blue}\blacksquare}=$ Area (Corresponding to x-direction)
${\Large\color{purple}\blacksquare}=$ Thermal Conductivity (Negative because q is in direction of negative $\scriptsize\Delta T$ Hot $\rightarrow$ Cold

$\frac{⬛}{🟨}=$ Temperature Gradient ^8xih4x

[[#^8xih4x]]`

Does Not Work:

`# Links Link to $\frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1}$: [[#^8xih4x]]

[!equation] Fourier Equation %% display: $\scriptsize\frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1}$ %%

Cartesian_Coordinates #One-dimensional_form #Equation

$$ \frac{{\color{red}q}_{\color{yellow}x}}{\color{blue}A}=-{\color{purple}k}\frac{d{\color{black}T}}{d{\color{yellow}x}} \tag{15-1} $$

${\Large\color{red}\blacksquare}=$ Heat Flow Rate
${\Large\color{yellow}\blacksquare}=$ In the x-direction
${\Large\color{blue}\blacksquare}=$ Area (Corresponding to x-direction)
${\Large\color{purple}\blacksquare}=$ Thermal Conductivity (Negative because q is in direction of negative $\scriptsize\Delta T$ Hot $\rightarrow$ Cold

$\frac{⬛}{🟨}=$ Temperature Gradient ^8xih4x

[[#^8xih4x]]`

RyotaUshio commented 4 months ago

This is because > [!theorem] is a callout type supported by this plugin while > [!equation] is not.

From the documentation, the supported callout types are:

Here's the complete list of available environments and aliases.

Environment name Alias
axiom axm
definition def
lemma lem
proposition prp
theorem thm
corollary cor
claim clm
assumption asm
example[^1] exm
exercise exr
conjecture cnj
hypothesis hyp
remark rmk

[^1]: > [!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

To reference equations, you don't have to wrap them in callouts. Something like this will work:

$$
f(x)
$$
^block-id

[[^block-id]]

For more details, see the guides on this page:

https://ryotaushio.github.io/obsidian-latex-theorem-equation-referencer/equations.html

LynetteCullens commented 4 months ago

This is because > [!theorem] is a callout type supported by this plugin while > [!equation] is not.

From the documentation, the supported callout types are:

Here's the complete list of available environments and aliases.

Environment name Alias

axiom axm

definition def

lemma lem

proposition prp

theorem thm

corollary cor

claim clm

assumption asm

example1 exm

exercise exr

conjecture cnj

hypothesis hyp

remark rmk

Footnotes

  1. > [!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].

Thank you for the quick reply and quick solution. I appreciate it. Works perfectly now. I didn't realize. I just assumed it would work. And Also, thank you for the updated doc. I'm assuming that you updated it recently because I don't remember it being that long in January.

RyotaUshio commented 4 months ago

In fact, I didn't 😃 The last update was Dec 2023.

Glad it worked for you!