Hello list,

Currently, docs.python.org has stopped generating PDF documents in Japanese 
due to a failure. I am trying to restart it by changing the latex engine 
from platex to LuaTeX, but I need help with the following error.

Building following document causes Arithmetic overflow error with lualatex:

$ cat source/index.rst
1111111111111
#############

2222222222222
*************

3333333333333
=============

4444444444444
-------------

:class:`555555555555555`
^^^^^^^^^^^^^^^^^^^^^^^^

+-------------+------+
| 0000000     | AAAA |
|             +------+
|             | BBBB |
+-------------+------+

$ cat source/conf.py
project = 'test1'
copyright = '2023, a'
author = 'a'

extensions = []

templates_path = ['_templates']
exclude_patterns = []

language = 'ja'

html_theme = 'alabaster'
html_static_path = ['_static']

latex_engine="lualatex"

latex_docclass = {
'manual': 'ltjsbook',
'howto': 'ltjsarticle'
}

$ make latexpdf
...
...
! Arithmetic overflow.
\sphinx@@multirow ... \divide \count@ \count \tw@
                                                  \advance \dimen@ -\count@ 
...

l.64 \end{tabulary}


The error doesn't happen if I replace the row

:class:`555555555555555`
^^^^^^^^^^^^^^^^^^^^^^^^

with 

the :class:`555555555555555`
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I reproduced the error on Ubuntu and macOS.

Ubuntu:

$ sphinx-build --version
sphinx-build 6.1.3

$ lualatex --version
This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian)

$ uname -a
Linux u2204 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 
x86_64 x86_64 x86_64 GNU/Linux

macOS:

$ sphinx-build --version
sphinx-build 6.1.3

$ lualatex --version
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)

$ uname -a
Darwin mbp16.local 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 
PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64

To reproduce, I created a github repository of the sphinx project at:
    https://github.com/atsuoishimoto/lualatex-arithmetic-overflow

With the repo, you can reproduce with:

$ git clone [email protected]:atsuoishimoto/lualatex-arithmetic-overflow.git
$ cd lualatex-arithmetic-overflow/sphinx-error
$ make latexpdf

As I am new to TeX, I cannot determine if this problem is due to  Sphinx's 
TeX styles or a bug in LuaTeX. Any advice would be appreciated.

Regards,

-- 
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/d39abd23-6713-44b3-be93-4ba42844e371n%40googlegroups.com.

Reply via email to