Use MathML for math formatting#155
Use MathML for math formatting#155MatthijsBlom wants to merge 7 commits intolearnyouahaskell:mainfrom
Conversation
|
I like it! For few second, I was hesitant because the previous syntax was closer to code. But, we are talking math, so the visual make sense. If you can upload it somewhere, I can test on my iDevice and check if render similar. Thanks! |
ulysses4ever
left a comment
There was a problem hiding this comment.
Great contribution, thanks!
Small comments inline.
| For instance, the fibonacci sequence is defined recursively. | ||
| First, we define the first two fibonacci numbers non-recursively. | ||
| We say that *F(0) = 0* and *F(1) = 1*, meaning that the 0th and 1st fibonacci numbers are 0 and 1, respectively. | ||
| We say that $F(0) = 0$ and $F(1) = 1$, meaning that the 0<sup>th</sup> and 1<sup>st</sup> fibonacci numbers are $0$ and $1$, respectively. |
There was a problem hiding this comment.
there's a Pandoc option for superscripts: https://pandoc.org/MANUAL.html#extension-superscript-subscript
There was a problem hiding this comment.
Ah, so that's why there were these paired ^s in the polynomials.
| If you evaluate that by typing out `triangles` in GHCi, you'll get a list of all possible triangles with sides under or equal to 10. | ||
| Next, we'll add a condition that they all have to be right triangles. | ||
| We'll also modify this function by taking into consideration that side *a* isn't larger than the hypotenuse and that side *b* isn't larger than side *a*. | ||
| We'll also modify this function by taking into consideration that side $a$ isn't larger than the hypotenuse and that side $b$ isn't larger than side $a$. |
There was a problem hiding this comment.
is there a good reason to switch from * to $? the former looks simpler to me and I naturally prefer simpler approaches.
There was a problem hiding this comment.
No, this one is really up to personal preferences.
| ## Function composition {#composition} | ||
|
|
||
| In mathematics, function composition is defined like this: , meaning that composing two functions produces a new function that, when called with a parameter, say, *x* is the equivalent of calling *g* with the parameter *x* and then calling the *f* with that result. | ||
| In mathematics, function composition is defined like this: $\left( f \circ g \right) (x) = f \left( g(x) \right)$, meaning that composing two functions produces a new function that, when called with an argument, say, $x$ is the equivalent of calling $g$ with the argument $x$ and then calling the $f$ with that result. |
There was a problem hiding this comment.
do you really need to use \left and \right in these?
There was a problem hiding this comment.
I personally prefer same-sized parenthesis for expressions as simple as these for uniformity sake. I only resort to \left and \right when the expressions are big and it's hard to match the parenthesis. But I don't feel too strong about it in this case.

For now this is only a proof of concept.
If this direction is appreciated, I might look into it further.
To Do: