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 after block math not working #1584

Closed
WillNickols opened this issue Aug 23, 2022 · 7 comments
Closed

Latex after block math not working #1584

WillNickols opened this issue Aug 23, 2022 · 7 comments

Comments

@WillNickols
Copy link

It looks like text in which there is a latex in-line like $y=mx+b$ followed by a math block like

$$y=mx+b$$

followed by more latex in-line like $y=mx+b$ isn't currently working.

Removing the paragraph breaks between the math block and the in-line latex solves the initial rendering issue, but then using an aligned environment fails:
$$\begin{align*}
w_0&\leftarrow w_0-\alpha\frac{\partial L(\hat{y},y)}{\partial w_0}\
w_1&\leftarrow w_1-\alpha\frac{\partial L(\hat{y},y)}{\partial w_1}
\end{align*}$$

even though it otherwise works:

$$\begin{align*} w_0&\leftarrow w_0-\alpha\frac{\partial L(\hat{y},y)}{\partial w_0}\\ w_1&\leftarrow w_1-\alpha\frac{\partial L(\hat{y},y)}{\partial w_1} \end{align*}$$

This didn't seem to be an issue as of a week ago. Are there any known workarounds?
Thanks!

@devindg
Copy link

devindg commented Aug 23, 2022

I'm having the same exact problem, which I noticed today. It was working not that long ago.

For reference, below is the markdown that is not rendering correctly. The paragraph after the math block $$...$$ is not rendering the inline math.

Model

A structural time series model with level, trend, seasonal, and regression components takes the form:

$$ y_t = \mu_t + \gamma_t + \mathbf x_t^\prime \boldsymbol{\beta} + \epsilon_t $$

where $\mu_t$ specifies an unobserved dynamic level component, $\gamma_t$ an unobserved dynamic seasonal component, $\mathbf x_t^\prime \boldsymbol{\beta}$ a partially unobserved regression component (the regressors $\mathbf x_t$ are observed, but the coefficients $\boldsymbol{\beta}$ are not), and $\epsilon_t \sim N(0, \sigma_{\epsilon}^2)$ an unobserved irregular component. The equation describing the outcome $y_t$ is commonly referred to as the observation equation, and the transition equations governing the evolution of the unobserved states are known as the state equations.

@samlouiscohen
Copy link

Experiencing this issue as well. Every paragraph after the first fails to properly render.

@ghost
Copy link

ghost commented Aug 27, 2022

Experiencing this issue as well. Some inline formulas cannot be rendered, but block-level formulas can be rendered normally. There are also some bugs, such as displaying $\tag{1}$ in long formula, which is very badly formatted in LaTeX notation.

image
image

@devindg
Copy link

devindg commented Aug 30, 2022

It seems like this repo is not very active. We may have to consider alternative options for displaying math.

@ghost
Copy link

ghost commented Aug 31, 2022

It seems like this repo is not very active. We may have to consider alternative options for displaying math.

gitlab may be an option, but unfortunately it does not support the syntax of the $ $ format inline math, so many contents cannot be migrated.

@LordFckHelmchen
Copy link

A workaround is to use a [math-block]( instead of $$ to signify the latex code block (see here for more details on why). This however, is not rendered in VS Code.

Copy link

Stale issue message

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

No branches or pull requests

4 participants