Le 27/09/2019 à 00:24, jfbu a écrit :
Le 26/09/2019 à 21:25, Pieter Claeys a écrit :
OK, right, I've trimmed it down even further.
I don't have perl installed so 'make latexpdf' isn't an option at the
moment; I do two-step  'make latex' and then 'pdflatex <filename>.tex'

I've got the most basic setup now - see attached files
- an index.rst
- a conf.py
- a python requirements.txt

For me, pdflatex stops with the error at \sphinxmaketitle
Would be interesting to know if that builds on your machine...


Hi, thanks for small project.

I don't seem to have issues with it at my locale:

greektest$ make latex
Sphinx v2.2.0 en cours d'exécution
Chargement des traductions [el]...fait
création du répertoire de sortie... fait
construction en cours [mo]:targets for 0 po files that are out of date
construction en cours[latex]: all documents
updating environment: [nouvelle configuration] 1 added, 0 changed, 0 removed
lecture des sources...[100%] index
recherche des fichiers périmésaucun résultat
pickling environment... fait
checking consistency... fait
processing greektest.tex... index
résolution des références...
fait
writing... fait
copying TeX support files... copie des fichiers de support Tex...
fait
compilation réussi.

Les fichiers LaTex se trouvent dans _build/latex.
Run 'make' in that directory to run these through (pdf)latex
(use `make latexpdf' here to do that automatically).


(the above uses French language for user interaction ; unfortunately
quite a few strings were badly translated by some contributor some
months ago -- see for example "compilation réussi" -- I have fixed
dozens of strings at transifex but this will have to wait next major release
for incorporation)

Then

greektest$ cd _build/latex/
latex$ pdflatex greektest
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded 
format=pdflatex)
[.... lots of console output ...]
Package rerunfilecheck Warning: File `greektest.out' has changed.
(rerunfilecheck)                Rerun to get outlines right
(rerunfilecheck)                or use package `bookmark'.


LaTeX Font Warning: Some font shapes were not available, defaults substituted.


LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

  )</usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
</usr/local/texlive/2019/texmf-dist/fonts/type1/public/cbfonts/grmn1000.pfb></u
sr/local/texlive/2019/texmf-dist/fonts/type1/public/cbfonts/gsmn1440.pfb></usr/
local/texlive/2019/texmf-dist/fonts/type1/public/cbfonts/gsxi1728.pfb></usr/loc
al/texlive/2019/texmf-dist/fonts/type1/public/cbfonts/gsxn1000.pfb></usr/local/
texlive/2019/texmf-dist/fonts/type1/public/cbfonts/gsxn1200.pfb></usr/local/tex
live/2019/texmf-dist/fonts/type1/public/cbfonts/gsxn1728.pfb></usr/local/texliv
e/2019/texmf-dist/fonts/type1/public/cbfonts/gsxn2488.pfb>
Output written on greektest.pdf (5 pages, 85188 bytes).
Transcript written on greektest.log.


Thus no error (but an invitation to execute pdflatex again)

Your error with \sphinxmaketitle can come from a custom latex_documents docclass
see https://github.com/sphinx-doc/sphinx/pull/6683

Note: running pdflatex once is definitly not enough:
as LaTeX reports you need at least one additional runs.

A make.bat is provided that you will find in the latex build repertory

As you are on Windows it uses old Sphinx approach hence does *not* use
latexmk hence does not require Perl

I don't know the Windows syntax but on Linux it would be make all-pdf
in the LaTeX build repertory to get the PDF correctly done

I tried the same with TeXLive 2018 and it compiles the same.

I tried also with Sphinx 2.1.2 with same result.

I would need

1. greektest.tex

2. greektest.log after the failed pdflatex run

Ideally if you add manually the line to greektest.tex

\tracingmacros1

immediately after the line

\begin{document}

and execute

pdflatex --halt-on-error greektest.tex

the greektest.log file will contain important information to debug the problem.

Make sure you remove the latex build repertory first and do a clean make latex 
at root of project.


Some additional remarks :


1. Sphinx does not support truly multilingual documents for latex output.

2. If you pass "el" as language which will translate as "greek" LaTeX
documentclass option, the ENTIRE document MUST be GREEK.
Any Latin string such as "aaaa" will look like "αααα" in PDF.
This is caused by the fact that babel with "greek" will make LGR
the main font encoding. There is NO WAY with pdflatex to get ascii "a"
to automatically trigger back T1 font encoding. LaTeX was conceived
as requiring user extra manual markup like \fontencoding{T1}\selectfont

And one sees "γρεεκτεστ" in PDF output which originates in "greektest"
for the project title.

(this is despite your \usepackage[LGR,T1]{fontenc}. The "greek" option
will make LGR main encoding anyhow)

3. This problem disappears if the LaTeX document uses "english" as option.
Then Sphinx latex writer has a mechanism to handle with the help of
subsitutefont package Greek letters. If Greek letters are 90% of document
it will still mostly work.

All of the above is with traditional pdflatex.


I suggest you try rather

latex_engine = "xelatex"

and then do NOT customize "fontenc" key at all.

Recent Sphinx uses then GNU FreeFont which supports Greek script.

It works well at my locale : Latin words show up as Latin in PDF output,
and Greek is rendered correctly including Table of contents etc...

In fact I don't think there is really Sphinx support for PDF
(via make latex and then pdflatex)
together with Greek as main document language.

The only way is to use xelatex or lualatex.

Except if EVERYTHING is translated into Greek, OR the language option
of the LaTeX file is NOT Greek. I know this is weird.

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/qmjfnh%246n5c%241%40blaine.gmane.org.

Reply via email to