Skip to content

Latex after block math not working #1584

Closed

Description

@WillNickols

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!

Activity

  1. devindg commented on Aug 23, 2022

    @devindg

    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.

  2. samlouiscohen commented on Aug 25, 2022

    @samlouiscohen

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

  3. devindg commented on Aug 30, 2022

    @devindg

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

  4. LordFckHelmchen commented on Jan 23, 2024

    @LordFckHelmchen

    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.

  5. github-actions commented on Aug 11, 2024

    @github-actions

    Stale issue message

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址