quarto-dev / quarto-dev/quarto-cli

Inline reference with custom prefix expanded differently in LaTeX and HTML output

Open
#11,092 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

crossref enhancement
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Consider the following MWE:

---
title: "My title"
format:
  pdf: default
  html: default
---

# Section 1

See [TABLE @tbl-letters]:

| Col1 | Col2 | Col3 |
|------|------|------|
| A    | B    | C    |
| E    | F    | G    |
| A    | G    | G    |

: My Caption {#tbl-letters}

If you render it to PDF, the TABLE in the inline reference does not contain a hyperlink:
Image

But if you render it to HTML, it does:
Image

Steps to reproduce

See above

Expected behavior

Both versions should contain a hyperlink

Actual behavior

HTML output contains a hyperlink, but PDF output does not

Your environment
  • IDE: RStudio: 2024.09
  • OS: Arch Linux
Quarto check output
Quarto 1.5.57

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK

[✓] Checking versions of quarto dependencies......OK

[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /opt/quarto/bin


(|) Checking tools....................
(/) Checking tools....................
[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)


(|) Checking LaTeX....................
(/) Checking LaTeX....................
(-) Checking LaTeX....................
(\) Checking LaTeX....................
(|) Checking LaTeX....................
[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: undefined


(|) Checking basic markdown render....
(/) Checking basic markdown render....
(-) Checking basic markdown render....
(\) Checking basic markdown render....
[✓] Checking basic markdown render....OK


(|) Checking Python 3 installation....
[✓] Checking Python 3 installation....OK
      Version: 3.12.7
      Path: /usr/bin/python3
      Jupyter: 5.7.2
      Kernels: ir, python3


(|) Checking Jupyter engine render....
(/) Checking Jupyter engine render....Traceback (most recent call last):
  File "/opt/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/opt/quarto/share/jupyter/notebook.py", line 18, in <module>
    import nbformat
ModuleNotFoundError: No module named 'nbformat'

[✓] Checking Jupyter 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

Render the embedded MWE to both PDF and HTML, then compare how the custom-prefix inline reference is expanded in each output. The issue is done when the TABLE text in both outputs contains the expected hyperlink to the labeled table.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, latex
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.