On 2010-03-07 <14:40:37>, Wolfgang Schuster wrote:
Hi Philipp,
a few comments to your code (TeX only): That's really nice.
You don't need a MKIV-file and keep everything in the TeX-file, what you can also do is to move the Lua-code in a separate file. I already considered this but have to make my mind up about it first.
Wouldn’t \setuptransliterate a better name for the setup command! That's true; done!
A better defintion for the setup command is:
\def\setupTranslit{\dodoubleargument\getparameters[TRL]} Done!
You can also shorten your \dotransliterate macro a lot:
\def\dotransliterate[#1]#2% {\bgroup \iffirstargument \getparameters[TRL][#1]% \fi \language[\TRLhyphenate]% \ctxlua{translit.transliterate("\TRLmode","\luaescapestring{#2}")}% \egroup} Done. Seems I was a little too worried about not overwriting the globals; I promise to never ever mistrust TeX's grouping again.
You have a wrong entry in the modules metadata:
%D [ file=t-degrade, Done! As is plain to see, I just copy-n-pasted those parts initially. Is there a clean template somewhere around?
Thanks a lot for your improvements! Philipp
Wolfgang
___________________________________________________________________________________ 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