quarto-dev / quarto-dev/quarto-cli

Crossref syntax not well supported with `non-space-sperated` situation

Open
#1,507 5 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

Crossref syntax such as See @fig-demofiglabel is not well supported with no-space situation for docx output format.

WARNING: Unable to resolve crossref @fig-demofiglabel所示

For example:

如@fig-demofiglabel所示

I tried the syntax below, with no success

如@{fig-demofiglabel}所示

MWE

---
title: MWE
format: docx
---


See @fig-demofiglabel

如@{fig-demofiglabel}所示

If I add a space before`@`, it works.

如 @{fig-demofiglabel}所示

```{r}
#| label: fig-demofiglabel
#| fig-cap: "Demo figure"
plot(1)
```

Screenshot 2022-07-23 at 22 08 56

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

Reproduce the minimal example with Quarto's docx output and the adjacent Chinese characters around @fig-demofiglabel. Compare the working spaced reference with the no-space cases, then trace the cross-reference parsing and resolution path. Done means the cross-reference resolves without requiring a preceding space, while existing spaced syntax continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.