Quantcast
Channel: What are lccode and uccode used for? - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 3

What are lccode and uccode used for?

$
0
0

In TeX, each of the 256 bytes has an associated \lccode and an \uccode, integers in the range [0,255] which indicate among other things how \lowercase and \uppercase act. There are of course a bunch of other numbers (mathcode, and catcode for instance), but I am focusing here on case-changing codes.

A look at the TeXbook tells me about the following uses of the \lccode and \uccode:

  • \lowercase<general text> turns each character token in the argument into a character token with the same category code, but a character code equal to the \lccode of the original character code, unless the \lccode is zero, in which case, the original character code is retained.

  • \uppercase<general text> behaves in the same way, using the \uccode instead.

  • When hyphenating, TeX takes whatever characters reached its stomach (so either from tokens with category code 11 or 12, or from chardef'd tokens, or char), and defines a "letter" to be a character with non-zero \lccode. A letter is lowercase if its \lccode is equal to its character code.

Is this all? In particular, does TeX use the \uccode for any purpose other than the \uppercase primitive? What about other engines, pdfTeX, XeTeX, and LuaTeX?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>