Every option in nbpreview has an associated environmental variable
that can be set to provide a default value.
to set the theme to
% nbpreview --theme='material' notebook.ipynb
To apply the
without having to specify it in the
set the environmental variable associated with the command-line option.
The environmental variables for each option
are explicitly listed at the end of the command-line usage.
They may also be found in the
--help message under
% nbpreview --help ⋮ -t, --theme The theme to use for syntax highlighting. Call '--list-themes' to preview all available themes. [env var: NBPREVIEW_THEME; default: dark]
% export NBPREVIEW_THEME='material'
Now, whenever nbpreview is run,
it will automatically set the
--theme value to
To set this permanently,
set the environmental variable in the shell’s startup file—such as
Environmental variables set the new default for nbpreview,
but they can still be overridden anytime by manually the relevant command-line option.