Hi Taco, On 2010-03-07 <14:56:52>, Taco Hoekwater wrote:
I don't know any cyrillic, but I had a quick look and have a few remarks for you to consider (I weeded out the comments already made by Wolfgang):
* \loadmarkfile takes braces, not brackets for the argument, so you should use \loadmarkfile{t-transliterator}. Done!
* You should create t-transliterator.mkii, even (especially) when it does nothing except give a \message{Module is unsupported under mkii} followed by \endinput. Done!
* besides splitting into mkiv and lua, you may even want to create separate files for each transliteration that is then loaded by filename key. This would make it easier for other people to add transliterations you did not implement yourself. As I already wrote in my reply to Wolfgang: eventually I'll do this but I'm not yet sure how this will look like exactly.
* I expect the substitutions themselves can be sped up a little with no effort, by using the normal string.gsub. That function is 8bit clean, so there is no need for the added complication of utf8 processing. You're right again, I measured 33% shorter execution time in an extreme case with string.gsub; done!
* It is common in ConTeXt to also provide a \starttransliteration ... \stoptransliteration pair (but there is no requirement). I noticed that and of course I would like to provide an environment but until now I had no luck implementing it; I'm stuck at the following:
\def\starttransliterate {% \bgroup\dostarttransliterate% } \def\stoptransliterate {% \egroup \transliterate{% \getbuffer[trl]% }% } \def\dostarttransliterate{% \dostartbuffer[trl][starttransliterate][stoptransliterate]% } and the buffer content isn't expanded before it is passed to lua; adding \@EA at various places has no effect either.
* Finally, where should I get the CMU fonts from? Wolfgang already posted the link but CMU is buggy in some cases so to compile the manuall you'll need this font, too: http://kodeks.uni-bamberg.de/AKSL/Schrift/BukyVede.htm
I'll post a new revision of the module during the week Many thanks to you, too! Philipp
Best wishes, Taco
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments