Hi all!


I am a new user in sphinx. I am about to write some documentation in the 
greek language (hopefully there will also be some translations but this is 
another thing) 

and i decided to go with restructured text (rst) because then I can host it 
in gitlab and produce the documentation with sphinx in readthedocs.

I am using:


Ubuntu 19.10

Sphinx 1.8.5-3 (pyhton3-sphinx)

formiko 1.3.0-1 (editor to write my rst text)


At the beginning I was not able to produce any good PDF document with greek 
letters. That is, any greek letter with accent

(hopefully you will be able to see these examples in your system : ά , έ , 
ό  - the small sign on top of vowels indicating the stress of the word)

would not appear in the produced document. I think also capital letters 
would not appear at the pdf either, but I am not 100% sure at the moment.


I was able to find some workaround when I found out that I needed to change 
my configuration file , conf.py .

It turns out that in order to use the greek letters, one has to change the 
engine to either xelatex or lualatex - I chose xelatex.

And also, I used the same theme as readthedocs website is using - its 
called sphinx-rtd-theme .

Even more, I had to use some fonts that worked ok with greek letters - at 
the moment I am using 'Linux Libertine O' or 'Latin Modern Math' both 
producing pdf with the same output/issues.


There are a number of templates somebody can use for the output of the pdf 
document, and I chose 'Bjornstrup' because it omits the word 'chapter' in 
beginning of each of the chapters.

This is actually one of my issues, I can not change words that are part of 
the template to the greek transalated ones - I don't know how. And that is 
why I chose this specific template,

one that omits the word 'chapter' in the beginning of every chapter. 
However, it is not the preferred solution.


My second issue, is that, to what I think at the moment, the above 
configuration does not apply to the complete document. Even though I get a 
pdf document with greek letters, only 

some of them are according to the configuration - i.e using the font I set 
in conf.py . It seems that the rest of the letters are using some default 
font which I don't know. You can see this 

effect here :


https://ibb.co/hdhX9Tp


It is the table of contents (περιεχόμενα in greek) where you can see the 
chapters. As one can see, some letters are in 'bold' - i.e. the 
configuration is applied to those, but most of the letters

are in some other font 'non bold' .


Other than that, in my conf.py there are:

- language = none 


cause according to this 
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-language 


i think greek are not supported


'fncychap': r'''
    \usepackage[Bjornstrup]{fncychap}
%        \ChNameVar{\Huge\fontfamily{put}\selectfont\color{black}}%  Utopia
%        \ChNumVar{\Huge\fontfamily{pzc}\selectfont\color{blue}}% Zapf
%       
 \ChTitleVar{\Huge\fontfamily{phv}\selectfont\scshape\color{green}}% 
Helvetica
'''


to use the Bjornstrup template

I also tried to use the package 'fancyhdr' in order to edit header/footer 
with no success, probably due to package installation...



I would be grateful if somebody could offer a little help.

Thanks in advance

Nikos

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/c308ac78-7df1-4b2f-bfec-547e3bf3a80e%40googlegroups.com.

Reply via email to