Skip to content

LaTeX: Better placement of non-text code cell output #892

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

Closed
wants to merge 3 commits into from

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Oct 2, 2018

I did the same thing for nbsphinx in spatialaudio/nbsphinx@fc4fe32, so I thought I'll just apply the same trick here.

Before:

grafik

After:

grafik

Obviously, the vertical distance to the next paragraph is still too short, but I didn't know what's the best way to fix this. It's not obvious to me, any ideas?

@mgeier
Copy link
Contributor Author

mgeier commented Oct 2, 2018

OK, I tried to improve the distance a bit (1f617c3), but the spacing is still off.

IMHO there is too much space between code cell inputs and outputs and too little space after the outputs.

grafik

@mgeier
Copy link
Contributor Author

mgeier commented Oct 2, 2018

BTW, I forgot to mention that I made above screenshots with ipython/ipython#11357 in place. Without that, the math stuff would be centered.

@mgeier
Copy link
Contributor Author

mgeier commented Oct 4, 2018

Just a little update: Please note that my PR here adds a minipage around the output, therefore making page breaks within the output impossible. That's not good!

In the meantime I've come up with a way to change this in nbsphinx (spatialaudio/nbsphinx#218), but this uses some Sphinx machinery, so sadly this isn't applicable here.

Hopefully somebody else comes up with a proper solution for nbconvert.

See also #323.

@t-makaro
Copy link
Contributor

This could probably be redone within the new #992 template. Right now, text outputs are placed within a breakable tcolorbox. Image outputs could be placed within an unbreakable tcolorbox which would fix the issue with prompts appearing on a different page then the image. What outputs, other than text, need to be in a breakable box?

@mgeier
Copy link
Contributor Author

mgeier commented Jun 25, 2019

@t-makaro

What outputs, other than text, need to be in a breakable box?

I guess there is plain text, Markdown and "stream" text (potentially with ANSI escape sequences).

Anyway, after the recent LaTeX improvements, this PR is obsolete and can be closed.

@t-makaro t-makaro closed this Jun 25, 2019
@mgeier mgeier deleted the latex-prompts branch June 25, 2019 20:39
@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.

3 participants