generating PDF using latex for Chinese, Korean, Japanese

53 views
Skip to first unread message

Pieter Claeys

unread,
Oct 30, 2020, 1:00:17 PM10/30/20
to sphinx-users
Hi,
I'm failing miserably in building PDF's in Asian languages.
Is there some more up-to-date information besides this thread:
https://groups.google.com/g/sphinx-users/c/iaRNBHC_f5o/m/Acuwx26Nyq0J
I have tried copy-pasting the latex preamble - unsuccessfully

I'm using texlive on Ubuntu ;  using the xetex engine.
(thanks to already previous help for Greek https://groups.google.com/g/sphinx-users/c/ShObSH4HqKI/m/WluKK74FBQAJ

I have installed debian packages textlive-lang-japanese, but that's appearantly not enough.

Pieter Claeys

unread,
Oct 31, 2020, 3:50:01 AM10/31/20
to sphinx-users
Some more info on what is haunting me:
- Using sphinx 3.2.1 ;  latex_engine=xelatex  ; installed TeX Live 2019/Debian Full
- Translations to html all build without problems
- generating pdf fusing 'sphinxbuild -b latex -Dlanguage=XX'  ; running 'make' in the html dir
- PDF to Chines (zh_CW, zh_TW)  works (can't modify the topic title anymore)
- However, to PDF:
  • Korean generates a PDF , but there seems to be a font missing (many question mark characters)Screenshot from 2020-10-31 08-43-28.png
  • Japanese doesn't generate a PDF
    The error in the latex.log that comes first:
    ! LaTeX Error: This file needs format `pLaTeX2e'
                   but this is `LaTeX2e'.

    And a lot of
    Missing character: There is no リ in font [FreeSansBoldOblique.otf]/OT:script=latn;language=dflt;!
    Missing character: There is no ー in font [FreeSansBoldOblique.otf]/OT:script=latn;language=dflt;!
    Missing character: There is no ス in font [FreeSansBoldOblique.otf]/OT:script=latn;language=dflt;!
  • Arabic also fails latex building (no PDF generated ) at
    Package polyglossia Warning: Patchingbiditablefailed! on input line 75.
    ! Package bidi Error: Oops! you have loaded package xcolor after bidi package.
    Please load package xcolor before bidi package, and then try to run xelatex on
    your document again.
    See the bidi package documentation for explanation.
    Type  H <return>  for immediate help.

Pieter Claeys

unread,
Nov 1, 2020, 7:07:37 AM11/1/20
to sphinx-users
Update: got Japanese PDF working by simply having 'engine=platex' in conf.py

If anyone has a pointer how to check on the -Dlanguage=xx value inside the conf.py, that would be appreciated (then I can write an if Japanese then 'platex' else 'xelatex' ) 

Still looking for help for Arabic and Korean 

Komiya Takeshi

unread,
Nov 2, 2020, 12:19:15 PM11/2/20
to sphinx...@googlegroups.com
Hi,

How about passing `-D latex_engine=platex` from command line option on building Japanese docs.

Thanks,
Takeshi KOMIYA

2020年11月1日(日) 21:07 Pieter Claeys <pi3...@gmail.com>:
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/9fe87947-83aa-4e33-bb58-24444285d83cn%40googlegroups.com.

Daniel Scott

unread,
Nov 25, 2020, 10:28:05 PM11/25/20
to sphinx...@googlegroups.com
--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages