Le 28/09/2019 à 16:52, Pieter Claeys a écrit :
*About pdflatex with greek*
I then then got quite a bit further, only  remaining problem was that
pdflatex erorred on the copyright © and trademark ™ characters. Deleting
those built the document, and indeed, as you mentioned, every roman
character was converted to Greek alphabet. That was already fine for me, I
just needed some Greek translation:-)

Hi Pieter,

Only answering that bit. I think you have hit against some bug
of core LaTeX package babel in presence of hyperref.

(I may make a bug report after some more digging to make sure
I have well analyzed the problem).

To fix that I added this to my conf.py

latex_elements = {
    # The paper size ('letterpaper' or 'a4paper').
    #
    'papersize': 'a4paper',

    'fontenc': r'\usepackage[LGR,T1]{fontenc}',

    'preamble': r'''
\AtBeginDocument{\renewcommand\ensureascii[1]{{\fontencoding{T1}\selectfont#1}}}
'''
}


where the fix is the 'preamble' key

(by the way I suppressed X2 from fontenc options, because this is for cyrillic 
support)

The bug is that babel package (which provides \ensureascii) uses PU encoding
which is some device of package hyperref for bookmarks.

I believe this is a bug of babel. (perhaps a known issue)

This being said, Greek language is **not** supported by Sphinx + pdflatex
(I should have stated that clearer earlier but I was not sure
myself, nothing existed in Sphinx documentation, even before
I started botchering it ;-) )
mainly for the reasons I stated which is that the set-up is
fine
only for a document using exclusively the Greek script and
nothing Ascii/Latin.

Thus I am **very** glad that Sphinx + xelatex does work for you...

Last remark: the \ensureascii things is for LaTeX babel package
version 3.9i or later, babel is one of those packages which do
not bother communicating to user a complete change log
matching version numbers and release dates and the relatively
new github repo has no tags. But with some digging in babel.dtx
I found
% \changes{babel~3.9i}{2014/02/14}{Macro added, to replace
%    \cs{textlatin} and friends}
thus I
guess this means you need TeXLive 2014 at least.
(Sphinx currently officially requires TeXLive 2015 at least
or Distro packaging of the same like Debian thus we are
safe supposedly).

Best,

Jean-François


--
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 sphinx-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/qmqaku%244sf2%241%40blaine.gmane.org.

Reply via email to