"Very dirty" localisation request for a rainy evening
Hello Hans, Today I saw a webpage of someone, who is very active in the field of translation and localisation of free software into Slovenian. It astonished me the way he numered the items on his webpage: (a) approximation ... (b) Gauss ... (c) numerical solutions ... (č) solving parabolic ... % [\ccaron] (d) ... This should actually be the only proper way to number items in Slovenian, but you can imagine that nobody is able to use that since the beginning of computer era. (Another example is the usage of quotation marks: most people use the American quotation marks instead of the German ones just because MS Word defaults to that.) However, those people who really care, use the Slovenian alphabet when enumerating (manually, of course). I'm proud, for example, that I was in the class "1.Č" in the high school. Not right away, but any time in the future when unicode, fonts and similar will be updated/reimplemented/fully supported and when it will be raining cats and dogs and nothing interesting will be on TV: can you think on this this tiny request to switch to local enumeration if \mainlanguage[sl] (or any other language with a similar request) is selected? In a similar way as the sorting rules are applied in this kind of documents. (I'll take the response for "backward compatibility" issues (documents that now use enumeration a, b, c, d would use another enumeration afterwards) - if anyone would complain, he would have to talk to me first!!!) I don't know if there is any special agreement in case there are more than 26 items in the list, but sometimes a, b, ... x, y, z, aa, ab, ac, ... zz, aaa, aab, aac, ... is used. I never needed that many items until now, but the issue could theoretically be interesting for the others. Trying to use more than 26 items results in an arror at the moment. Thanks, Mojca
At 02:01 PM 7/26/2005, Mojca Miklavec wrote:
Hello Hans, Today I saw a webpage of someone, who is very active in the field of translation and localisation of free software into Slovenian. It astonished me the way he numered the items on his webpage: (a) approximation ... (b) Gauss ... (c) numerical solutions ... (è) solving parabolic ... % [\ccaron] (d) ... This should actually be the only proper way to number items in Slovenian, but you can imagine that nobody is able to use that since the beginning of computer era.
As it happens, I've just been looking at the ConTeXt code for doing counters as characters, and it's really pretty simple: \def\character#1% {\ifcase#1\unknowncharacter \or a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m% \or n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z% \else \unknowncharacter \fi} (There's also an equivalent \Character for the uppercase letters.) All you need to do Solvenian ordering is to put a \ccaron in the list between c and d, and maybe call the macros "sloveniancharacter" and "slovenianCharacter" to keep them distinct. Then, when you want to specify a numbering format for an enumeration, you should be able to use "conversion=solveniancharacter" rather than "conversion=characters". This isn't quite a complete solution -- ConTeXt has some more code that defines a \characters macro (with the "s" on the end) that keeps counting after "z", as x, y, z, aa, ab, ac, and so on. Duplicating that requires only a little more work. - Brooks
Mojca Miklavec wrote:
I don't know if there is any special agreement in case there are more than 26 items in the list, but sometimes a, b, ... x, y, z, aa, ab, ac, ... zz, aaa, aab, aac, ... is used. I never needed that many items until now, but the issue could theoretically be interesting for the others. Trying to use more than 26 items results in an arror at the moment.
in core-con.tex locate 26-) and replace that by 26-1) \startitemize[a,columns,three,packed,broad] \dorecurse{100}{\item test\endgraf} \stopitemize ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Mojca Miklavec wrote:
This should actually be the only proper way to number items in Slovenian, but you can imagine that nobody is able to use that since the beginning of computer era. (Another example is the usage of quotation marks: most people use the American quotation marks instead of the German ones just because MS Word defaults to that.)
in addition to Brooks answer a goody for your wiki page: \def\mojcaniannumber#1% {\ifcase#1 \or m\or o\or j\or c\or a\or m\or i\or k\or l\or a\or v\or e\or c\else \expandafter\mojcaniannumber\expandafter{\the\numexpr#1-13\relax}\fi} \defineconversion[s][\mojcaniannumber] \starttext \startitemize[s,columns,three,packed,broad] \dorecurse{100}{\item test\endgraf} \stopitemize \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Mojca Miklavec wrote:
However, those people who really care, use the Slovenian alphabet when enumerating (manually, of course). I'm proud, for example, that I was in the class "1.Č" in the high school.
Not right away, but any time in the future when unicode, fonts and similar will be updated/reimplemented/fully supported and when it will be raining cats and dogs and nothing interesting will be on TV: can you think on this this tiny request to switch to local enumeration if \mainlanguage[sl] (or any other language with a similar request) is selected? In a similar way as the sorting rules are applied in this kind of documents.
(I'll take the response for "backward compatibility" issues (documents that now use enumeration a, b, c, d would use another enumeration afterwards) - if anyone would complain, he would have to talk to me first!!!)
So, what is the order of the slovenian national alphabet? ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hi Mojca
Not right away, but any time in the future when unicode, fonts and
the future is now ... \def\mojcaniannumber#1% {\ifcase#1 \or m\or o\or j\or c\or a\or m\or i\or k\or l\or a\or v\or e\or c\else \expandafter\mojcaniannumber\expandafter{\the\numexpr#1-13\relax}\fi} \defineconversion[sl][a][\mojcaniannumber] \starttext \startitemize[a,columns,three,packed,broad] \dorecurse{10}{\item test\endgraf} \stopitemize \language[sl] \startitemize[a,columns,three,packed,broad] \dorecurse{10}{\item test\endgraf} \stopitemize \stoptext ----------------------------------------------------------------- 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 -----------------------------------------------------------------
At 02:01 PM 7/26/2005, Mojca Miklavec wrote:
Hello Hans, Today I saw a webpage of someone, who is very active in the field of translation and localisation of free software into Slovenian. It astonished me the way he numered the items on his webpage: (a) approximation ... (b) Gauss ... (c) numerical solutions ... (è) solving parabolic ... % [\ccaron] (d) ... This should actually be the only proper way to number items in Slovenian, but you can imagine that nobody is able to use that since the beginning of computer era. (Another example is the usage of quotation marks: most people use the American quotation marks instead of the German ones just because MS Word defaults to that.) However, those people who really care, use the Slovenian alphabet when enumerating (manually, of course). I'm proud, for example, that I was in the class "1.È" in the high school. Not right away, but any time in the future when unicode, fonts and similar will be updated/reimplemented/fully supported and when it will be raining cats and dogs and nothing interesting will be on TV: can you think on this this tiny request to switch to local enumeration if \mainlanguage[sl] (or any other language with a similar request) is selected?
I decided that this would be a good excuse to learn a little more about how ConTeXt handles enumerations. It turns out (as Hans just mentioned while I was writing this!) that there is already the functionality to define language-specific enumerations, so no need to wait for that. So, anyhow, I wrote up a short third-party module to handle Slovenian character enumeration (can I presume that the rest of the alphabet ordering is the same as English?), along with a test file. You can get them here for now: http://dpdx.net/context/slovenian/ Hans (or anyone else who knows more than I do), is there a better place to put this? - Brooks
You people are just impossible, I have nothing else to say! I don't even have time to test the first answer when already another three or five posts appear on the list !!! If it is going to continue that way, I'll soon become affraid of the (black) magic ruling the list :) Thanks a lot. I dind't expect the answer so soon ... I promiss to put it on the wiki (probably not tonight, but as soon as possible). Brooks Moses wrote:
I decided that this would be a good excuse to learn a little more about how ConTeXt handles enumerations. It turns out (as Hans just mentioned while I was writing this!) that there is already the functionality to define language-specific enumerations, so no need to wait for that.
So, anyhow, I wrote up a short third-party module to handle Slovenian character enumeration (can I presume that the rest of the alphabet ordering is the same as English?),
Ordering is the same, but in English some very strange letters are used in addition to the "standard alphabet" :) \or a\or b\or c\or \ccaron\or d\or e\or f\or g\or h\or i\or j\or k\or l% \or m\or n\or o\or p\or r\or s\or \scaron\or t\or u\or v\or z\or \zcaron% \or A\or B\or C\or \Ccaron\or D\or E\or F\or G\or H\or I\or J\or K\or L% \or M\or N\or O\or P\or R\or S\or \Scaron\or T\or U\or V\or Z\or \Zcaron% (sorry, the line endings were probably broken) along with a test file. You can get
them here for now:
http://dpdx.net/context/slovenian/
Hans (or anyone else who knows more than I do), is there a better place to put this?
- Brooks
Thank you very much again, Mojca
At 04:35 PM 7/26/2005, Mojca Miklavec wrote:
Brooks Moses wrote:
So, anyhow, I wrote up a short third-party module to handle Slovenian character enumeration (can I presume that the rest of the alphabet ordering is the same as English?),
Ordering is the same, but in English some very strange letters are used in addition to the "standard alphabet" :)
\or a\or b\or c\or \ccaron\or d\or e\or f\or g\or h\or i\or j\or k\or l% \or m\or n\or o\or p\or r\or s\or \scaron\or t\or u\or v\or z\or \zcaron%
Ok; I've updated the versions on my website to include the other two extra characters as well. http://dpdx.net/context/slovenian/ Does the test file look like it does all of the enumerations correctly now?
Thank you very much again,
You're quite welcome! - Brooks
Brooks Moses wrote:
Mojca Miklavec wrote:
Brooks Moses wrote:
So, anyhow, I wrote up a short third-party module to handle Slovenian character enumeration (can I presume that the rest of the alphabet ordering is the same as English?),
Ordering is the same, but in English some very strange letters are used in addition to the "standard alphabet" :)
\or a\or b\or c\or \ccaron\or d\or e\or f\or g\or h\or i\or j\or k\or l% \or m\or n\or o\or p\or r\or s\or \scaron\or t\or u\or v\or z\or \zcaron%
Ok; I've updated the versions on my website to include the other two extra characters as well.
http://dpdx.net/context/slovenian/
Does the test file look like it does all of the enumerations correctly now?
Only the four "extra English characters" are still too much (so there are 25 characters altogether) ... otherwise it looks just perfect! I'm looking forward to what my LaTeX colleagues will say about that when I present them ConTeXt and the tricks like that :)
\dorecurse{30}{\item test\endgraf}
There's always something new that I learn. After I figured out that \dorecurse{30}{\item test} doesn't work, I gave up and used copy-paste instead. Thanks for this little tricky detail as well! Thank you all, Mojca
At 05:29 PM 7/26/2005, Mojca Miklavec wrote:
Brooks Moses wrote:
Ok; I've updated the versions on my website to include the other two extra characters as well.
http://dpdx.net/context/slovenian/
Does the test file look like it does all of the enumerations correctly now?
Only the four "extra English characters" are still too much (so there are 25 characters altogether) ... otherwise it looks just perfect!
Oh, I missed those -- that's what you meant by "strange English characters"! Sorry about that. I've taken those out now, and corrected the numbers in the "docharacters" macro, so it should now be working properly.
\dorecurse{30}{\item test\endgraf}
There's always something new that I learn. After I figured out that \dorecurse{30}{\item test} doesn't work, I gave up and used copy-paste instead. Thanks for this little tricky detail as well!
That one's from Hans; I simply borrowed it from his example. :) - Brooks
Oh, one more thing.... At 05:29 PM 7/26/2005, Mojca Miklavec wrote:
I'm looking forward to what my LaTeX colleagues will say about that when I present them ConTeXt and the tricks like that :)
After you've had your fun with them, you can give them the slovenianletters.sty file (and the associated latex_slovenian.tex test file) that's now up in the same directory, and then they can do the same in LaTeX. :) It doesn't do the clever "aa, ab, ac, ..." continuation after \zcaron that ConTeXt allows, though; it just gives an error for any number after 25, same as LaTeX's default alphabetic enumerations do for numbers after 26. And ConTeXt's multicolumn enumerations are much nicer for demonstrating this sort of thing! - Brooks
Mojca Miklavec wrote:
There's always something new that I learn. After I figured out that \dorecurse{30}{\item test} doesn't work, I gave up and used copy-paste instead. Thanks for this little tricky detail as well!
did you put a \startitemize \stopitemize around it? otherwise \item expects to end with a \par 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 -----------------------------------------------------------------
Brooks Moses wrote:
At 04:35 PM 7/26/2005, Mojca Miklavec wrote:
Brooks Moses wrote:
So, anyhow, I wrote up a short third-party module to handle Slovenian character enumeration (can I presume that the rest of the alphabet ordering is the same as English?),
Ordering is the same, but in English some very strange letters are used in addition to the "standard alphabet" :)
\or a\or b\or c\or \ccaron\or d\or e\or f\or g\or h\or i\or j\or k\or l% \or m\or n\or o\or p\or r\or s\or \scaron\or t\or u\or v\or z\or \zcaron%
Ok; I've updated the versions on my website to include the other two extra characters as well.
http://dpdx.net/context/slovenian/
Does the test file look like it does all of the enumerations correctly now?
if ok, i'll integrate it (and probably generalize the calculation macro) 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 -----------------------------------------------------------------
participants (3)
-
Brooks Moses
-
Hans Hagen
-
Mojca Miklavec