jupyter/jupyter-sphinx

Is there a way to have the input and output cells in the LaTeX version differentiable?

moorepants opened this issue · 2 comments

Here is an example input and output cells in HTML and a LaTeX pdf:
image

Notice how the HTML has the grey background to distinguish input from the output, but in the PDF there is no background color differentiation. Is there a (simple) way to get some input/output differentiation in the PDF? Or, if not, maybe there is an appropriate location in the stack (jupyter, sphinx, nbconvert, etc.) where I should do some hacking to implement this? Even adding the Python >>> input prompt on the input cells could help.

It's definitely possible, but it requires figuring out the latex markup generated by sphinx and modifying it. I don't think my latex-fu is strong enough.

I can probably figure out the latex, but I'm not quite sure where to start. Can you give a pointer of where I should be looking to modify things? Would I be subclassing some kind of writer in Sphinx or something?