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

Math without $$ doesn't show up when converted to slides #4234

Closed
ketch opened this issue Sep 19, 2013 · 12 comments
Closed

Math without $$ doesn't show up when converted to slides #4234

ketch opened this issue Sep 19, 2013 · 12 comments
Assignees
Milestone

Comments

@ketch
Copy link

ketch commented Sep 19, 2013

The IPython notebook now (wonderfully) recognizes latex that is delimited by, say \begin{align} and no dollar signs. But if converted to slides, any math without dollars around it is lost.

@ahmadia
Copy link
Contributor

ahmadia commented Sep 19, 2013

How are you converting to slides? Are you referring to the Javascript slideshow mode or using nbconvert? The former works fine for me, I have not tested the latter. I suspect this is a simple fix in terms of moving the appropriate MathJaX configuration over.

@ketch
Copy link
Author

ketch commented Sep 20, 2013

I'm just doing

ipython nbconvert --to='slides' *.ipynb --post serve

Is there a better way?

@damianavila
Copy link
Member

Are you seeing the same behaviour when you comvert to html, or just with the conversion to slides?

@ketch
Copy link
Author

ketch commented Sep 21, 2013

I see the same thing when I convert to html. I see this problem in Chrome, Safari, and Firefox.

I think this may be a pandoc issue. I seem to recall something similar that @ahmadia and I dealt with once in the past (when working with Gitit).

@damianavila
Copy link
Member

I will try investigate further... thank for report this...

@ahmadia
Copy link
Contributor

ahmadia commented Sep 21, 2013

I'm not sure if pandoc is being called with --parse-raw, but it may fix
this issue.

On Sat, Sep 21, 2013 at 2:43 PM, Damián Avila notifications@github.comwrote:

I will try investigate further... thank for report this...


Reply to this email directly or view it on GitHubhttps://github.com//issues/4234#issuecomment-24868273
.

@jakobgager
Copy link
Contributor

I fear even the --parse-raw will not be enough here as pandoc strips raw latex when converting to html (http://johnmacfarlane.net/pandoc/README.html#raw-tex). We are currenlty working on a similar issue here #3503 when converting to latex. Maybe something similar could be added here?

@jakobgager
Copy link
Contributor

I just discovered, the easiest way to get your tex math (align) working is to embed it in $s. This way it gets "masked" and is not stripped by pandoc.
In a markdown cell:

$\begin{align}
1 & 2\\
4 & 3
\end{align}$

\begin{align}
a & b\\
d & c
\end{align}

works fine in notebook but after conversion the first works fine whereas the second align ins stripped
screen

@ahmadia
Copy link
Contributor

ahmadia commented Sep 21, 2013

That's a workaround, but I think we'd all prefer if the mathjax gets passed
straight through. It looks like this will require either a patch or a
pandoc plugin.

On Sat, Sep 21, 2013 at 4:03 PM, Jakob Gager notifications@github.comwrote:

I just discovered, the easiest way to get your tex math (align) working is
to embed it in $s. This way it gets "masked" and is not stripped by
pandoc.
In a markdown cell:

$\begin{align}1 & 2\4 & 3\end{align}$
\begin{align}
a & b
d & c\end{align}

works fine in notebook but after conversion the first works fine whereas
the second align ins stripped
[image: screen]https://f.cloud.github.com/assets/1677740/1186390/9024c530-22f8-11e3-8a7e-9baf375f570f.png


Reply to this email directly or view it on GitHubhttps://github.com//issues/4234#issuecomment-24869618
.

@ketch
Copy link
Author

ketch commented Sep 21, 2013

@jakobgager That's just what the title of the issue says.

@jakobgager
Copy link
Contributor

That's just what the title of the issue says.

True 😜

@minrk
Copy link
Member

minrk commented Jan 29, 2014

This should be fixed now that we use marked for md2html

@minrk minrk closed this as completed Jan 29, 2014
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

6 participants