executablebooks / jupyter-book

Create beautiful, publication-quality books and documents from computational content.
http://jupyterbook.org
BSD 3-Clause "New" or "Revised" License
3.76k stars 652 forks source link

code-cell using new/strange font -- how to revert to a fixed-width font? #2136

Open uqtmiller opened 3 months ago

uqtmiller commented 3 months ago

Describe the bug

Hi,

When I do compile a book with a python code-cell, I expected the code-cell to use a usual "code-looking", fixed-width font.

But instead, it uses a font I don't expect, which seems to be Roboto (if I paste it into MS Word as see the font name).

Here is my code-cell:

x = 1
if x == 1:
    print("True")

Here is the output:

image

This is fine for such a small example, but for larger it affects readability:

image

I'm not sure when this started happening, but I noticed it recently.

Any ideas what I'm doing wrong and how to change this?

Thanks! Tim

Reproduce the bug

For me, paste:

x = 1
if x == 1:
    print("True")

and compile using 'jb build'

List your environment

Details: jupyter-book --version Jupyter Book : 1.0.0 External ToC : 1.0.1 MyST-Parser : 2.0.0 MyST-NB : 1.0.0 Sphinx Book Theme : 1.1.2 Jupyter-Cache : 0.6.1 NbClient : 0.7.4

python3 --version Python 3.10.12

Operating system: Ubuntu 22.04.2 LTS

Example website: https://gibberblot.github.io/rl-notes/single-agent/value-iteration.html

welcome[bot] commented 3 months ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

gibberblot commented 2 months ago

This can now be closed. I had tried on several platforms, but hadn't built this on another platform until today. It worked on someone else's laptop, so I dug much deeper and figured out the issue was a local problem.

Thanks!