Heiko Oberdiek wrote:
Another possibility are keyword options: \pdfescapehex lc {...} \pdfescapehex uc {...}
using keywords sounds ok to me
Variants: * short or long keywords: "lc" vs. "lowercase" * both "lc" and "uc" or one is the default, e.g. uppercase, then just one option is needed for lowercase output.
indeed
\pdflchex <number> => [0-f][0-f]... (even number of chars) \pdfuchex <number> => [0-F][0-F]...
* What happens with negative numbers? * same behaviour as \romannumeral * error message, invalid number
same as romannummeral
* What happens with zero? * nothing, same as \romannumeral * 0 * 00
this one is probably best
* The perhaps often used case 0-15 is converted to 00-0f with two digits?
indeed, an even number of digits
\pdflcchar
=> a-z \pdfucchar => A-Z That means "\pdflcchar 1" expands to "a" and "\pdfucchar 26" to "Z"?
indeed
The limitation to numbers from 1 to 26 is not clear to me.
i have no problem with A .. Z AA..ZZ etc \pdflcchar 27 -> AA
A \pdflcchar
, using the \lccode conversion table, would be more general. Or even a \pdflowercase, see below. as well as an expandable upper/lowercase (taco and i have this on the agenda anyway)
a) Do you mean an \uppercase and \lowercase that take a token list and convert the characters in there? b) Easier to implement should be an uppercase/lowercase command that takes a <general text>, expands it, makes a string and applies uppercase/lowercase conversion.
indeed
*) Conversion according to \uccode/\lccode? Or C-locale or something else?
no locales, just uccode/lccode (when pdftex goes unicode/opentype we can use the info in unicode tables cq. fonts) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------