[IPython-User] ipython notebook codeblock with greaterthan
Jakob Gager
gager@ilsb.tuwien.ac...
Wed Jan 16 00:32:10 CST 2013
On 01/15/2013 06:27 PM, MinRK wrote:
> >
> > To really get a greater sign (and no blockquote) you can use the html code > (don't forget the
> semicolon).
> >
> > #> ls.dat # works fine!
>
> I would suggest avoiding html entities, That would not support conversion to Tex/rst/pdf… with nbconvert.
> Usually you can escape the Markdown delimiter with \ (backslash), it does not work on this case,
> but starting the line with a non breaking space does the trick here.
>
>
> I don't think this comment is accurate. Markdown is 100% intended to include inline html, and any
> converter should expect this to be the case. Pandoc, for instance, handles html entities inside markdown
> just fine. If nbconvert can't handle html entities in markdown, this is just a bug in nbconvert.
>
Well, unfortunately this is only partially true. Pandoc handles html entries in markdown only if the
target format supports those (e.g. target = html) -
see http://johnmacfarlane.net/pandoc/README.html#raw-html.
However, if you want to convert markdown to latex, the html entities are simply removed and won't show up
in the tex file. That's why Matthias suggested to avoid html entities in the notebook (I guess).
So this "bug" is not related to nbconvert but is rather a result of the way pandoc handles html entities
in markdown. (I'm currently working on this markdown-html2latex conversion in my nbconverter)
Jakob
More information about the IPython-User
mailing list