Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dariosanfilippo opened this issue Dec 24, 2023 · 1 comment

Comments

@dariosanfilippo
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant