Skip to contents

quartifyr 0.3.4

New features

  • Wide tables now fit the page, and a report can put tables on a landscape page (#88).
    • render_report() runs a new step after reportifyr’s pass 2, styling_fit_tables() (quartifyr-styling fit-tables, fit_tables = TRUE by default, --no-fit-tables in render.R). reportifyr 0.4.0 leaves the widths of its tables to the word processor, so a table of a dozen or more columns got columns a few characters wide and header words that broke mid-word. Each table it inserted now gets a fixed layout: the width is the content width of the section the table is in (not a fixed 6 inches), no column is narrower than its longest unbreakable word, and when the words alone don’t fit the font is reduced in 1 pt steps to a 7 pt minimum. A table still too wide at 7 pt is fitted to the page and reported as a warning in the result. Widths are estimated from character metrics, not measured with the font.
    • New {{< landscape >}} and {{< portrait >}} shortcodes (after {{< body-start >}}) start and end a landscape section. apply-layout turns them into section breaks with swapped page dimensions; each section keeps its own header, footer and the body’s page numbering. The section break survives reportifyr’s pass 2.

Bug fixes

  • The front-matter and body section breaks apply-layout inserts now take the orientation of the section they end, not that of the document’s final section, so a trailing landscape section no longer turns them landscape too.

quartifyr 0.3.3

New features

  • One existing Python environment can now serve both passes with no pyro, no project .venv and no network (#85). With a python_env (options(quartifyr.python_env) or QUARTIFYR_PYTHON_ENV), render_report() also points reportifyr’s pass 2 at it: pyro gets options(venv_dir) for the render, and uv gets UV_PROJECT_ENVIRONMENT and UV_NO_SYNC and UV_PYTHON (its own interpreter: without a pyproject.toml uv is outside a project, and a .python-version file would otherwise make it run a different interpreter), so it runs reportifyr’s module in that environment and creates no .venv and rewrites no uv.lock, even in a project that ships both. An environment not named .venv is exposed through a temporary junction on Windows (no privilege needed) or symlink elsewhere. New initialize_report_project_offline() creates the report folders, config.yaml, standard_footnotes.yaml and the .report_init.json marker that reportifyr::initialize_report_project() makes, without calling pyro or uv (that function installs uv and runs uv lock/uv sync against PyPI); it leaves what exists alone. uv itself must still be installed, since reportifyr runs it for every call, but it is never asked to sync, resolve or download. The offline-pipeline CI job now also sets up and renders a fresh copy of the demo with only python_env, under unshare --net, and fails if a .venv appears or uv.lock changes.
  • render_report(soffice_bin = ) / render.R --soffice-bin <path> name the LibreOffice executable for --recalculate-fields and --resolve-same-page-crossrefs, falling back to QUARTIFYR_SOFFICE_BIN and then soffice on PATH (the same order as quarto_bin). The styling CLI’s two LibreOffice subcommands and styling_recalculate_fields() / styling_resolve_same_page_crossrefs() take it too. A missing or non-executable path fails before the render starts, and the result’s versions$libreoffice records the resolved path and soffice --version of the one that ran (#83).

Breaking changes

  • A configured python_env (options(quartifyr.python_env) or QUARTIFYR_PYTHON_ENV) now also drives reportifyr’s pass 2 in render_report() (#85). Before, it applied only to quartifyr’s own Python calls, and pass 2 ran in the project’s .venv through pyro. Anyone who set a python_env for the styling steps and relied on a separate .venv for pass 2 now has pass 2 run in the python_env instead, and that environment must have pillow as well as python-docx and pyyaml; render_report() fails before rendering, naming what is missing, if it doesn’t.
  • The inputs[].role values in the result JSON gained quarto_yml, style, override and extension (#82). The schema stays at version 1 because consumers are expected to accept roles they don’t know, so role is now an open string in render-result-v1.schema.json (with the known values listed as examples). A validator built from the 0.3.2 copy of the schema, which kept role closed, rejects 0.3.3 output; update it, or loosen role there.

Bug fixes

  • Corrections to the above before release:
    • Offline relabelling no longer fires on ordinary pass-2 errors (#82). The matcher accepted the bare words “network” and “offline” and reads reportifyr’s log lines, which carry file paths, so a project under .../offline-study/ had every error reported as “cannot … without network access”. It now matches uv’s and the network stack’s own phrases.
    • report/draft/intermediate_files/ (where reportifyr moves -clean, -tabs and -tabsfigs) is moved aside with the other outputs, so a rejected or killed render no longer leaves the last good run’s near-complete -tabsfigs.docx live (#81).
    • The interpreter-mismatch warning no longer fires on a correct environment: uv writes version_info = 3.12 to pyvenv.cfg, which was read as 3.12.0 and so “mismatched” a 3.12.13 pin. Partial versions are compared only on the components they have, and the check also runs when python_env is the folder holding .venv (#82).
    • Extension hashes are computed in C-locale order, so the same extension has the same SHA-256 under any collation (#82).
    • render_report() hands the LibreOffice steps the absolute path it checked, so a relative soffice_bin can’t mean something else inside the project (#83).
  • Contract gaps in the offline and result work (#82):
    • In offline mode a pass-2 uv failure is now recognised with the real reportifyr and pyro, which don’t pass uv’s message on (pyro says only “