mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2810: Problems with pdflatex in an Italian document
Depending on the version of the italian module for LaTeX Babel, the double-quote character may have been or not declared as a babel shorthand. The babel ``\shorthandoff`` macro emits an error which aborts compilation if the character isn't a shorthand. This commits wraps the macro in a conditional to test if the character is active or not. modified: sphinx/writers/latex.py
This commit is contained in:
parent
ec934d476a
commit
85b954714c
@ -93,7 +93,7 @@ class ExtBabel(Babel):
|
|||||||
if shortlang in ('de', 'ngerman', 'sl', 'slovene', 'pt', 'portuges',
|
if shortlang in ('de', 'ngerman', 'sl', 'slovene', 'pt', 'portuges',
|
||||||
'es', 'spanish', 'nl', 'dutch', 'pl', 'polish', 'it',
|
'es', 'spanish', 'nl', 'dutch', 'pl', 'polish', 'it',
|
||||||
'italian'):
|
'italian'):
|
||||||
return '\\shorthandoff{"}'
|
return '\\if\\catcode`\\"\\active\\shorthandoff{"}\\fi'
|
||||||
elif shortlang in ('tr', 'turkish'):
|
elif shortlang in ('tr', 'turkish'):
|
||||||
return '\\shorthandoff{=}'
|
return '\\shorthandoff{=}'
|
||||||
return ''
|
return ''
|
||||||
|
Loading…
Reference in New Issue
Block a user