quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.92k stars 324 forks source link

Greek letters not rendering in math mode when rendering to pdf #6813

Closed DrEntropy closed 1 year ago

DrEntropy commented 1 year ago

Bug description

(bold) Greek letters in math mode are not rendering when I render documents to pdf, even though they render fine to HTML. Not sure if this is related to this: https://github.com/quarto-dev/quarto-cli/issues/3013 as that had to do with unicode in Julia.

Note that if I render the intermediate .tex file myself it renders fine, which is odd. (However the greek letters are not bold faced in the render, I have just learned this is expected)

Steps to reproduce

To reproduce:

Expected behavior

Greek letter should render.

Actual behavior

Blank where the greek letter should be.

Your environment

I tested this on Mac and Windows. Windows was using tinytex, Mac was using TexLive.

Quarto check output

[✓] 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.450 Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK Version: 3.9.6 Path: /Library/Developer/CommandLineTools/usr/bin/python3 Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK Version: 4.2.2 Path: /Library/Frameworks/R.framework/Resources LibPaths:

[✓] Checking Knitr engine render......OK

DrEntropy commented 1 year ago

I updated texlive on the mac and now it is working, except not \mathbf{\theta}. That still gives a blank. I edited the original but since this is probably a tex issue and not a quarto issue I should probably close this.

DrEntropy commented 1 year ago

Hmm, quarto render to pdf works fine with \boldsymbol instead. Problem exists between keyboard and chair, closing this !

cscheid commented 1 year ago

Just to clarify, the issue here is that there's no way for us to know, from Quarto, which fonts will have the glyphs necessary to render the output generated by pdflatex.

Tangentially, this is something that typst gets fundamentally right that the latex ecosystem simply doesn't have the foundation to do: https://typst.app/docs/reference/text/text/#parameters-font In typst, you specify the a list of fonts for a block of text, and typst will go down the list of fonts, only picking it if all glyphs are present.

mcanouil commented 1 year ago

Note that this was already answered in: