0

This is essentially a follow up to my previous question. My IPython Notebook works fine with AMScd for commutative diagrams. However, the HTML file from nbconvert has commutative diagrams flattened! Here's my minimal (non)working example of an IPython Notebook cell containing a commutative diagram:

## A minimal (non)working example for AMScd

\begin{CD}
A @>a>> B\\
@AAA @AAA\\
C @>c>> D
\end{CD}

and please find a surreptitious image of output (to get around my reputation barrier!). I had to modify my Python Framework's site-packages/IPython/nbconvert/templates/mathjax.tpl to include:

TeX: {
    extensions: ["AMScd.js", "AMSsymbols.js", "boldsymbol.js", "cancel.js", "mathchoice.js", "newcommand.js", "unicode.js"]
}

in an attempt for the HTML conversion to go through successfully. Of course, this doesn't seem to quite work. Does anyone have experience with this, or know how to fix this? Thanks so much!

Community
  • 1
  • 1
  • It looks like the backslashes were stripped. What does the html source look like? – Peter Krautzberger Aug 26 '15 at 07:06
  • Peter: Thanks for that insight! That turned out to be exactly right! Somehow, the HTML conversion seems to be stripping off one of the backslashes in the LaTeX code. So the HTML file had something like: `A @>a>> B\ @AAA @AAA\ C @>c>> D` In this example, I added the extra backslash in the HTML file and it displays it fine. And, I can do so for all the places that I use commuting diagrams in my actual presentation as well. (A simple fix like escaping the backslashes in LaTeX doesn't work.) I presume this calls for reporting a bug? – Kaushik Kalyanaraman Aug 26 '15 at 14:49
  • It's a common problem of backslash as escape character. If other LaTeX environments are preserved (align etc), then it sounds like a bug. – Peter Krautzberger Aug 26 '15 at 15:12
  • That seems to be the case (other environments work fine). I will file a report with IPython/Jupyter bug reporting. Thanks! – Kaushik Kalyanaraman Aug 26 '15 at 15:47

0 Answers0