jupyter-themer
jupyter-themer copied to clipboard
Bad argument passed to --font/--typography
I'm trying to change the fonts used by Jupyter Notebook using the --font and --typography arguments in jupyter-themer but no matter what arguments I give it, I keep getting a 'Bad argument passed to --font/--typography. Have a look at the screenshot I've attached.
The arguments I'm passing appear to be valid according to jupyter-themer's --show helper so I'm confused why they generate errors. What am I doing wrong?
Check: https://github.com/transcranial/jupyter-themer/blob/master/jupythemer/jupythemer.py#L62
the extention is .import
;
and then check YOUR_LIB_DIR\jupythemer\styles\typography\serif.*
my case is that serif.css
so I changed the jupythemer.py
code and let the extentions be the same (change all .import
to .css
). It worked for me.
@john7farrell Thanks for your help. After making the changes you suggested to jupythemer.py
I'm no longer getting that error.
However, now after I run the commands to change the font to say Inconsolata, I don't see any changes in the Jupyter Notebook interface. Is there something else that needs to be done?
I didn't do anything else.
After I ran the commend jupyter-themer -f [CODE_FONT]
and refreshed an opened notebooks I got such changes(my OS is windows10).
Source_Code_Pro
Ubuntu_Mono
Inconsolata
I also run Win 10. In my case, if the font is not available in my Windows installation, refreshing the jupyter page indeed changes its code font, but to a font different than the one specified. For example, jupyter-themer -f Inconsolata
does not set the font to Inconsolata, which is not installed, but to some serif font. As expected, jupyter-themer -f Source_Code_Pro
works correctly.
As to the solution for font selection, I commented out the entire try
that opens the .import
file for the -c
option, because for some reason further down in the script there is an almost identical code block which opens a .css
file. It worked for me but I do not know if it breaks the tool in any way.