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

Align Environment can't work with latex_envs extnesion #720

Closed
shanhaiying opened this issue Aug 12, 2016 · 4 comments
Closed

Align Environment can't work with latex_envs extnesion #720

shanhaiying opened this issue Aug 12, 2016 · 4 comments

Comments

@shanhaiying
Copy link

shanhaiying commented Aug 12, 2016

The latex environments such as align,align*, aligned, split etc. can't work well in theorem, lemma etc. latex environments.

Such as
\begin{theorem} $$ \begin{aligned} f(x)&=\chi_{A_i}(x)\\ =&g(x) \end{aligned} $$ \end{theorem}
image

If we change code as the following:
\begin{theorem} $$ \begin{aligned} f(x)&=\chi_{ A_i}(x)\\ =&g(x) \end{aligned} $$ \end{theorem}

It works well.

image

@jcb91
Copy link
Member

jcb91 commented Aug 12, 2016

I don't really follow what's changed from the first code example to the second?

@jfbercher
Copy link
Member

There is an extra whitespace.
This is linked to the _{A_i which may be interpreted as markdown emphasis. I will look at it.

jfbercher added a commit to jfbercher/jupyter_contrib_nbextensions that referenced this issue Aug 14, 2016
jfbercher added a commit to jfbercher/jupyter_contrib_nbextensions that referenced this issue Aug 15, 2016
@jfbercher
Copy link
Member

I have included a quick fix in commit a7b3168 lines 143-144 (the full PR #714 is pending for now - you may just copy the two lines).

This is a bit ad-hoc for now. Actually the problem comes from the fact that latex_envs enable to mix markdown and $\LaTeX$ in environnements. Markdown was replaced in the formula, resulting in the replacement of \\ by a single \.

I have to find a better way to do that because it might subsist other issues. Have a small idea of a way to go, but it will lead to refactor many things.

@jfbercher
Copy link
Member

This is solved in the latex_envs version provided in #746.
Issue can be closed.

@jcb91 jcb91 closed this as completed Nov 25, 2016
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

3 participants