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

Set Header and Footer for reveal.js pdf output using jupyter notebook python3.6.5 #411

Closed
danielhanbitlee opened this issue Aug 17, 2018 · 1 comment

Comments

@danielhanbitlee
Copy link

I want to set a header and footer for every slide of my presentation. I am using reveal.js (version 3.5.0) in jupyter notebook (python 3.6.5) installed via Anaconda on Windows 10 Ubuntu. I set up nbextensions (conda install -c conda-forge jupyter_nbextensions_configurator) so that I can add a header and footer. The slideshow generated using RISE from jupyter notebook shows the header and footer on every slide. However, when I generate html slides (jupyter nbconvert --to slides your_talk.ipynb --post serve), the header and footer disappear. Is there a way to fix this? I read the following posts and am still confused:

https://stackoverflow.com/questions/34706859/set-header-and-footer-reveal-js-presentation

hakimel/reveal.js#806

Any help would be greatly appreciated.

@danielhanbitlee
Copy link
Author

I actually found a workaround. I did the following:

  1. In Jupyter notebook <filename.ipynb>, I went to the first cell that will be presented as a slide. Cell type needs to be in markdown.

  2. Above the actual content of the cell, I put the following code:

<style>
//change background settings {}
div.slide-background {
	border-top: 30px crimson solid;
	border-bottom: 30px crimson solid;
}
</style>

Now, when I generate the slides and export to PDF, there's a header design and footer design on every slide. This is simple css code. If you know css, I'm sure you can make it as fancy as you want. Add images, write text, etc.

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

No branches or pull requests

1 participant