quarto-dev / quarto-dev/quarto-cli
Support non-ASCII characters in crossreferenceable labels
Open
@cscheid is already working on this.
Since Apr 25, 2024.
computations
engines-jupyter
enhancement
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
I used the jupyter engine and python code to draw two different bar charts using the matplotlib drawing library. In jupyter they would output correctly, but with quarto preview, he outputs two identical images. The reason is that #| label: fig-qxz contains Chinese characters.
Steps to reproduce
---
title: aaa
author: aaa
format:
typst:
number-sections: true
execute:
echo: false
warning: false
fig-align: center
editor:
render-on-save: true
engine: jupyter
---
```{python}
import numpy
import matplotlib.pyplot as plt
from matplotlib import rcParams
import pandas as pd
%config InlineBackend.figure_format = 'svg'
```
```{python}
#| label: fig-你好
#| fig-cap: aaa
df = pd.DataFrame({'Categories': ['A', 'B', 'C'], 'Values': [10, 20, 30]})
fig1, ax1 = plt.subplots(figsize=(8, 2.5))
ax1.bar(df["Categories"], df["Values"])
plt.show()
```
```{python}
#| label: fig-世界
#| fig-cap: bbb
df2 = pd.DataFrame({'Categories': ['D', 'E', 'F'], 'Values': [30,20,10]})
fig2, ax2 = plt.subplots(figsize=(8, 2.5))
ax2.bar(df2["Categories"], df2["Values"])
plt.show()
```
Expected behavior
Actual behavior
Your environment
- IDE: VS Code
- Windows 11
Quarto check output
Quarto 1.5.30
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.