Skip to content

Quarto book projects have empty rmarkdown::metadata #112

Open
@theogrost

Description

@theogrost

Hi,

when trying colformat_md() on table with citations, this does not work in Quarto book projects, for individual files rmarkdown::metadata is empty list().
It helps to call colformat_md(metadata = list(bibliography = "references.bib")) - of course with proper references file path - and if one wishes other formatting than default, csl should be provided as well in metadata.

I am not sure if this can be solved in package, by looking for book project metadata, but I leave comment because it took me some time to figure out what is happening. This is likely to affect all executions that rely on metadata.

Currently, my work-around is:

the_metadata <- rmarkdown::metadata
if(length(the_metadata)==0 & file.exists("_quarto.yml")) {
    the_metadata <- yaml::read_yaml("_quarto.yml")
}

the_table <- ftExtra::colformat_md(
    the_table,
    metadata = the_metadata
)

Best regards,
Oskar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions