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

"\\" does not give newline in Markdown cell LaTeX #1037

Closed
darthoctopus opened this issue Oct 18, 2016 · 6 comments · Fixed by #2350
Closed

"\\" does not give newline in Markdown cell LaTeX #1037

darthoctopus opened this issue Oct 18, 2016 · 6 comments · Fixed by #2350

Comments

@darthoctopus
Copy link

In Markdown cell LaTeX blocks, "\" is not parsed as a newline (as it is in Jupyter notebook); one is required to give four consecutive backslashes ("\\"). When the notebook is subsequently opened in the Jupyter environment, LaTeX is then rendered differently again (which makes matrices etc. look awkward).

@lgeiger
Copy link
Member

lgeiger commented Oct 24, 2016

It's likely a problem with the commonmark parser.
In the markdown cell \\ will always render as \ as well.

@darthoctopus
Copy link
Author

Jupyter itself uses marked. Perhaps could use that instead? Would also guarantee cross-compatibility in future.

@jkornblum
Copy link
Member

Hello @lgeiger you're correct. It is being passed to MarkdownRenderer as "" not "\" via the common mark parser.

@darthoctopus may have a better idea but if we want a less elegant solution I've created a branch which uses regex to find $ - $ or $$ - $$ and then fix the issue but manually adding the additional backslashes. It worked with a few quick manual tests. I need to write some unit tests to cover any edge cases before a PR.

If people are okay with this, where exactly should this function go? I'm still trying to understand fully the program architecture with Redux, RxJS, etc.. I'm not sure the component .js file is the most appropriate place which is where I have it placed now.

You can see the code on my branch

error

@sglyon
Copy link

sglyon commented Nov 1, 2017

Just ran into this over on quantecon bookshelf... http://bookshelf.quantecon.org/submission/59fa1b45145fc3772b0cef82

Any chance this can be fixed so that latex parsing/handling in nteract matches that in juptyer notebook?

@rgbkrk
Copy link
Member

rgbkrk commented Jan 31, 2018

Closed by #2350.

@rgbkrk rgbkrk closed this as completed Jan 31, 2018
@lock
Copy link

lock bot commented May 1, 2018

Howdy! I'm 🔓🤖!

In order to keep information timely (based on the most recent release), we want all activity to be added to either new issues or open issues and PRs. In service to that goal, I, the lock bot close inactive closed issues when they haven't had activity in 120 days.

Feel free to open a new issue for related bugs and link to relevant comments from this thread.

@lock lock bot locked and limited conversation to collaborators May 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants