New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[upTeX] Unexpected behaviour in kinsoku processing #57

Man-Ting-Fang opened this Issue Apr 12, 2018 · 3 comments


None yet
2 participants

Man-Ting-Fang commented Apr 12, 2018

In the following example, U+301C and U+301E are also affected, but this is not what I want. Did I misunderstand something?



%\inhibitxspcode\ucs"301C=0\relax % ukinsoku.tex






This comment has been minimized.


aminophen commented Apr 28, 2018

@Man-Ting-Fang Thanks for the report.

Some background:

  • pTeX has two internal tables, called "KINSOKU table" (for registering \prebreakpenalty / \postbreakpenalty) and "INHIBIT table" (for registering \inhibitxspcode). In the following explanation, I'll focus only on "KINSOKU table" for simplicity.
  • Each entry is comprised of [1] a character code (e.g. U+301C), [2] the place for insertion (pre or post), and [3] the penalty value (e.g. 10000). The table can save only 256 entries.
  • When typesetting, pTeX searches through the KINSOKU table, and inserts a penalty when an entry for the character code is found.

Recent changes (between TeX Live 2017 and 2018):

  • The documentation (from ancient days!) said that "the table region is freed when the value is set to the default (0 for KINSOKU / 3 for INHIBIT)"; however it was not true until pTeX 3.8.0, as the table is never freed forever once it is occupied".
  • We fixed that behavior in pTeX 3.8.0, so that it frees a table entry when it is set to default, as described in #26 (in Japanese).
  • However, we overlooked that the search routine was incomplete; when an entry is freed, the table becomes discontinuous and the routine fails to go through the whole table. This can be an unexpected regression introduced in TeX Live 2018.

The patch by @h-kitagawa (master...search_kinsoku) fixes this issue.

@aminophen aminophen closed this in 73e16f9 Apr 28, 2018


This comment has been minimized.


aminophen commented Apr 28, 2018

Done (r47477).


This comment has been minimized.

Man-Ting-Fang commented Apr 29, 2018

@aminophen @h-kitagawa Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment