Skip to content

Unexpected behavior: Quarto is altering font name values in _extension.yml #12963

@connorferster

Description

@connorferster

I have:

  • searched the issue tracker for similar issues
  • installed the latest version of Quarto CLI
  • formatted my issue following the Bug Reports guide

Bug description

I am creating a new Quarto format as a custom extension. Everything is working great when I put all of the font configuration information at the beginning of my .qmd or .ipynb file. However, when I put the default configuration in my "_environment.yml" "_extension.yml" file then some funny stuff happens.

Here is the contents of my "_extensions" dir:

_extensions/
├─ extension_name/
│  ├─ CaskaydiaCove/
│  ├─ Ubuntu/
│  ├─ template.tex
│  ├─ _extension.yml

I am including font files in my extension (see "Ubuntu" and "CaskaydiaCove", above) for use with my Latex template ("template.tex").

The problem occurs when I populate my "_environment.yml" "_extension.yml" file with my default values. Here is an MWE of my "_environment.yml" "_extension.yml" file:

title: extension_name
author: Me
version: 0.0.1
contributes:
  project:
    project:
      type: book
  formats: 
    pdf:
      toc: false
      number-sections: false
      template: template.tex
      font-paths:
        main: _extensions/extension_name/Ubuntu
        code: _extensions/extension_name/CaskaydiaCove
      catch: # This key chosen to demonstrate that the keys do not mater
        main:
          name: Ubuntu # <----- THIS VALUE GETTING SUBSTITUTED
        code:
          name: "CaskaydiaCove" # <------- THIS VALUE GETTING SUBSTITUTED

When I run Quarto with my extension, then the extensions front-matter values are echoed to the terminal. Here is what I am seeing:

metadata
  block-headings: true
  font-paths:
    main: _extensions/engpdf/Ubuntu
    code: _extensions/engpdf/CaskaydiaCove
  catch:
    main:
      name: _extensions/engpdf/Ubuntu # <---- THIS IS NOT THE VALUE I PROVIDED
    code:
      name: _extensions/engpdf/CaskaydiaCove # <---- NEITHER IS THIS ONE

Is this behaviour documented anywhere? When I put this front-matter in my document, the values come through as expected. It's just when I exclude the front-matter configuration for my extension in the doc and allow the "_environment.yml" "_extension.yml" default values to be used when this problem occurs.

Any thoughts?

Steps to reproduce

  1. Create a new extension with folder structure as above and with an "_environment.yml" "_extension.yml" file as shown above
  2. Create a new .qmd file with the following front-matter:
---
format: extension_name-pdf
---
  1. Run quarto and notice that any key that has a value equal to the name of a font directory is going to have its value substituted for the path of the font directory.

Actual behavior

Value of the font name is substituted for the font directory relative path

Expected behavior

Values remain as written without substitution.

Your environment

  • VSCode (no extension)
  • popOS (Ubuntu/Debian)
  • Quarto v 1.7.32

Quarto check output

Quarto 1.7.32
[✓] Checking environment information...
      Quarto cache location: /home/connorferster/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.6.3: OK
      Dart Sass version 1.85.1: OK
      Deno version 1.46.3: OK
      Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.7.32
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2025.06
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/connorferster/.TinyTeX/bin/x86_64-linux
      Version: 2025

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /usr/bin/google-chrome
      Source: PATH

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionsrelates to Quarto extensions mechanism

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions