quarto-dev / quarto-dev/quarto-cli
Unable to resolve crossref for chapters
@cscheid is already working on this.
Since Apr 19, 2023.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I have been struggling with this for a while now. I came to the understanding that there is a bug. Depending on the position at which the chapters are defined, a cross-referencing to them will work or not. Please have a look at the two following configuration, where one file has some text and tries to corss-ref to chapters which are defined in another file. By the way, up to now I only saw this behavior with chapters, i.e. one dash header, not sections two or more dash headers.
First configuration
trial.qmd
Further check [@sec-chap_1_Intro] -- Unable to resolve crossref
chapter [-@sec-chap_1_Abc] -- will be found
other_File.qmd
# Introduction {#sec-chap_1_Intro}
Here is some more text
# Chap Test_4 {#sec-chap_1_Abc}
Here is some more text
Second configuration
Here only the order of chapter declaration has been changed, i.e., the chapter Chap Test_4 is defined first and the chapter Introduction
trial.qmd
Further check [@sec-chap_1_Intro] -- is found now (able to resolve crossref)
chapter [-@sec-chap_1_Abc] -- now this becomes the issue (will not be found anymore)
other_File.qmd
# Chap Test_4 {#sec-chap_1_Abc}
Here is some more text
# Introduction {#sec-chap_1_Intro}
Here is some more text
quarto --version
1.3.330
Operating system: Linux Manjaro
quarto check
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.330
Path: /home/jav/Progs/quarto/quarto-1.3.330/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.10
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
Show me the full project
The reason why the bug is important to me is because of a bigger project. I have some cross-refs which are not found. If you want to have a look at them, feel free to have a look at the bigger project:
git clone https://huggingface.co/spaces/JavedA/master_Thesis/
cd master_Thesis
quarto preview
In case there is any issue with obtaining the bigger project, please let me know.
Thank you for your time and effort
Checklist
- Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- Please format your issue so it is easier for us to read the bug report.
- Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- Please document the operating system you're running. If on Linux, please provide the specific distribution.
- Please provide the output of
quarto checkso we know which version of quarto and its dependencies you're running.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.