-
Notifications
You must be signed in to change notification settings - Fork 44
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
Expose the Latex PDF exporter #16
Conversation
I'm fine with this, but we need to use a different icon so users can tell the difference. |
Do you have a preference of icons? In my testing, the latex PDF export did hide code. I've also got a commit waiting that allows hiding outputs. Which seems like a bad idea on the outset but I had a cell with undesirable outputs and streams that I couldn't silence. |
No preference. I'm currently only using those that ship with Jupyter; Font Awesome 4.2 I think.
Might be the prompt hiding that doesn't work in the latex PDF exporter.
Great! I've been meaning to do this too. |
I've changed it to the generic file-o icon. Actually, prompt hiding seemed to work too. |
I'm going to hold off merging this with the master branch until the Latex PDF exporter template is fixed. When ever Hide code is selected, the exporter hides the code and the output for the cell. |
Would you mind if I merge the hide-ouput change set into this pull request? I know it is more proper to separate changes, but it is going to be significantly easier for me to work on the template in view of the final result, rather than trying to stage things. |
I believe the latest revision handles this case properly. Question: Currently code and prompts are hidden independently. Would it make sense that whenever hiding a particular code cell the associated prompt is also hidden? I'm not sure of the use case for the current behavior. |
You can merge changes into one PR. Just pull down any changes from the dev branch. I've patched several bugs since the last commit on master. My original intention was to have the hide code toolbar button toggle prompts and code together. Then provide more granular customization through the cell toolbar. However, the main toolbar button status isn't persisted in the notebook's metadata. This is another item on the to do list. |
The current state of the branch should allow a prompt to appear without its associated code or output and vice versa. I think this more closely follows the behavior you had implemented for the HTML output. Just to be clear, the desired behavior is that the Hide/Show Code button in the toolbar immediately hide all code and prompts (and save the status in the notebook metadata to be reflected in downloads). Clicking the button a second time shows elements again, but only elements that have not been hidden individually by a cell toolbar checkbox. Does that sound about right? |
Sounds good, I'll take a look. I'd want to keep the behavior consistent between all exporters.
Correct, the button is meant as an "easy" button if a user wants to hide everything. I'll review the updates and try to get everything documented and packaged this weekend. Thanks for contributing! |
I was looking to add code and prompt hiding to the Latex PDF output included with Jupyter Notebook. Your extension does this nicely, but for some reason doesn't expose the functionality. I've found that the Latex output is a bit nicer than the HTML based output for my uses. It doesn't break pages in the middle of images leaving half of the image on each page as can happen with the HTML based PDF output.