Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyterlab - change styling - font, font size

I recently updated to the most recent version of JupyterLab (0.28.12). I'm on Windows.

I've tried adjusting the variables.css file located in \Lib\site-packages\jupyterlab\themes\@jupyterlab\theme-light-extension of my Miniconda/Anaconda folder. I mainly want to change the font family and size, which I've tried using the variables.css file. However, I can't see any changes.

I went to the extreme point of deleting both theme folders, but still I can change themes without a problem through the Lab interface.

Where are the JupyterLab theme .css files located? Or how can I find them? I've searched for css files and the themes sub folder seems to be the only location for them. I can't seem to find any in my user directory either c:\Users\User\.jupyter where the .css files were for Jupyter Notebook were located.

Thanks!

like image 444
yohfdo Avatar asked Nov 01 '17 04:11

yohfdo


People also ask

How do I change font size in JupyterLab?

Not sure how to change font sizes in jupyter notebook, but in jupyter lab, jupyter notebook's successor, you can change font sizes by going “settings” → “Advanced Settings Editor” → “codeCellConfig” → “fontSize”.

How do I change the text style in a Jupyter Notebook?

If you want to change the text cell font and font size you can type the following in a cell and hit shift+enter.

How do I change the font size of the output in Jupyter Notebook?

In JupyterLab version 2.1. 2, you can just go Settings > JupyterLab theme > Increase Code Font Size several times, and it will increase the font sizes from both the code and code output.

Is JupyterLab replacing Jupyter Notebook?

JupyterLab will eventually replace the classic Jupyter Notebook. Throughout this transition, the same notebook document format will be supported by both the classic Notebook and JupyterLab.


2 Answers

I am running version 0.35.4 right now on Ubuntu and it is possible to edit the fonts in the Settings->Advanced Settings Editor, selected from the top bar menu.

There are a number of options that can be set by changing the json strings in the Raw View. See the picture below:

enter image description here

like image 90
Vince W. Avatar answered Sep 23 '22 00:09

Vince W.


From http://jupyterlab.readthedocs.io/en/latest/user/extensions.html?highlight=themes :

  • The themes directory contains assets (such as CSS and icons) for JupyterLab theme extensions.
  • The themes directory is located in the JupyterLab application directory which defaults to <sys-prefix>/share/jupyter/lab, where <sys-prefix> is the site-specific directory prefix of the current Python environment. You can query the current application path by running jupyter lab path.
like image 35
drlee Avatar answered Sep 22 '22 00:09

drlee