# [IPython-User] printing nbconverted html doc loses color

Damián Avila damianavila@gmail....
Wed Oct 2 06:28:09 CDT 2013

I agree with you... I will make a PR and we will see what others think

Cheers.

2013/10/2 G B <g.c.b.at.work@gmail.com>

> Thanks!  That did it!  I edited by hand rather than run the script, but
> that's the reason I was losing color.  It's also the reason I was losing
>
> Since there's really no way to override these settings further down the
> line, I wonder if it makes sense to remove them from the default CSS.  I
> suspect that they're there so color text does't print grey on a monochrome
> printer, but I'm printing to PDF and to color printers.  If they're
> removed, then I can add them through custom.css, but if they're there I
> can't remove them without hacking the source.
>
>
> On Tue, Oct 1, 2013 at 8:33 PM, Damián Avila <damianavila@gmail.com>wrote:
>
>> Hi,
>> Probably the missing coloring is because the u'@mediaprint{*{text-shadow:none !important;color:#000 !important'... in
>> the ipython.css.min which nbconvert load to get the final static html
>> file...
>>
>> You can use a little hack like this (with some adjustments)
>> https://gist.github.com/damianavila/6211211 to make this work...
>> Try it and let me know if you need some help.
>>
>> Cheers.
>>
>> 2013/10/1 G B <g.c.b.at.work@gmail.com>
>>
>>> I'm not sure this is an IPython problem, but it happens across browsers
>>> so I figured I'd ask here:
>>>
>>> I have an notebook document that I've run through nbconvert into html.
>>>  I have a custom.css in the directory.  The text is colorized due to the
>>> css and due to the standard syntax coloring within notebook.  It looks
>>> great in the browser!
>>>
>>> Then I try to print, and both Safari and Firefox take all of the color
>>> out of the text.  Images retain their color, but both my css changes and
>>> the syntax highlighting are removed.  Bold and other font face changes are
>>> retained.  This happens when sending to a color printer and when printing
>>> to PDF through the standard OS X mechanism.
>>>
>>> Am I doing something wrong here?
>>>
>>> Thanks!
>>>
>>> _______________________________________________
>>> IPython-User mailing list
>>> IPython-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>
>>>
>>
>>
>> --
>> Damián Avila
>> Scientific Python Developer
>> Quantitative Finance Analyst
>> Statistics, Biostatistics and Econometrics Consultant
>> Biochemist
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>

--
Damián Avila
Scientific Python Developer
Quantitative Finance Analyst
Statistics, Biostatistics and Econometrics Consultant
Biochemist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20131002/b6fa34cd/attachment-0001.html