pradyunsg / furo

A clean customizable documentation theme for Sphinx
https://pradyunsg.me/furo/quickstart
MIT License
2.65k stars 304 forks source link

Explore ways to avoid ignoring line-height from custom pygments themes #720

Open pradyunsg opened 11 months ago

pradyunsg commented 11 months ago

Discussed in https://github.com/pradyunsg/furo/discussions/438

Originally posted by **asmeurer** May 11, 2022 In our custom pygments theme for SymPy, we set the `line-height` attribute using `_pre_style`: https://github.com/sympy/sympy/blob/68c37df362e8585d72fc7ef490013bb8eff16e3e/doc/src/_pygments/styles.py#L25-L29 However, this is being ignored by the docs Screen Shot 2022-05-10 at 5 58 33 PM We need this so that Unicode pretty printed output doesn't add extra space between lines. See for example https://docs.sympy.org/dev/tutorial/printing.html#unicode-pretty-printer and compare to our previous theme which set this attribute correctly https://docs.sympy.org/latest/tutorial/printing.html#unicode-pretty-printer I can work around this by adding it to the custom.css, but it seems preferable to include it in the pygments theme since pygments allows this.