Closed 777arc closed 2 months ago
This is a LaTeX problem. For support of cyrillic you have to modify the LaTeX preamble. You can do this in your Sphinx project's conf.py
file by adding:
latex_elements = {
'preamble': r'''
\usepackage[russian]{babel}
'''
}
This eliminates the encoding issue but surfaces another one: pdf2svg
seems to have problems converting cyrillic letters from a PDF to an SVG. You can try to file an issue at https://github.com/dawbarton/pdf2svg, but this project has not been updated since seven years.
Luckily, the TikZ Sphinx extension provides alternative conversion suites to the pdf2svg
. You configure the conversion suite in the conf.py
file as follows:
tikz_proc_suite = 'GhostScript'
tikz_proc_suite = 'Netpbm'
tikz_proc_suite = 'ImageMagick'
Note that all of the above require some Prerequisites to be installed on your system.
Also note that the support for the Netpbm conversion suite was broken but is fixed again in the latest version 0.4.20 of the TikZ Sphinx extension.
@philexander ty!!!!! for anyone else who runs into this issue, what ended up working for me was
tikz_latex_preamble = r'''
\usepackage[russian]{babel}
'''
and also switching to GhostScript
Starting in 0.4.17 I get a
Here's an example of the tikz that would trigger the error
I'm on sphinx==7.3.7, using the normal html builder