Trouble linking to math block

What I’m trying to do

In math.md I have a mathjax block like this: the limit of the geometrical series is $\sum\limits_{k = 0}^\infty q^k = \frac{1}{1 - q}$.

In a later block, I want to reuse this defenition: "most series limits are difficult to calculate, except for the [[math.md^the limit of the…|geometrical series]].
This in turn creates the block code which gets added behind the block, aka behind the $. When changing into reading view however, this gets processed as {the geometrical series}$⁴4444.

Adding spaces in between the $ and circumflex doesn’t work.

1 Like

I’m not able to reproduce any errors, but I wanted to comment on the fact that using $ ... $ is an inline syntax, so the blockId will refer to the entire paragraph, and you can’t have any text after the blockId.

If using $$ ... $$ you’ll get a proper math block, and it’ll also allow links to that block. Both if the blockId is directly after the block, and if it’s on a line of its own.

Try out the following in a block, switch to reading view and hover over the links at the bottom, and you’ll see the various references. (Note that I’ve mangled up the second and third equations with 2 and 3 as the numerator of the fraction. :slight_smile: )

The limit of geometrical series is: $\sum\limits_{k = 0}^\infty q^k = \frac{1}{1 - q}$^first

$$\sum\limits_{k = 0}^\infty q^k = \frac{2}{1 - q}$$ ^second

Another block...

$$
\sum\limits_{k = 0}^\infty q^k = 
\frac{3}{1 - q}
$$
^third

[[#^first|First reference in a paragraph]]
[[#^second|Second reference after dollar signs]]
[[#^third|Third references on a line of its own]]

This example shows both proper blockId definitions, references within the same document using [[#^...]], and aliasing the link. I’ve also named the blockId’s for ease of reference. Be aware that if you rename them, you’re in charge of keeping them unique within this document.

So one variant of naming, which could be useful is doing something like:

$$\sum\limits_{k = 0}^\infty q^k = \frac{4}{1 - q}$$ ^geometric-series

... difficult to calculate, except for the [[#^geometric-series]]

Which will display like, when hovering over the link:

Do note that with custom names for the blockId, you need to use only numbers, letters and dashes. Otherwise, it’s not going to be recognised as a blockId.

1 Like

hello, first of all, thank you for your reply :slight_smile:
sadly, it did nothing for me :frowning:

here is what my .md looks like:

$$
	\sum\limits_{k=0}^\infty q^k = 
	\begin{cases}
		\frac{1}{1 - q} \text{ Reihe kovergent} & \text{für }\|q\| < 1 \\
		\text{existiert nicht (divergent)} & \text{für }\|q\| \ge 1 \\
	\end{cases}
$$
^4geometric-series
...

... difficult, except for the [[#^4geometric-series|geometric series]] 

wether i put spaces in between my math block and my blockid or type it back to back, it still ends up as {my formula}^⁴geometric-series (see the picture; do note that the 4 only serves the purpose of showing what i mean.
the only thing that works is if i were to put an empty line in between, however, the blockid would then reference nothing.

for my document, i used the blockid ^geomreihen.
editing view:

reading view:
2023-03-08-133937_1920x1080_scrot

after a little more testing i found that placing the blockid after the “heading” for this mathblock will do the trick:

the limit of the geometrical series is: ^blockid
$$
...
$$

however, placing it after the last $$ still “bugs out”.

sorry for the spam.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.