简体   繁体   中英

Change size of body text in Jupyter notebook

I'd like to increase the size of all body text (I don't know the right term, but text that is not in a special markdown category) in a dozen Jupyter notebooks. The notebooks are all stored in one repo, so they can share a css file. But I've no expertise in css.

The directory containing these notebooks has this custom.css file

h4 {
    font-weight: normal;
    text-align: justify;
}

#TOC, #book-cover {
    width: 50%;
    float: left;
}

#TOC {
    font-size: 130%;
}

#main_content_wrap p, #main_content_wrap ol {
    text-align: justify;
}

#main_content_wrap ul li {
    list-style-type: none;
    margin-bottom: 5px;
}

#main_content_wrap ul li a {
    font-weight: bold;
}

#image-cc {
    width: auto !important;
}

but I do not know if it is being used. The system (a Docker container) contains a .jupyter directory, but it contains no css files.

Ideally, I'd like a reference to a clear, fairly simple manual on using css for Jupyter notebooks. I'm aware of this good CSS reference , but it does not consider Jupyter notebooks. ("Give a man a fish ..., teach a man to fish ...")

Thanks, Arthur

If you set the body tag font size, it will change the text everywhere. This includes relative sized css like your #TOC id which is based in % and also will impact any relative size values like em .

body { font-size: 20px; }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM