Dont use a custom LaTeX builder

Since we no longer need Cyrillic text, we dont need a custom builder.
And apparently sphinx breaks with a custom latex builder. See https://github.com/sphinx-doc/sphinx/issues/8936
This commit is contained in:
Kovid Goyal 2021-03-04 21:08:26 +05:30
parent 9b99248382
commit 2a0c6c2d6b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 1 additions and 33 deletions

View File

@ -42,7 +42,7 @@ def build_manual(language, base):
sb = partial(sphinx_build, language, base)
onlinedir = sb(t='online')
epubdir = sb('myepub', 'epub')
latexdir = sb('mylatex', 'latex')
latexdir = sb('latex', 'latex')
pwd = os.getcwd()
os.chdir(latexdir)

View File

@ -11,7 +11,6 @@ from sphinx.util.logging import getLogger
from calibre.linux import cli_index_strings, entry_points
from epub import EPUBHelpBuilder
from latex import LaTeXHelpBuilder
def info(*a):
@ -356,7 +355,6 @@ def setup(app):
generate_docs(app.config.language)
app.add_css_file('custom.css')
app.add_builder(EPUBHelpBuilder)
app.add_builder(LaTeXHelpBuilder)
app.connect('source-read', source_read_handler)
app.connect('html-page-context', add_html_context)
app.connect('build-finished', finished)

View File

@ -1,30 +0,0 @@
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from sphinx.builders.latex import LaTeXBuilder
from sphinx.util.logging import getLogger
from sphinx.writers.latex import LaTeXTranslator
def info(*a):
getLogger(__name__).info(*a)
class FixedLaTeXTranslator(LaTeXTranslator):
# see https://github.com/sphinx-doc/sphinx/issues/8936
def visit_substitution_definition(self, node):
pass
def depart_substitution_definition(self, node):
pass
class LaTeXHelpBuilder(LaTeXBuilder):
name = 'mylatex'
default_translator_class = FixedLaTeXTranslator