ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 04 Feb 2024 11:51:37 +0100Dark Mode Jupyter Notebookhttps://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/ Is it possible to somehow view the Jupyter notebook for Sagemath in Dark Mode? If yes, how?Tue, 26 Dec 2023 20:16:28 +0100https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/Comment by yeetcode for <p>Is it possible to somehow view the Jupyter notebook for Sagemath in Dark Mode? If yes, how?</p>
https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75798#post-id-75798The browser still reads CSS which it is told to read from somewhere. Finding that was particularly painful. Turns out, running `!jt -r` inside the notebook, which is just supposed to bring settings to default, also tells you the directories where modifications were made, and I think from that point onwards, the daring can even write their own CSS instead of using Jupyterthemes as shown below, and have fun.Sun, 04 Feb 2024 11:51:37 +0100https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75798#post-id-75798Comment by Emmanuel Charpentier for <p>Is it possible to somehow view the Jupyter notebook for Sagemath in Dark Mode? If yes, how?</p>
https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75158#post-id-75158ISTR that this is a function of the *browser* you use to display Jupyter...Wed, 27 Dec 2023 09:53:15 +0100https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75158#post-id-75158Answer by Cyrille for <p>Is it possible to somehow view the Jupyter notebook for Sagemath in Dark Mode? If yes, how?</p>
https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?answer=75194#post-id-75194You can work along those lines from within a notebook
`pip install jupyterthemes`
If you typset
`!jt -1`
you will obtain the 9 proposed themes that is 1) chesterish, 2) grade3, 3) gruvboxd, 4) gruvboxl, 5) monokai, 6) oceans16, 7) oceans16, 7) onedork, 8) solarizedd 9) solarizedl
to load one or the other of those themes, the command are
`from jupyterthemes import get_themes`
`import jupyterthemes as jt`
`from jupyterthemes.stylefx import set_nb_theme`
`set_nb_themes('the themes you want')`
to go back to the standard themes
`!jt -r`
Hope I have not written a mistake.Fri, 29 Dec 2023 11:30:32 +0100https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?answer=75194#post-id-75194Comment by yeetcode for <p>You can work along those lines from within a notebook</p>
<p><code>pip install jupyterthemes</code></p>
<p>If you typset</p>
<p><code>!jt -1</code></p>
<p>you will obtain the 9 proposed themes that is 1) chesterish, 2) grade3, 3) gruvboxd, 4) gruvboxl, 5) monokai, 6) oceans16, 7) oceans16, 7) onedork, 8) solarizedd 9) solarizedl</p>
<p>to load one or the other of those themes, the command are </p>
<p><code>from jupyterthemes import get_themes</code></p>
<p><code>import jupyterthemes as jt</code></p>
<p><code>from jupyterthemes.stylefx import set_nb_theme</code></p>
<p><code>set_nb_themes('the themes you want')</code></p>
<p>to go back to the standard themes</p>
<p><code>!jt -r</code></p>
<p>Hope I have not written a mistake.</p>
https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75754#post-id-75754Thanks! Your method of loading the themes didn't work (in particular my notebook couldn't find jupyterthemes), but the documentation on the webpage asks me to run
```!jt -r <insert theme name> ```
within the notebook itself, and this seems to work.Fri, 02 Feb 2024 18:26:32 +0100https://ask.sagemath.org/question/75150/dark-mode-jupyter-notebook/?comment=75754#post-id-75754