clerkma / ptex-ng

Asiatic pTeX
293 stars 31 forks source link

ltnews31, ptex-p3.8.3 #47

Closed aminophen closed 4 years ago

aminophen commented 4 years ago

pdfTeX primitives

As stated in ltnews31, LaTeX will require many pdfTeX-derived primitives.

I see the following issues:

pTeX primitives

Please see changes in pTeX r53726-r53727; current ptex-ng returns wrong values in fetching \kansujichar. The below is a test suite. (expected output is shown in comments)

%% block 1
\showthe\kansujichar1\relax % => 19968.
\showthe\dimen200\relax     % => 0.0pt.
\showthe\kansujichar1\relax % => 19968.
\showthe\skip200\relax      % => 0.0pt.
\showthe\kansujichar1\relax % => 19968.
\showthe\count200\relax     % => 0.
\showthe\kansujichar1\relax % => 19968.

%% block 2
\showthe\kansujichar10\relax % => ! Invalid KANSUJI number (10). % => 10.
\showthe\dimen200\relax      % => 0.0pt.
\showthe\kansujichar10\relax % => ! Invalid KANSUJI number (10). % => 10.
\showthe\skip200\relax       % => 0.0pt.
\showthe\kansujichar10\relax % => ! Invalid KANSUJI number (10). % => 10.
\showthe\count200\relax      % => 0.
\showthe\kansujichar10\relax % => ! Invalid KANSUJI number (10). % => 10.

\end
clerkma commented 4 years ago

Thanks. Current status is listed here:

For the last three primitives, I still need one day or two.

clerkma commented 4 years ago

finished with 9d276ee5cc5bfec5f2a050c4c1a53ea7e763b8b8.

aminophen commented 4 years ago

Thanks, all of them are working as expected!

I noticed some additional differences between euptex and ptex-ng:

%#!euptex
\jfont\x=upjisr-h \x
\showthe\fontcharwd\jfont`°\relax % => should be "10.0pt"
\showthe\fontcharwd\jfont"B7\relax % => should be "5.0pt"
\showthe\fontcharwd\jfont`ー\relax % => 10.0pt
\showthe\fontcharwd\jfont`、\relax % => 5.0pt
\showthe\fontcharwd\jfont`(\relax % => 5.0pt
\showthe\fontcharwd\tfont`漢\relax % => 10.0pt
\bye
    * eptex.ech: Revise \iffontchar and \fontchar?? to treat
    negative value as char_type.
      - \iffontchar (Japanese font f) (number c):
        - c >= 0: true iff is_char_kanji(c)
        - c < 0: true iff f has char_type -(c+1)
      - \fontcharwd (Japanese font f) (number c):
        - c >= 0: return the width of character c
        - c < 0: return the width of char_type -(c+1)
clerkma commented 4 years ago

fixed in ddd1535546585af42036e73db7e5e7896aaa544e.

aminophen commented 4 years ago

Sorry for late reply, confirmed thanks!