hiding notebook cells from printing

Hi there,

How would you hide some notebook cells from printing?

What do you mean? How do you select only some cells in a notebook to embed? Can you share a more elaborate problem statement?

Just checking… you are asking about printing the normal notebook view (not an embedded view) and using your browser’s print function? I don’t think that is possible. However, @aaronkyle is leading to a good solution, which is to use the embedded view of the notebook, where you can specify which cells to include in the embed (output only, not the editors) if you name the cells you want to output.

Thanks for your replay.

By printing some notebook cells I mean to use my web browsers print function. Currently I am able to print all notebook, obviously. What I would like to achieve is to select cells to print (eg. by a CSS class that uses @media print query, if there is way to link a custom CSS style with media query). This way I can hide from printing some cells that I don’t want to be printed.

I will take a look at embedded notebook you mentioned, thanks for the suggestion.

Here is an example of how you could do this with the @media print idea.



Simple and dirty, but does the job! I had to provide a list of each child index in the stylesheet cell.

Thanks for pointing me to the solution.

1 Like