Closed peteole closed 2 weeks ago
Thanks for the report. I don't know how we could proceed without user interaction when fonts is not installed. When latex packages are missing, we automatically install them. But in the case of missing fonts, there's no standard repository.
In the meantime, I've found that the following front matter will make it so that Unicode symbols such as alpha, etc will generally work on PDF output:
format:
pdf:
monofont: "DejaVu Sans Mono"
mainfont: "Times New Roman"
Naturally, you'll need to install DejaVu Sans Mono.
One part of the issue is handling missing fonts. Maybe it makes sense to just package the default font with quarto? The other part of the issue is that by default greek letters are not displayed. Should we maybe change the default font or at least provide a more clear error/warning? And what can I do to display greek letters in code blocks?
The default font is installed, but Computer Modern does not have unicode symbols. We could try to scan the document for code points that are missing, but coming up with a font that handles those correctly is a generally hard problem (especially since Unicode continues to add new code points over time). I think this is a limitation of LaTeX in general that we won't be able to solve with quarto.
I do agree that we should better document this Unicode limitation!
Would it be worth bundling a font like STIX Two, which is built by technical publishers to include all the characters and symbols they might conceivably need?
It probably doesn't include a full set of emoji, for instance, but it includes Latin, Greek, and Cyrillic, plus diacritics and technical symbols.
Pushing out to 1.4 and re-assigning to @cwickham to consider a better way to document this limitation.
Hi, I think I am facing a similar problem building the documentation via docments
(through nbdev
). Changing the font as commented above did not work for me. What I see is that some of the Greek letters actually work, see:
Is there any workaround to make this work? Thanks!
Hello everyone. I have additional details on this error (missing unicode symbols), where it seems to be related to use of the knitr
engine but not the jupyter
engine.
What I did:
knitr
, as the R code chunk appeared first in the file.quarto render my_file.qmd --to=pdf
knitr
or as jupyter
and re-rendered the PDF.What I observed:
knitr
), the Greek letters and unicode/emoji symbols did not render.jupyter
, all Greek letters and unicode/emoji symbols rendered perfectly; however, the plot designated by R code did not generate. (The Python figure still generated.)knitr
, the Greek letters and unicode/emoji symbols again did not render. (Both R and Python figures were generated.)What I expected:
knitr
engine but not with the jupyter
engine (since Jupyter should be capable of running all these languages).]System Specs: macOS Ventura 13.4.1(c) Quarto v1.3.433
$ 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.433
Path: /Applications/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.4 (Conda)
Path: /Applications/miniconda3/envs/quarto/bin/python
Jupyter: 5.3.1
Kernels: python3
(/) Checking Jupyter engine render....0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.3
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
knitr: 1.42
rmarkdown: 2.21
[✓] Checking Knitr engine render......OK
Any help would be greatly appreciated!!!
Thank you for making Quarto such a great program.
CC: @jmb280cam
(Adding a note for the documentation task)
Mostly covered in https://quarto.org/docs/output-formats/pdf-basics.html#unicode-characters but this section could use a comment on unicode characters in code cells and setting monofont
.
Also see https://github.com/quarto-dev/quarto-cli/issues/5185
Bug description
Using unicode letters and rendering to pdf results in the letters bein omitted (on manjaro linux, vscode). Setting
lets me render unicode in the main text flow, but not in code blocks. Also this option results in an error when run on my system because the font is not installed. This is not the best UX. This should just work without user interaction. See this example:
α is a great constant.