Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 20 Aug 01:26

New features

  • New validate_header() checks a shell .qmd's front matter (and its
    project's _quarto.yml) against every field this extension's Lua
    filters and apply-layout step actually read, and prints a
    cli-formatted report: what's provided, what's missing (required or
    merely recommended), what else is available and what it does, and any
    conflicts (title:/memo: both set, an unresolvable
    header-format: placeholder, an unrecognized crossref-hyperlinks:
    value, a logo:/bibliography: path that doesn't exist, ...). New
    header_helper() interactively builds a front-matter block from the
    same field catalog and copies (or prints) the result, ready to paste
    into a new .qmd. Both are driven by one shared field registry, so a
    field added to the extension only needs documenting in one place (#31).
  • New styling_example_template()/styling_example_style() pull the
    bundled reference-doc/default style YAML into a project (the latter
    also returning its parsed content as a list, ready to edit), and new
    styling_save_overrides()/styling_update_style() save an edited
    style back out -- by default as just its diff from the base style
    YAML, an override ready to deep-merge back on at load time -- or
    deep-merge a targeted change onto an existing style YAML in place.
    Each also available as a quartifyr-styling CLI subcommand (#27).
  • {{< appendix >}}'s designator style is now configurable document-wide
    via appendix-numbering: frontmatter (alphabetic (default) / arabic
    / roman), instead of always lettering A/B/C (#26).
  • New scoped figure/table caption shortcodes --
    appendix_fig_caption/appendix_tbl_caption,
    section_fig_caption/section_tbl_caption (with a new section_break
    marker), and subsection_fig_caption/subsection_tbl_caption (with a
    new subsection_break marker) -- number "Figure A1"/"Figure 3.1"/
    "Figure 3.2.1" respectively, restarting within their scope instead of
    running continuously through the whole document like quarto-plus's
    own fig_caption/tbl_caption. A new scoped_crossref shortcode
    resolves any of the six. Additive: nothing here changes quarto-plus's
    own shortcodes, and an author can mix scoped and continuous captions
    freely. See inst/extensions/quartifyr/README.md's "Scoped
    figure/table numbering" section, including its known List of
    Figures/Tables limitation (#26).
  • Style YAML: new code: section (font_size, background_color,
    padding_pt) styles pandoc's Source Code/Verbatim Char docx styles
    for fenced code blocks/inline code, using fonts.monospace (previously
    declared but never actually applied anywhere -- now wired up). Defaults
    match pandoc's own previous built-in fallback, so existing renders are
    unaffected unless a style YAML opts into non-default values (#29).
  • Style YAML: new equation.font sets the docx-wide default math font
    (applied by styling_apply_layout()/render_report()'s new style/
    override arguments post-render, since pandoc's docx writer doesn't
    carry this setting through from the reference-doc template). Font
    family only -- an unstyled math run inherits its size from the
    surrounding paragraph (#29).
  • Style YAML: new heading.all_caps applies an all-caps visual
    transform (OOXML w:caps) to Heading 1-6, leaving the underlying
    heading text untouched (#29).
  • New styling_sync_reportifyr_config() (quartifyr-styling sync-reportifyr-config) updates reportifyr's own report/config.yaml
    footnotes_font/footnotes_font_size to match a style YAML's
    fonts.body/fonts.sizes.footnote -- previously only kept in sync by
    hand, per both bundled examples' own config.yaml comments. Requires
    an interactive confirmation unless yes = TRUE is passed; not run
    automatically by render_report() (#29).
  • New inst/python/styles/schema.json -- a machine-readable JSON Schema
    for the style YAML, for editor autocomplete/inline validation
    (default.yaml now carries a # yaml-language-server: $schema=...
    header pointing at it). Guarded against drifting from schema.py by
    tests/python/test_schema_json.py (#28).

Documentation

  • The Styling
    article gained a full style YAML reference table (every key, what it
    controls, its default) and a real rendered default-vs-branded
    comparison, generated by the new
    scripts/render_style_option_gallery.py from examples/demo-report's
    actual content -- not a mockup.

Fixed

  • render_report()'s reference_doc argument now defaults to NULL
    instead of the bundled package template. When unset, it checks (via
    quarto::quarto_inspect(), so it follows Quarto's own
    frontmatter-over-_quarto.yml merge precedence) whether the project
    already configures a docx reference-doc and, if so, leaves it alone
    instead of silently overriding it with the package default as before.
    Only when neither sets one does it fall back to the package default,
    now with a cli notice pointing at styling_build_reference_docx()
    (#30).

Breaking changes

  • Removed the style YAML's identity.org_name/identity.logo_path keys
    -- confirmed dead: nothing read them (the actual title-page logo comes
    from the .qmd's own logo: frontmatter). Delete them from any style
    YAML that set them; they're a no-op removal otherwise (#28).