On Wed, Oct 8, 2008 at 2:41 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>
> I would like to be able to do things like
>
> Mohamed -> Muḥammad

Before you get the mkiv code you can start collecting wrong words :)

Mojca


usage: ruby scriptname.rb < input.tex > output.tex

#!/usr/bin/env ruby

subs_hash = {
  "Mohamed" => "Muḥammad",
  "Idris" => "ادريس",
}

while line = STDIN.gets
  subs_hash.each do |key,value|
    line.gsub!(Regexp.new(key), value)
  end
  puts line
end
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to