\tagcode web patch

This is a Web patch file for pdfetex.

The change file creates an extra primitive named \tagcode, allowing read and write access to a character's char_tag info. The associated internal command is assign_font_int, with the new modifier value tag_code.

The only write operation that is (currently) performed is clearing the value of the char_tag, so it is more like `read/delete access. The operation is done by substracting a value based on the users input, using the following rules:

  1. If the character doesnt exist, return immediately.
  2. If the users input is less than -7, it is first changed to -7.
  3. If the supplied input is positive, it is converted to 0.
  4. If the input is -4 or less, ext_tag will be cleared, and the input is increased by 4.
  5. If the input is now -3 or -2, list_tag will be cleared, and the input is increased by 2.
  6. If the input is now -1, lig_tag will be cleared.

Nothing other that the char_tag value is changed, and nothing is saved. Changes are therefore irreversible. The primitive works directly on the font_info array, so all changes are \global, as for the other font assignment primitives.

If the character does not exist, the read operation returns -1. Otherwise, the return value is the 4 if ext_tag was set, 2 if list_tag was set, 1 if lig_tag was set, or 0 if the tag value was no_tag. The return values are chosen in such a way as to be consistent with the absolute value of the argument in the assigment case.

 The \tagcode change file for pdfetex

 A plain tex test file

Taco