germanjke
germanjke

Reputation: 519

how to change jupyer notebook code font to bold

anybody know how to change jupyter notebook code cells to bold like this? enter image description here

because now i have not standart jupyter font size and don't know why

now i have font like this

enter image description here

Upvotes: 1

Views: 1978

Answers (2)

JP_NLP
JP_NLP

Reputation: 1

Jupyter Notebook uses css for styling.

In order to have code font displayed in bold, you have to edit the custom.css file in the jupyter directory.

The css portion that defines the code font weight is the following:

}
HTML,
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
button,
textarea,
p,
blockquote,
th,
td,
span,
a {
text-rendering: geometricPrecision;
-webkit-font-smoothing: subpixel-antialiased;
font-weight: 400;
}

Just change the font-weight declaration from font-weight: 400; to font-weight: bold;.

Upvotes: 0

Dan Nagle
Dan Nagle

Reputation: 5425

The content of the notebook is styled using CSS. If you want to customise it then you need to create a custom style sheet.

Create a custom folder in the Jupyter profile folder, usually ~/.jupyter/custom/.

Within this folder create a custom.css file and add your custom CSS to it.

    .code_cell {
        font-weight: bold;
    }

Changes should take effect the next time you open Jupyter Notebook.

Upvotes: 1

Related Questions