quarto-dev / quarto-dev/quarto-cli

quarto 1.4 eats LaTeX \providecommand

Open
#8,564 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug latex tables third-party
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Quarto 1.4 causes huxtable tables to fail when compiling to PDF, because it doesn't print out some LaTeX \providecommand commands that huxtable uses. This is new in 1.4.

Steps to reproduce

The following document will fail if compiled to PDF on quarto 1.4.549 or 1.5.6. It works with quarto 1.3.450.

---
title: "Quarto tester"
format: html
---


Reference to @tbl-hux.

```{r}
#| tbl-cap: "Huxtable Jams"
#| label: tbl-hux
library(huxtable)
jams
```

Expected behavior

I'd expect the .tex file produced to have the same \providecommand\huxvb TeX in there as can be seen in the .pdf.md file.

Actual behavior

The \providecommand TeX is not in the .tex file, and as a result xelatex fails with "! Undefined control sequence."

Your environment

No response

Quarto check output
Quarto 1.5.6
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.6
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/davidhugh-jones/Library/TinyTeX/bin/universal-darwin
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.5
      Path: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3
      Jupyter: (None)

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

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.45
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal Quarto document and huxtable example in the issue, rendering it with the affected Quarto versions and comparing the generated .tex file with the .pdf.md output. The fix is complete when the required providecommand definitions are retained in the .tex output and xelatex compiles the document successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, latex, r
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.