【问题标题】:change fontfamily for output cells in jupyterlab在 jupyterlab 中更改输出单元格的 fontfamily
【发布时间】:2018-12-14 00:00:40
【问题描述】:

我想更改 jupyterlab 中所有单元格的默认 fontFamily。我能够在高级设置编辑器中编辑代码、降价和原始单元格的配置。但输出单元格仍使用默认的 SourceCodePro 字体。有没有办法改变它?

【问题讨论】:

    标签: jupyter-lab


    【解决方案1】:

    显然这个功能还没有实现。见这里:https://github.com/jupyterlab/jupyterlab/issues/5764

    我通过首先安装扩展 jupyterlab-fonts 然后将文件 ~/.jupyter/lab/user-settings/@deathbeds/jupyterlab-fonts/fonts.jupyterlab-settings 中的 --jp-code-font-family 参数更改为这个来解决这个问题:

        {
            // Fonts
            // @deathbeds/jupyterlab-fonts:fonts
            // Settings for JupyterLab Fonts
            // *********************************
    
            // Global Styles
            // JSS-compatible JSON applied to the Global scope
            "styles": {
              ":root": {
                "--jp-code-font-family": "monospace"
              }
            }
        }
    

    【讨论】:

      【解决方案2】:

      在jupyterlab中打开settings>Theme,在overides上改code-font-family

      {
        "overrides": {
              "code-font-family": "monospace",
              "code-font-size": "13px"
          }
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2022-08-18
        • 2021-05-22
        • 2019-08-24
        • 1970-01-01
        • 2018-08-31
        • 2021-09-13
        • 1970-01-01
        • 2021-10-29
        相关资源
        最近更新 更多