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 align environment in markdown cell cannot be rendered correctly unless there is an empty line above it. #590

Closed
zhangyi-hu opened this issue Mar 27, 2016 · 4 comments
Labels
status:Resolved We believe the issue is no longer a problem for users. tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example type:Bug An unexpected behavior

Comments

@zhangyi-hu
Copy link

zhangyi-hu commented Mar 27, 2016

Please take a look at this link where a minimal example reproducing the problem is presented.
http://nbviewer.jupyter.org/github/hzzyyy/try/blob/master/latex%20align%20env%20bug.ipynb

@minrk
Copy link
Member

minrk commented Apr 6, 2016

There are several cases where an empty line is needed to render exactly right, and there are a few subtle differences like this between the markdown rendering we use in nbconvert (mistune) and the live notebook (marked).

@zhangyi-hu
Copy link
Author

One way of avoiding this problem on the user side is to enclose the align environment with $$. for example:
$$
\begin{align}
\end{align}
$$

@mgeier
Copy link

mgeier commented Apr 23, 2016

@hzzyyy Note that using $$ to enclose the environment will not work if you convert the notebook to LaTeX!

The only proper way to do it is to place the LaTeX environment in a paragraph on its own (i.e. insert empty lines to separate the environment from other text paragraphs), as @minrk said.

BTW, this also looks nicer when you edit the Markdown cell!

@parente
Copy link
Member

parente commented Jul 14, 2018

@hzzyyy The first cell in the original notebook to reproduce the bug renders correctly today on nbviewer. It still doesn't work on GitHub, but we don't control that implementation.

I'm going to close this out as resolved sometime in the past 2 years.

@parente parente closed this as completed Jul 14, 2018
@parente parente added type:Bug An unexpected behavior status:Resolved We believe the issue is no longer a problem for users. tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example labels Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:Resolved We believe the issue is no longer a problem for users. tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example type:Bug An unexpected behavior
Projects
None yet
Development

No branches or pull requests

4 participants