Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
moorepants opened this issue Jul 29, 2022 · 2 comments

Comments

@moorepants
Copy link

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.

@akhmerov
Copy link
Member

akhmerov commented Aug 9, 2022

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.

@moorepants
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants