Package: notexbook-theme
The Jupyter notebook theme forloversThetheme aims at combining the flexibility and interactivity of Jupyter notebooks with the unique elegance and sobriety of aLaTeXarticle.noTeXbookin a NutshellComputer Modernfonts for Markdown typesetting;Fira Code(open source) font forCodeeditor (with ligatures support);Hack(open source) font forMarkdowneditor (slightly better for text writing,ed.);Multiple Colour Syntax highlighting themes;ExtraCSSclasses for additional LaTeX-ish formatting use cases (e.g.footnotes,dropcap);Fullsupport for Jupyter Notebooks and JupyterLab (version2.0x).Sneak Peek?Here is aPreviewof how [a]noTeXbooklooks like!SetupnoTeXbookThemeThenoTeXbooktheme is available onPyPias a Jupyter Notebook
(Python) extension:$pipinstallnotexbook-themeOnce installed, justloadthenotexbookextension into a Jupyter notebook cell:%load_ext notexbookThe theme can be activated via the%texifyIPython magic 🔮:%texify  # default theme settings will be used%texifyIPython magicThe%texifyIPython magic embeds thenoTeXbooktheme directly into the current notebook.
This results into the following three unique features:on-demand activation: the theme is enabledonlyfor selected notebooks, without having tochangethe (global) default Jupyter notebook theme.portable: the theme is embedded directly into the notebook (as the output of a single cell).
Therefore, whenever the notebook will besharedand/orexported(e.g. in HTML or PDF viawebpdf),
the theme will continue to be available, with no extra installation required.
Similarly,disabling the themebecomes as easy asclearingthe output of the%texifycell.customisable: the theme allows for an easy customisation (e.g. enabling multipleeditor themes)
viaIPython magicline arguments.Magic Line Arguments and Theme settings 🪄The%texifyIPython magic 🔮 supports the following arguments:-cdth<{material,github,github2,crisp}>,--code-theme<{material,github,github2,crisp}>ColourThemeforCodeEditor

-mdth<{material,typora}>,--md-theme<{material,typora}>ColourThemeforMarkdownEditor

-cdfsCODE_MONO_FONT_SIZE,--code-fontsizeCODE_MONO_FONT_SIZEFontsizeusedinCodeandMarkdownEditor.Default:16px

-mdfsMD_MONO_FONT_SIZE,--md-fontsizeMD_MONO_FONT_SIZEFontsizeofRenderedMarkdownmonospace.Default:17px

-nbfsNB_FONT_SIZE,--notebook-font-sizeNB_FONT_SIZEFontsizeofRenderedContentinNotebook.Default:17px

-lhNB_LINE_HEIGHT,--linespreadNB_LINE_HEIGHTLineheightofNotebookContent.Default:1.4

-v,--verboseVerbosemode:DisplaythelistofenabledThemesettings.Examples:%texify --code-font Monaco --linespread 1.3 -fs 18In these settings: (1) theMonacofont will be used for code editor; (2) notebook font size will be set to18px,
and the line height will be1.3.Note: To actually use theMonacofont for code editor, the font must be available and installed on your local machine.
If that is not be the case, the default code mono font (i.e.Fira Code) will be used as a fallback.%texify --code-theme githubIn these settings, thenewgithubCode Editor theme will be used for code syntax highlighting, substituting the
defaultMaterial Designtheme. This theme is inspired by the current code theme on GitHub.To see thefulllist of configuration options :%texify?There's more...ThenoTeXbooktheme isalsoavailable as afull-fledgedcustomJupyter notebook theme (HTML/CSS).
This is useful in case you would prefer to enable the theme astheglobal custom default Jupyter theme.ThenoTeXbooktheme package is available fordownload,
along with its correspondingdocumentation.
The documentation also contains details on the original CSS design, and instructions on how to define
your own CSS Editor Colour theme.Last but not least,Experimentaltheme integration for Google Colaboratory Notebooks (via theStylusbrowser extension)
is also available. Seeherefor more information.noTeXbookshall bythynameWhen I had to think to a name for this project, I aimed almost immediately at finding a single word that would
convey the idea of integration betweenLaTeXand notebooks I had in mind.
Soseemed quite an obvious choice.
Moreover, this name itself is also a uniqueportmanteau(port·man·teau | \ pȯrt-ˈman-(ˌ)tō) that blends together the wordsnoTeXbook, andnoTeXbook, that is the name ofDonald E. Knuth'sbookonTeX.That was the omen... 🤩.One!... Two!... Five!(from:The Holy Hand Grenade- Monty Python and the Holy Grail)Theproject wishes to pay a tribute of gratitude (in the name, and in the content) to two of the technologies I do use
(and love) the most as a researcher and as a data scientist.Project Links📦PyPi package🖌Official GitHub Repo🚀Documentation and GitHub PageCreditsThespinzerojupyter theme has been inspirational in the design of the early version of this theme;The idea of overlay of selected cells has been inspired fromthiscustom theme.Inspiration on the choice of Monospace fonts for code and markdown has come from thisarticleOriginal versions of colour themes for code and markdown editors:Material Design LightGitHub LightCrisp Rainglow CollectionReferences(Some links I found useful along the way):Computer Modern on the Websetuptools: Specify DependenciesHow to Add Customsetup.pycommandspyproject.tomlWhat the heck ispyproject.tomlJupyter Server Extension(Particularly useful in earlier version of this project in which fonts where handled as local resources)AcknowledgmentsSpecial thanks tocdesio,ninadicara, andalanderexfor testing earlier versions of the theme!