Ask Your Question
1

hide the entries when export html

asked 2021-11-17 04:42:01 +0100

ErWinz gravatar image

updated 2023-08-13 10:08:01 +0100

FrédéricC gravatar image

hi i export to html to put on my servor so that students can see the graphs how can i hide the entries, keeping visible on the html only the outputs ? Vinz

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2021-11-17 14:09:05 +0100

rburing gravatar image

When you download a Jupyter notebook as HTML, nbconvert is used to do the conversion. The nbconvert program is highly flexible when you use it directly from the command line or as a library (the "Download as" functionality in Jupyter notebooks just uses this program with some specific sets of arguments). Using nbconvert as a library shows how to extract figures. Removing cells, inputs, or outputs is also possible. So, with some programming effort it should be possible to automate what you want to do with a single call to nbconvert.

edit flag offensive delete link more
0

answered 2021-11-17 11:46:07 +0100

slelievre gravatar image

One can

  • save 2D graphics to png
  • save 3D graphics to html

and they are then easy to include in web pages.

Examples:

sage: parabola = plot(lambda x: x^2, (-1, 1))
sage: parabola.save('parabola.png')

sage: xyz = (lambda u, v: u*cos(v), lambda u, v: u*sin(v), lambda u, v: u^2)
sage: paraboloid = parametric_plot3d(xyz, (0, 1), (0, 2*RDF.pi()))
sage: paraboloid.save('paraboloid.html')
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-11-17 04:42:01 +0100

Seen: 230 times

Last updated: Nov 17 '21