clerkma / ptex-ng

Asiatic pTeX
293 stars 31 forks source link

新版本无法部署 #33

Closed Jhering closed 6 years ago

Jhering commented 6 years ago

win 10,64位,texlive 完全安装,已经升级到最新。

我根据这里的指示: https://zhuanlan.zhihu.com/p/29370328

tlmgr key add tltexjp-key.asc tlmgr repository add http://texlive.texjp.org/current/tltexjp tltexjp tlmgr pinning add tltexjp "*" tlmgr install ptex-ng

安装了 ptex-ng 在win 10里面显示版本是

PS C:\WINDOWS\system32> ptex-ng This is Asiatic pTeX, Version 3.14159265 (W32TeX) (preloaded format=ptex-ng)

然后 编译tex文件时,报错:

PS D:> platex-ng 1.tex This is Asiatic pTeX, Version 3.14159265 (W32TeX) (preloaded format=platex-ng) entering extended mode (1.tex pLaTeX2e <2018-07-28u02>+1 (based on LaTeX2e <2018-04-01> patch level 5) (ctexart.cls (expl3.sty (expl3-code.tex ! Undefined control sequence.

\tex_shellescape:D l.25548 }

而1.tex 文件的内容是:

\documentclass[UTF8]{ctexart} \begin{document} 你好吗? \end{document}

然后,考虑到可能是ptex-ng的版本过老问题,我到w32tex的Ring Server 1 http://www.ring.gr.jp/archives/text/TeX/ptex-win32/current/

下载了http://www.ring.gr.jp/archives/text/TeX/ptex-win32/current/ptex-ng-w32.tar.xz

解压后,根据这个教程 https://zhuanlan.zhihu.com/p/29370328

将里面的lsotffea.exe/ptex-ng.exe/platex-ng.exe覆盖到TeX Live的可执行文件的文件夹下面,比如我机器上的:

C:\texlive\2017\bin\win32 如果是Linux或者Mac,那就手动编译然后替换就可以。

替换完之后,需要重新生成fmt文件:

fmtutil-sys --byengine=ptex-ng 之后就能正确运行了。

把三个文件 安装到texlive目录里,并且重新生成了fmt。

但是在shell里面运行ptex-ng,还是原来的版本

PS D:> platex-ng This is Asiatic pTeX, Version 3.14159265 (W32TeX) (preloaded format=platex-ng) **

无论怎么测试,换下载地址,先删fmt,不删fmt,ptexng的版本始终是3.14159265

编译 platex-ng 1.tex 还是通不过,报的错都是一模一样的。

好苦恼啊。

至于自己编译一个win使用的exe,我也试过,但自己只是个科研人员,并不是程序员,实在是不懂如何配置win下的开发环境,msvc和mysy2的各种库依赖看的我头大如斗,实在没有能力。只好向高手求助了。

在网上请教了大佬后,我把问题在这里反馈一下,希望能解决,帮助更多小白。 大佬深夜加班,不厌其烦地耐心指导,深受感动,在此一并谢过,祝ptex-ng越来越好!

stone-zeng commented 6 years ago

3.14159265 是 TeX 的版本号,而不是 ApTeX/pTeX-ng 的。

你的问题看样子可能是 LaTeX3 比较旧,texlive 的话命令行拿 tlmgr updated --self --all 升级一下宏包试试?

Jhering commented 6 years ago

感谢楼上回复。 出现这个问题之前,已经更新过texlive了, tlmgr update --self --all 已经做了。

PS C:\WINDOWS\system32> tlmgr update --self --all tlmgr.pl: package repositories main = http://mirror.ctan.org/systems/texlive/tlnet (verified) tltexjp = http://texlive.texjp.org/current/tltexjp (verified) tlmgr.pl: saving backups to d:/texlive/2018/tlpkg/backups PS C:\WINDOWS\system32>

Jhering commented 6 years ago

经楼上提示,latex版本是

PS D:> latex -version pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018/W32TeX) kpathsea version 6.3.0 Copyright 2018 Han The Thanh (pdfTeX) et al. There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the pdfTeX source. Primary author of pdfTeX: Han The Thanh (pdfTeX) et al. Compiled with libpng 1.6.34; using libpng 1.6.34 Compiled with zlib 1.2.11; using zlib 1.2.11 Compiled with xpdf version 4.00 PS D:>

现在我的ptex-ng 版本是

PS D:> platex-ng -version Asiatic pTeX (compiled time: 2018 Jul 17 10:28:45 with Win32/MSVC) Executable PATH: 'd:\texlive\2018\bin\win32\ptex-ng.exe'. Copyright 2014, 2015, 2016, 2017, 2018 Clerk Ma. banner: "This is Asiatic pTeX, Version 3.14159265 (W32TeX)" base: Y&Y TeX 2.3.0, pTeX 3.8.1, upTeX 1.23 Compiled with kpathsea version 6.3.0 Compiled with ptexenc version 1.3.6 Compiled with libotf version 0.9.16 Compiled with zlib version 1.2.11 Compiled with libyaml version 0.1.7 Compiled with mruby version 1.4.1 Compiled with synctex (build-in edition) Compiled with libdpx (build-in dvipdfmx) PS D:>

stone-zeng commented 6 years ago

你试一下这个链接:https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/win32/w32tex/。之前那个 FTP 上面的版本似乎没有更到最新。

Jhering commented 6 years ago

用了最新版的也是一样。。。

PS D:> platex-ng -version Asiatic pTeX (compiled time: 2018 Sep 24 07:26:32 with Win32/MSVC) Executable PATH: 'D:\texlive\2018\bin\win32\ptex-ng.exe'. Copyright 2014, 2015, 2016, 2017, 2018 Clerk Ma. banner: "This is Asiatic pTeX, Version 3.14159265 (W32TeX)" base: Y&Y TeX 2.3.0, pTeX 3.8.1, upTeX 1.23 Compiled with kpathsea version 6.3.0 Compiled with ptexenc version 1.3.6 Compiled with libotf version 0.9.16 Compiled with zlib version 1.2.11 Compiled with libyaml version 0.1.7 Compiled with mruby version 1.4.1 Compiled with synctex (build-in edition) Compiled with libdpx (build-in dvipdfmx) PS D:> platex-ng 1.tex This is Asiatic pTeX, Version 3.14159265 (W32TeX) (preloaded format=platex-ng) entering extended mode (1.tex pLaTeX2e <2018-07-28u02>+1 (based on LaTeX2e <2018-04-01> patch level 5) (ctexart.cls (expl3.sty (expl3-code.tex ! Undefined control sequence.

...n:D -\int_use:N \tex_epTeXversion:D l.25514 } ?

是不是和ctex宏包不兼容? 不是早就支持ctex宏包了么?

Jhering commented 6 years ago

下面的例子,则缺字特别多。 fandol字体已经安装。


\documentclass{book}

\begin{document}

【1】初命晋大夫魏斯、赵籍、韩虔为诸侯。
【1】周威烈王姬午初次分封晋国大夫魏斯、赵籍、韩虔为诸侯国君。
臣光曰:臣闻天子之职莫大于礼,礼莫大于分,分莫大于名。何谓礼?纪纲是也。何谓分?
君、臣是也。何谓名?公、侯、卿、大夫是也。
臣司马光曰:我知道天子的职责中最重要的是维护礼教,礼教中最重要的是区分地位,区分
地位中最重要的是匡正名分。什么是礼教?就是法纪。什么是区分地位?就是君臣有别。什
么是名分?就是公、侯、卿、大夫等官爵。

\end{document}

ptex-ng 能给几个中文排版的例子么? 字体怎么设置, 字号怎么设置, 等待。

aminophen commented 6 years ago
 (expl3.sty (expl3-code.tex
! Undefined control sequence.
...n:D -\int_use:N \tex_epTeXversion:D

l.25514 }

?

The error clearly comes from LaTeX3 expl3, not from CTeX-related packages. Expl3 has never supported ApTeX. Sometimes it actuallly worked, but that was not officially supported by LaTeX3 team.

e-pTeX and e-upTeX are officially supported by LaTeX3 team, so I guess ApTeX might become (unexplicitly) supported if ApTeX is always syncing with the latest e-pTeX/e-upTeX. That means, ApTeX should add all primitives whenever they are added to upstream e-(u)pTeX.

Jhering commented 6 years ago

Thank you for replying. I comment the

\int_use:N \tex_epTeXversion:D in the expl3-code.tex

and it works.

And how resolve this problem more officially?

aminophen commented 6 years ago

Send a request to @clerkma, to add the primitive \epTeXversion to ApTeX.

aminophen commented 6 years ago

Send a request to @clerkma, to add the primitive \epTeXversion to ApTeX.

Sorry, one caution: the addition of \epTeXversion means that ApTeX "pretends" to be like e-pTeX, but ApTeX is not fully compatible with e-pTeX. Therefore, that might cause another problems, but I cannot think of any for now.

clerkma commented 6 years ago

Fixed in commit 742fd030621ac385b204c00381bc5e5089937b1f.