Nbconvert syntax coloring in latex

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Nbconvert syntax coloring in latex

david_co
This post has NOT been accepted by the mailing list yet.
Is there a way to change the default style of the code highlighting (the colouring) of the nbconvert to latex?

I was trying to modify the file

/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/filters/highlight.py

and use something like

latex = _pygments_highlight(source, LatexFormatter(style='monokai'), language, metadata)

in the Highlight2Latex class.

When I convert my ipynb file, I don't get errors, but the style is still the same


Regards,
David