dviasm and python 3 #7
Comments
|
I tried that a while ago, but ran into several problems (the code is doing lots of fiddling with bytes, and the Python 3 distinctions between bytes and strings requires changes everywhere). |
|
On the texlive mailing list, Norbert just commented that python 2 will be deprecated at the end of the year and that a number of distribuations will remove it. https://tug.org/pipermail/tex-live/2019-November/044366.html |
|
Some one has to step forward and do the port, or we might just retire this tool. |
|
Fixed with #8, I’ll upload to CTAN sometime next week. |
|
Hi @khaledhosny @reutenauer Interestingly, the very same file works when I run dviasm without The input is I guess irrelevant, but here it is: |
|
Should be fixed now (I hope). |
|
Hmmm ... |
|
I can reproduce that, but then again the current Which is not to say that we shouldn’t try to fix the bug, of course. But the conversion to Python 3 seems very faithful :-) |
|
When compiling with upTeX, you should NOT use -p option; it's only for pTeX. (As a maintainer of pTeX, sorry about not providing way of detecting whether a DVI is generated by pTeX or by upTeX.) |
|
By the way, I cannot re-compile the dumped text back into a new DVI. % hello.tex
\font\x=ec-lmr10\x Hello, \TeX!\byeOK with the current python2 version Error with python3 version |
|
@aminophen I’m really sorry, I didn’t even test that at all. Hence it’s not suprising that it fails. Let me have a look now (and catch the |
|
Can you try the file from my master branch now? It works on your example although I note that the “undumped” DVI file is not identical to the original one. But the result is the same as with the Python 2 version. |
|
@reutenauer yes, that version works without any problem! |
|
@reutenauer Testing your master branch, I noticed two issues:
|
|
Thanks @aminophen. Better now? |
|
Thanks @reutenauer, now it seems ok on pTeX. I noticed another problem on XeTeX: please find the file "native.xdv" available here. Converting XDV -> Text, I see extra "b" in the beginning of 34c34
< xxx: 'pdf:pagesize default'
---
> xxx: b'pdf:pagesize default'
43c43
< fnt: "c:/w32tex/share/texmf-dist/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf:color=220022FF" at 10pt
---
> fnt: "b'c:/w32tex/share/texmf-dist/fonts/opentype/public/tex-gyre/texgyretermes-regular.otf':color=220022FF" at 10pt |
|
Thanks @aminophen, I can reproduce that too. The |
|
Thanks @reutenauer, XDV decode and compilation become OK: Lots of diagnostics are printed during compilation, it would be nice to silence them. Good news: the py2 version could not decode U+10000 or larger code point: However, the py3 version works just fine with |
|
One more proposal: The help message contains but it may be misleading for upTeX users who should not use this option. it should be |
@reutenauer Thanks. I noticed another problem: this was present also in py2 version. Save the following as "uptate.tex" %#!uptex
\shipout\vbox{\hbox{\dtou 吉野家}\hbox{\yoko 吉野家}\hbox{\tate 吉野家}}
\byeThe resulting "uptate-3.dvi" is invalid, since the id byte is 2 instead of 3. Please refer to "ptex-guide-en.pdf" (
|
|
I’ll wait a few more days then push to CTAN. |
|
@khaledhosny @reutenauer Thanks, all test files I can conceive of are fine now. |
|
I uploaded the new release to CTAN. |
dviasm doesn't work with python 3. Would it be possible to update it or add a python 3 variant?
The text was updated successfully, but these errors were encountered: