Merge pull request #4984 from tk0miya/4978_incorrect_shorthandoff_for_brazil

Fix #4978: latex: shorthandoff is not set up for Brazil locale
This commit is contained in:
Takeshi KOMIYA 2018-05-19 16:35:04 +09:00 committed by GitHub
commit 67d435f1fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,7 @@ Bugs fixed
* #4969: autodoc: constructor method should not have return annotation
* latex: deeply nested enumerated list which is beginning with non-1 causes
LaTeX engine crashed
* #4978: latex: shorthandoff is not set up for Brazil locale
Testing
--------

View File

@ -197,7 +197,7 @@ class ExtBabel(Babel):
shortlang = self.language.split('_')[0]
if shortlang in ('de', 'ngerman', 'sl', 'slovene', 'pt', 'portuges',
'es', 'spanish', 'nl', 'dutch', 'pl', 'polish', 'it',
'italian'):
'italian', 'pt-BR', 'brazil'):
return '\\ifnum\\catcode`\\"=\\active\\shorthandoff{"}\\fi'
elif shortlang in ('tr', 'turkish'):
# memo: if ever Sphinx starts supporting 'Latin', do as for Turkish