mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
9b99248382
commit
2a0c6c2d6b
@ -42,7 +42,7 @@ def build_manual(language, base):
|
|||||||
sb = partial(sphinx_build, language, base)
|
sb = partial(sphinx_build, language, base)
|
||||||
onlinedir = sb(t='online')
|
onlinedir = sb(t='online')
|
||||||
epubdir = sb('myepub', 'epub')
|
epubdir = sb('myepub', 'epub')
|
||||||
latexdir = sb('mylatex', 'latex')
|
latexdir = sb('latex', 'latex')
|
||||||
pwd = os.getcwd()
|
pwd = os.getcwd()
|
||||||
os.chdir(latexdir)
|
os.chdir(latexdir)
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@ from sphinx.util.logging import getLogger
|
|||||||
|
|
||||||
from calibre.linux import cli_index_strings, entry_points
|
from calibre.linux import cli_index_strings, entry_points
|
||||||
from epub import EPUBHelpBuilder
|
from epub import EPUBHelpBuilder
|
||||||
from latex import LaTeXHelpBuilder
|
|
||||||
|
|
||||||
|
|
||||||
def info(*a):
|
def info(*a):
|
||||||
@ -356,7 +355,6 @@ def setup(app):
|
|||||||
generate_docs(app.config.language)
|
generate_docs(app.config.language)
|
||||||
app.add_css_file('custom.css')
|
app.add_css_file('custom.css')
|
||||||
app.add_builder(EPUBHelpBuilder)
|
app.add_builder(EPUBHelpBuilder)
|
||||||
app.add_builder(LaTeXHelpBuilder)
|
|
||||||
app.connect('source-read', source_read_handler)
|
app.connect('source-read', source_read_handler)
|
||||||
app.connect('html-page-context', add_html_context)
|
app.connect('html-page-context', add_html_context)
|
||||||
app.connect('build-finished', finished)
|
app.connect('build-finished', finished)
|
||||||
|
@ -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
|
|
Loading…
x
Reference in New Issue
Block a user