[IPython-dev] Numbered lines after using nbconvert?

Fernando Perez fperez.net at gmail.com
Tue Oct 29 20:22:15 EDT 2013

Hi Eric,

I don't think we have any out-of-the-box flags for this, but if I recall
correctly, pygments does have line numbering support. So a bit of playing
with the templates should easily do it.

You can find some nbconvert customization examples here:




On Sun, Oct 20, 2013 at 4:05 PM, Eric Matthes <ehmatthes at gmail.com> wrote:

> I just realized you can use Ctrl-M L to turn line numbering on in a cell,
> but I notice that those numbers are not visible when I view a notebook
> through IPython Notebook Viewer. After I use nbconvert on a notebook with
> the numbers visible, the resulting html file does not have line numbers.
> Is there a way to have the line numbers included in the html output when
> using nbconvert?
> Eric
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131029/4f87a1cb/attachment.html>

More information about the IPython-dev mailing list