thetensor-space / thetensor-space.github.io

Tools to Tame the Tensor
https://TheTensor.Space
MIT License
3 stars 4 forks source link

Stage 2 - Support Katex Math Formulas #33

Closed Alex-Cannon closed 5 years ago

Alex-Cannon commented 5 years ago

Close #25

Use KaTex directly in markdown! Note that display: true means that an expression will be centered in it's own row. display: false means that an element will be inline, or render like text in a paragraph. I attached an image showing this difference below.

The following are the default delimiters KaTex uses (See docs):

[
  {left: "$$", right: "$$", display: true},
  {left: "\\(", right: "\\)", display: false},
  {left: "\\[", right: "\\]", display: true}
]

@algeboy mentioned using $your-expression$ as an inline delimiter. This is absolutely up to @algeboy and @joshmaglione and very easy to implement. However, if you use the $ as a delimiter, you must use \$ across the whole application to escape it. For this reason, I don't recommend using the $, but I can add it if requested.

Above is an example of a display: true expression, while below is an example of display: false expression. Notice how you can use expressions in a paragraph?

Untitled

joshmaglione commented 5 years ago

This is nice. I tested it out, and I like how it works.

@algeboy you may be interested in also using \begin{aligned} in the $$ environment. I tested this, and it looks good as well.

algeboy commented 5 years ago

This is really nice. Thanks!