Rendering of math equations

Hi there,

This probably does not conform to Bike’s vision, at all :sweat_smile:, but I still wanted to ask whether the introduction of types (h1, h2, p, …) might also include a “math” type at some point, where mathematical equations in e.g. LaTex syntax are rendered (akin to e.g. Roam or Dynalist)?

I adore Bike so far, but being in a math-heavy field of study, I would love to be able to use Bike for making sense of formulas, as well.

Greetings!

1 Like

Hi and thanks for trying Bike.

I need to do h1, h2, etc first. Then depending on difficulty I would consider it. Treating as a separate block level type as you suggest would probably make it easier.

I guess my recommendation is to wait until I start adding other types such as h1, h2, and then remind me.

3 Likes

I don’t know whether this will (in due course) look stable enough to support an XML-based solution:

W3C :: MathML Core

MathML | MDN

1 Like

One possible solution is using Marked 2 app. If you enclose Math content between dollar signs then it is detected.

The option I use involves Haskell, Pandoc and Keyboard Maestro. I use a KM macro which receives a Bike outline like:

Notes concerning the $λ$ calculus
	$λ$ terms:
		Variable: $x$
		Abstraction: $(λx.M)$
		Application: $(MN)$
	Reduction operations:
		$α$ reduction: $λx.M → λy.[y/x]M$
		$β$ reduction: $(λx.M)N → [N/x]M$
	Church numerals:
		$0 := λfx.x$
		$1 := λfx.fx$
		$2 := λfx.f(fx)$

and produces a PDF file. This is a capture from that document.

4 Likes

Thanks for posting this workaround, sounds good! I’ve been using Marked2 for several years, but after being introduced to WYSIWYG-style editors in e.g. Obsidian, I’m spoilt, I guess. ^^’ Since I’m not writing for the sake of having a beautiful, shareable document or a set of lecture/learning notes to refer to, but just to help me think in the moment, I really rely on being able to immediately view all mathy stuff while continuing to write in the same document, seamlessly.

I think the prior discussion of h1/h2/h3 on this forum should be taken seriously… These are really incompatible with the outlining model and will generate a lot of cognitive friction if added.

Math support could be a good idea, but I am concerned that the long tail of needed features is so immense that it might be a lot more effort than is worth…

1 Like

+1


@jessegrosjean

Perhaps better, in the light of that discussion, to support relative styles for the Nth levels of any selected (or otherwise specified) sub-trees ?

(To avoid the frictions and inflexibilities of hard-wiring decorative labels to absolute levels)

Note, this is an old thread from 22’ that just got updated. My comment above was pre headings discussion I think. At this point I expect to keep headings as they are, a single “heading” type.

My personal math needs are about …0…, but it also seems like it would be a fairly strait forward feature to add (ha ha ha)… but I think maybe it would. The idea would be you enter a formula using LaTeX in a popup window (similar to editing a link). Then the formula is rendered into an image, and displayed in outline.

I know that doesn’t make Bike a math notebook, but I think that could still be useful?

2 Likes

Ahh cool :slight_smile:

I think that this can be useful for some users, but the problem is that one hits a wall very quickly with this kind of support, and I think that most kinds of use-cases that would benefit from this level of math support are elementary enough that the math could be written in unicode, or in code blocks…

For this reason, I wonder if users would be better served by things like syntax highlighting for code, which can be done in a very satisfactory way that scales to (almost) arbitrarily complex use-cases.

I would hope if LaTeX or something along the line (e.g. KaTeX, MathJax etc.) is ever implemented, it would be inline rendering with the other texts, not as a separate image. Often, I require to write the equations or more so often some untypical characters in LaTeX like unlocked2412’s notes. They are part of the whole note, not an equation block I can put them separately. Something more like how Typora works.