jekyll-theme-yat icon indicating copy to clipboard operation
jekyll-theme-yat copied to clipboard

Latex equations numbering, referencing, and correct display of "cases".

Open dariosanfilippo opened this issue 1 year ago • 1 comments

Hello, people.

I'm noticing that the YAT example https://jeffreytse.github.io/jekyll-theme-yat/markdown/2016/01/01/another-test-markdown.html shows a few examples of Latex code but it appears that some of it is not being displayed correctly; for example, the blocks below the integrals.

I am also experiencing issues in correctly formatting the "cases" environment; specifically, it appears that the double back-slash is not taken correctly place the cases in separate lines. Also, I wonder if it'd be possible to indent the output for each condition to the right. To give you an idea, I would expect the following Latex code

$$
y[n] = \begin{cases}
    y_0 & \text{if } n = 0 \\
    x[n] + \alpha (y[n-1]-x[n]) & \text{if } n > 0
\end{cases}
$$

to produce this output

image

whereas this is what I get

image.

Furthermore, I'd appreciate if you could provide a way to automatically enable equation numbering, and if you know a working way to correctly reference equations, as the standard \label{} \eqref{} don't seem to work here.

Thank you for your help.

Dario

dariosanfilippo avatar Dec 24 '23 17:12 dariosanfilippo

OK, it seems that the problem was that the the cases where formatted into separate lines; it works if I rewrite the Latex equations like this:

$$
y[n] = \begin{cases} 
y_0 & \text{if } n = 0 \\ x[n] + \alpha (y[n-1]-x[n]) & \text{if } n > 0
\end{cases}
$$

I'm not sure why that's the case.

Best, Dario

dariosanfilippo avatar Dec 25 '23 12:12 dariosanfilippo