> enrico.grego...@univr.it wrote: > > > When you highlight characters in a PDF and copy them you get the codes and > > all that it's attached to them. The problem with Roman numerals is that a > > "digit" has different meanings depending on the context. The "C" in "CXV" > > means 1, but in "CMXV" it means nothing by itself. > > I'm not entirely convinced that I agree. I would argue that the "C" > of "CXV" means "100", not "1"; in "CMXV" it means "subtract 100". > At least, that's what we were taught at school !
/We/ know that the "C" in "CXV" means "add 100", because we see the whole number. That "C" should be translated into a 1. But not when the "C" comes before an "M". And when we find "CC" we have to translate it into a 2. With the problems of the zeros in between, like in "CCII". If we store the number "CXV" as three glyphs, the information is lost when only one glyph is examined (for copying and pasting, for example). What the OP wants is that "CXV" is stored as a unique glyph representing 115. Maybe this can be done by reserving, say, five thousand slots in Unicode to contain the numbers from 1 to 5000 in Roman form that are built from the basic digits, embedding in the font (or in the typesetting engine) the algorithm for building them from the Western/Arabic representation. This might be done in two passes: represent the number using the codes for Roman numerals and start a ligaturing process. Actually, Roman numerals are mostly used when the numerical information is almost irrelevant as such. Nobody uses the "XIV" in "Louis XIV" to perform calculations. That's just a different way of writing "quatorze". I see it just as the ability to copy "quatorze" from a text and paste it into a worksheet cell accepting numbers to get 14. In the case of Roman numerals it may be simpler, of course. But is it useful? Ciao Enrico -- Enrico Gregorio + Dipartimento di Informatica + Tel: +39 045 8027937 enrico.grego...@univr.it + Università degli Studi di Verona + (grego...@math.unipd.it) + Strada le Grazie 15 / I-37134 Verona + Fax: +39 045 8027928 -------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex