mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
latex: Do escape_abbr() for author and project
This commit is contained in:
parent
68c90a26f1
commit
46b19b29f3
@ -473,8 +473,8 @@ def default_latex_documents(config):
|
||||
""" Better default latex_documents settings. """
|
||||
return [(config.master_doc,
|
||||
make_filename_from_project(config.project) + '.tex',
|
||||
texescape.escape(config.project),
|
||||
texescape.escape(config.author),
|
||||
texescape.escape_abbr(texescape.escape(config.project)),
|
||||
texescape.escape_abbr(texescape.escape(config.author)),
|
||||
'manual')]
|
||||
|
||||
|
||||
|
@ -1387,9 +1387,9 @@ def test_default_latex_documents():
|
||||
from sphinx.util import texescape
|
||||
texescape.init()
|
||||
config = Config({'master_doc': 'index',
|
||||
'project': u'STASI™ Documentation',
|
||||
'author': u"Wolfgang Schäuble & G'Beckstein"})
|
||||
'project': 'STASI™ Documentation',
|
||||
'author': "Wolfgang Schäuble & G'Beckstein."})
|
||||
config.init_values()
|
||||
expected = [('index', 'stasi.tex', u'STASI™ Documentation',
|
||||
u"Wolfgang Schäuble \\& G'Beckstein", 'manual')]
|
||||
expected = [('index', 'stasi.tex', 'STASI™ Documentation',
|
||||
r"Wolfgang Schäuble \& G'Beckstein.\@{}", 'manual')]
|
||||
assert default_latex_documents(config) == expected
|
||||
|
Loading…
Reference in New Issue
Block a user