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

Add block to allow customizing html output prompt #500

Merged
merged 3 commits into from Dec 28, 2016

Conversation

Projects
None yet
3 participants
@eddiejessup
Copy link
Contributor

eddiejessup commented Dec 21, 2016

For generating HTML reports I usually want to completely hide cells' output, apart from a select few types such as HTML and images. I can almost accomplish this with a custom template inheriting from full.tpl, except that I can't hide the output prompt without hiding the cell output itself. I can if I add this block.

@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Dec 21, 2016

Thanks, I think this is a reasonable addition.

Can you add it to the template structure doc, which is rendered at:
http://nbconvert.readthedocs.io/en/stable/customizing.html#Template-structure

@mpacer

This comment has been minimized.

Copy link
Member

mpacer commented Dec 22, 2016

Should be good to go.

<div class="template_block">execute_result</div>
<div class="template_block">output_area_prompt
<div class="template_block">execute_result</div>
</div>

This comment has been minimized.

@takluyver

takluyver Dec 22, 2016

Member

I don't think this is quite right:

  1. The new block goes before the output content blocks (like execute_result), not wrapping them.
  2. The new block is only in the HTML template; there's a separate section below for extra blocks in the HTML template.
Update template structure with new HTML block
Added a block around the HTML template's version of the cell output
prompt.

@eddiejessup eddiejessup force-pushed the eddiejessup:master branch from 8e6cc46 to 0d158c6 Dec 22, 2016

@eddiejessup

This comment has been minimized.

Copy link
Contributor Author

eddiejessup commented Dec 22, 2016

Hey @michaelpacer, based on @takluyver's comments I dropped your commit, but thanks for helping out, I definitely wouldn't have noticed I needed to update the notebook otherwise!

@takluyver, I think the HTML structure is now correct. I wasn't sure how best to state the block inheritance, so I just went for an explicit {% super %}, hope this doesn't make the document show too much implementation guts. If you can think of a nicer way to express this, I'd be happy to change it.

@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Dec 23, 2016

Thanks! I think {% super %} is too much implementation guts. Can we say something like 'output type as above'? There's already an 'as above' in the Latex section below. Better wording welcome.

@eddiejessup

This comment has been minimized.

Copy link
Contributor Author

eddiejessup commented Dec 26, 2016

@takluyver thanks for the feedback! I think all done.

@takluyver takluyver added this to the 5.1 milestone Dec 28, 2016

@takluyver takluyver merged commit 4b2a3a2 into jupyter:master Dec 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Dec 28, 2016

Thanks :-)

@mpacer

This comment has been minimized.

Copy link
Member

mpacer commented Dec 28, 2016

This may have broken rtd.

@eddiejessup

This comment has been minimized.

Copy link
Contributor Author

eddiejessup commented Dec 28, 2016

@michaelpracer hey, sorry what's rtd mean?

@eddiejessup

This comment has been minimized.

Copy link
Contributor Author

eddiejessup commented Dec 28, 2016

@michaelpacer

@mpacer

This comment has been minimized.

Copy link
Member

mpacer commented Dec 28, 2016

@eddiejessup

This comment has been minimized.

Copy link
Contributor Author

eddiejessup commented Dec 29, 2016

Thanks for catching this. I'm not familiar with how readthedocs works, where can I see its build details? I can see that it looks like the ipython notebook with the template structure is shown there, but the PR changes aren't reflected, even in its 'latest' version.

@juhasch juhasch referenced this pull request Jan 6, 2017

Merged

Readme and docs #833

@takluyver

This comment has been minimized.

Copy link
Member

takluyver commented Jan 6, 2017

I think Mike has got it working again, but for the record, you can see RTD build logs here: https://readthedocs.org/projects/nbconvert/builds/

@mpacer

This comment has been minimized.

Copy link
Member

mpacer commented Jan 6, 2017

I think it ended up being independent of this PR per se (it was just what triggered the most recent failure), so no worries.

@juhasch juhasch referenced this pull request Jan 6, 2017

Merged

Remove strip_output_prompt #836

@mpacer mpacer added unlogged and removed unlogged labels Jan 21, 2017

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