-
Notifications
You must be signed in to change notification settings - Fork 33
Overview of pTeX ng
pTeX-ng is a C-based implementation of TeX82, as a direct descendant of Y&Y TeX, a incremental in early years (https://www.tug.org/yandy/). Based on Y&Y TeX, pTeX-ng introduces patches from e-TeX, pTeX and upTeX. The core functions of TeX82 were written in C89 from scratch. That is, pTeX-ng is not a WEB2C based version of TeX.
The license of pTeX-ng is GPLv2.
pTeX-ng is able to work on Windows, Mac OS X, Linux and Android.
[hi clerk - i hope the license of yout code is really gplv2-or-later, because if it's gplv2-only, many complications ensue. that's why tug released the original y&y code under gplv2-or-later. --karl]
Because pTeX-ng uses libdpx, a library version of DVIPDFMx, as its output backend, pTeX-ng could generate PDF file directly. Compared with pdfTeX and XeTeX, who are also have this ability, the new pTeX-ng has serval advantages. The extending pdfTeX uses a non-trival way to support kanji and tate text (pdfTeX does not support OpenType and CMap of CJK). XeTeX uses popen
to open a pipe to send XDV data to DVIPDFMx, and then generate the PDF output. However, pTeX-ng is linked with libdpx. PDF operations in pTeX-ng, such as creating a new page or outputing a char/kanji, are done by a direct call of libdpx's C funcions. Hence, pTeX-ng provides a much better and faster way to generate PDF file.
pTeX-ng does not support DVI.
All primitives from e-TeX, pTeX and upTeX are supported, and thus, pTeX-ng is fully compatible with these engines.
Primitives for measuring char's metric from e-TeX are extended to work with kanji's metric. They are:
-
\fontcharwd
-
\fontcharht
-
\fontchardp
For example, the macros below will output 5.0pt.
\the\fontcharwd\tenmin`,
Anyway, there only four pdfTeX primitives are supported right now and these primitives share the same behavior with those from pdfTeX. They are:
-
\pdfhorgin
-
\pdfvorgin
-
\pdfpagewith
-
\pdfpageheight
Some equivlent primitives to pdfTeX's will be added progressively in the future.