sphinx-doc/sphinx

LaTeX: background gray in PDF code-blocks has a lesser contrast for ``xelatex`` with non-highlighted tokens

Open

#11,269 建立於 2023年3月29日

在 GitHub 查看
 (17 留言) (0 反應) (0 負責人)Python (1,985 fork)batch import
builder:latexhelp wanted

倉庫指標

Star
 (5,625 star)
PR 合併指標
 (平均合併 10天 11小時) (30 天內合併 11 個 PR)

描述

Describe the bug

Example with 'xelatex' for latex_engine: Capture d’écran 2023-03-29 à 09 47 59

Same with default 'pdflatex': Capture d’écran 2023-03-29 à 09 47 30

The choice of default background gray was done with testing with pdflatex. If testing with xelatex, it could have been chosen possibly even lighter.

But this issue is mainly applying to the few non highlighted tokens.

It is a font issue, the one used for xelatex/lualatex is thinner than the one used for pdflatex. It may also be compounded with a PDF viewer anti-aliasing effect, for these thin glyphs on colored background.

How to Reproduce

Any project with code-blocks

Environment Information

Sphinx 6.1.3

Sphinx extensions

No response

Additional context

LaTeX installation from TeXLive 2023.

貢獻者指南