On 2013-01-24, Michael Schlenker wrote:
> Am 24.01.2013 17:05, schrieb gilberto dos santos alves:
>> Hi. are you using utf-8 files
>> # -*- coding: utf-8 -*-
>> and conf.py with your language?
>> See aditional options for latex on conf.py too.
>> In pt_BR i use this and locale files are them created ok with cedilha
>> and others chars used in portuguese.
Portugese is OK, but galicean, basque and estonian have problems with a
redefined tilde character (~) which cannot be easily disabled as it must
be kept active to work as no-break-space.
> This issue is a peculiarity of the 'ngerman' and 'german' LaTeX
> packages, which provide shortcuts to write german umlauts on ASCII/US
> keyboards (without using LaTeX inputenc).
The double-quote shorthand is used in about 15 languages by babel. In
addition, the following problematic characters are defined:
active_chars = {# TeX/Babel-name: active characters to deactivate
# 'breton': ':;!?' # ensure whitespace
# 'esperanto': '^',
# 'estonian': '~"`',
# 'french': ':;!?' # ensure whitespace
'galician': '.<>', # also '~"'
# 'magyar': '`', # for special hyphenation cases
'spanish': '.<>', # old versions also '~'
# 'turkish': ':!=' # ensure whitespace
}
The latest upstream LaTeX writer from docutils SVN
http://docutils.svn.sourceforge.net/viewvc/docutils/trunk/docutils/
has a probler fix for the "shorthands" problem. Maybe someone can backport
this to the Sphinx LaTeX writer.
Until then, you can add to the LaTeX preamble the command::
\AtBeginDocument{\shorthandoff{"}}
and for the re-defined ~
if 'galician' in languages::
\deactivatetilden % restore ~ in Galician
if 'estonian' in languages::
\makeatletter
\addto\extrasestonian{\bbl@deactivate{~}}
\makeatother
if 'basque' in languages::
\makeatletter
\addto\extrasbasque{\bbl@deactivate{~}}
\makeatother
Günter
>> 2013/1/24 Michael Schlenker <[email protected] <mailto:[email protected]>>
>> Hi all,
>> just wanted to note a small pitfall when using Sphinx with LaTeX output
>> and the babel set to ngerman.
>> The german and ngerman LaTeX packages install shortcuts for things like
>> "a to mean ä and for "s to mean ß etc., Sphinx does not know about
>> these, so some RST construct like:
>> Ein Beispiel "abc"
>> would create this in PDF:
>> Ein Beispiel äbc"
>> To fix this, one needs to disable the shortcuts via '\shorthandoff{"}'
>> in the right place (not sure yet what it is, it needs to go inside the
>> \begin{document} Block, so maybe just a .. raw:: latex block in the
>> toplevel file?)
>> Michael
>> --
>> Michael Schlenker
>> Software Architect
>> CONTACT Software GmbH Tel.: +49 (421) 20153-80
>> <tel:%2B49%20%28421%29%2020153-80>
>> Wiener Straße 1-3 Fax: +49 (421) 20153-41
>> <tel:%2B49%20%28421%29%2020153-41>
>> 28359 Bremen
>> http://www.contact.de/ E-Mail: [email protected]
>> <mailto:[email protected]>
>> Sitz der Gesellschaft: Bremen
>> Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe
>> Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215
>> --
>> You received this message because you are subscribed to the Google
>> Groups "sphinx-users" group.
>> To post to this group, send email to [email protected]
>> <mailto:[email protected]>.
>> To unsubscribe from this group, send email to
>> [email protected]
>> <mailto:sphinx-users%[email protected]>.
>> Visit this group at http://groups.google.com/group/sphinx-users?hl=en.
>> --
>> gilberto dos santos alves
>> +55.11.98646-5049
>> são paulo - sp - brasil
>> --
>> You received this message because you are subscribed to the Google
>> Groups "sphinx-users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> Visit this group at http://groups.google.com/group/sphinx-users?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sphinx-users?hl=en.