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

Latex ipython template: draw a vertical line left of ipython code #789

Closed
wants to merge 1 commit into from

Conversation

timhoffm
Copy link

@timhoffm timhoffm commented Mar 27, 2018

This PR adds vertical lines to the left of code blocks in Latex output. The lines are colored in the respective input/output color.

IMHO this greatly improves readability as it's easier to distinguish between code and text and between input and output. Also it helps to see which code was originally grouped in the cells.

See the following example:

grafik

grafik

@blink1073
Copy link
Contributor

Thanks, @timhoffm! @tgeorgeux, does this look good to you?

@blink1073 blink1073 modified the milestones: 5.4, 5.5 Aug 29, 2018
@Carreau
Copy link
Member

Carreau commented Aug 30, 2018

I like it.

Copy link

@tgeorgeux tgeorgeux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. Thank you for doing this @timhoffm !

@t-makaro
Copy link
Contributor

Can we reconsider? I don't like that this occurs at the document_contents.tplx level. I have a template that's designed to mimic the notebook more closely here.

image

The extra line is super out of place in my templates, and I'll have to overwrite this change.

@t-makaro
Copy link
Contributor

t-makaro commented Aug 30, 2018

I also really don't like that the line extends to the extra newline, and that the line is to the left of the prompt and not between the prompt and the code (but I understand that with the implementation that that's not easy).

Since this is a stylistic thing, I think it should occur at the level of style_type.tplx, and not document_contents.tplx if at all.

@t-makaro
Copy link
Contributor

I also just realised that this change will mess with people who use nbconvert to produce reports by hiding the code from the converted document since the lines will again be out of place.

@mgeier
Copy link
Contributor

mgeier commented Oct 3, 2018

Just for reference, here's how I'm planning to re-design the LaTeX representation of code cells in nbsphinx: spatialaudio/nbsphinx#218.

@MSeal
Copy link
Contributor

MSeal commented Apr 23, 2019

I'm going to remove the 5.5 milestone on this PR, as we're about to release and there hasn't been a resolution to concerns raised sufficient to warrant merging, changing, or closing the PR imho.

@MSeal MSeal removed this from the 5.5 milestone Apr 23, 2019
@mgeier
Copy link
Contributor

mgeier commented Apr 23, 2019

There is an IMHO more promising approach in #992.

@timhoffm
Copy link
Author

Closing in favor of #992.

@timhoffm timhoffm closed this Apr 23, 2019
@timhoffm timhoffm deleted the ipython-latex-styling branch April 23, 2019 10:15
@timhoffm timhoffm restored the ipython-latex-styling branch April 23, 2019 10:15
@MSeal MSeal added this to the no action milestone Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants