Math property type

Use case or problem

Certain Bases could benefit greatly from the ability to display equations, mathematical formulas, etc. However, as noted at Properties - Obsidian Help, arbitrary Markdown rendering is not an intended feature.

Proposed solution

A dedicated property type for mathematical expressions, in MathJax syntax and rendered by MathJax in Bases etc.

Current workaround (optional)

Create an svg using LaTeX and display it as an image.

Related feature requests (optional)

8 Likes

Definitely a +1 from me. I currently use DataViews in my study vault to collect constants and equations related to a given topic into a nice readable format. I hoped to be able to replace my DataViews with Bases but with the lack of MathJax rendering it looks like that won’t be possible yet.

Until there’s a native math property type in Bases, I will be using a workaround. Here’s how I render mathematical property values within Obsidian Bases:

  1. Use MathML to define the math to render in HTML
<math>
    <msup>
        <mi>π</mi>
        <mn>2</mn>
    </msup>
</math>
  1. (Optional) Remove any whitespace and condense into a single line
<math><msup><mi>π</mi><mn>2</mn></msup></math>
  1. Define a text property and set its value to the HTML
math_example: <math><msup><mi>π</mi><mn>2</mn></msup></math>
  1. Use the html function to to create a formula for the property
formulas:
  math_example: html(note.math_example)
  1. Use the formula in one of the properties
properties:
  formula.math_example:
    displayName: Math Example

In the example above, this ends up looking like this:

image

1 Like

thanks for this workaround! one thing to note about it is that, since it avoids MathJax entirely, it’s not possible to use \newcommand with it.

if this is a requirement for you (or anyone finding this thread), there are two options that i’ve found so far:

  • Pretty Properties community plugin (have to enable in settings)
  • Better Properties plugin (through BRAT only right now)

i still hope that this becomes a feature that ships with Obsidian, eventually