Você está na página 1de 3

------------------------------------------------------------------U-TRANS Version 2.0 ------------------------------------------------------------------Tabish Qureshi, July, 2002. ------------------------------------------------------------------Now Unicode compatible!

This is a crude little program for those who want to display Urdu pages on the web. * This program is inspired by Avinash Chopde's now famous ITRANS package. * What it does is quite simple, and is as follows. If you want to display text in Urdu on the Web, the portable and universal way of doing it is to write it using Unicode characters. The main problem is writing Unicode Urdu text. That is where u-trans comes in. You can write a u-trans file, which will be almost exactly like your HTML file, and use either the font tag or Style Sheet for specifying the Urdu font. When you enter the text, start with a line containing only the word "#beginurdu". Then enter the text in ArabTeX code, which is reasonably phonetic. For example, you would write, "mae.n urdU mE.n likhnA pasand kartA ,hU.n". ArabTeX coding is very simple, and easy to learn. End the text with a line containing the word "#endurdu". This can be repeated many times in a page and wherever required, even inside a table caption. When this file is run through U-TRANS, it produces an HTML file which has all the HTML code which you put in as it is, except that the coded text is replaced by Urdu Unicode characters. Now if you have a font, supporting Urdu Unicode, loaded on your computer, your browser will display this webpage in Urdu script! * Advantages: o One advantage is that if you are familiar with ArabTeX transliteration code, you can just write an HTML file as usual complete with images, tables and alignment, without taking any special precaution for writing Urdu text. o Most webusers are familiar with english, and would find editing an Urdu page with transliteration code, much simpler than using a WYSIWYG editor where one has to learn key associations. * Why do I call this program crude? Well, seasoned programmers will faint on hearing that this program was written in FORTRAN!! Also, it only just manages to do the job - although it can be made much better with some effort, I do not have time to do it. Maybe I will do it sometime later. * Why is it called U-TRANS instead of UTRANS? Because there already exists a program by the name UTRANS, which has nothing to do with Urdu. * How to use it Write a U-TRANS file as explained above. Look at the following example Type the text displayed below in a file called example.utx. Now give the following command on your shell prompt, in the directory containing U-TRANS files: u-trans < example.utx > example.html

This HTML file, when displayed in a Web browser will display Urdu text, if you have installed the Urdu Nastaliq Unicode font. <HTML> <HEAD> </HEAD> <BODY> This is my first Urdu web page. <P> <font face="Urdu Nastaliq Unicode" size=+3> #beginurdu ab urdU kA zamAn,h ,hae. #endurdu </font> <P> </BODY> </HTML> * Things to be noted: o No HTML tags are allowed within #beginurdu and #endurdu o Lines will be broken when the line of the input code is broken. o As Urdu is written from right to left, your Unicode compatible browser (e.g. Internet Explorer, Netscape 6.2, Mozilla) will automatically display it right to left. o It is not necessary to use Urdu Nastaliq Unicode font. You can use any Urdu/Arabic Unicode font, e.g., TITUS Cyberbit Basic. -------------------------------------------------------------* The compressed file for U-TRANS package has following files: README.txt This file copying.txt The license agreement for using the program. unicode.chr Character codes for Unicode Urdu. example.utx Example U-TRANS file example.htm The HTML file generated from example.utx u-trans.exe The executable binary for the program u-trans.f The source code of the program urducode.htm The ArabTex coding for Urdu - guide to writing utx files in ArabTeX code - it is fairly simple nastaliq_unicode.ttf Urdu Nastaliq Unicode font. template.utx Example U-TRANS file, which can be used as a starting point for creating new utx files. -------------------------------------------------------------There is an template.utx in this distribution. You can add your own Urdu text, and play around with it. There is also the Urdu Nastaliq Unicode font with this package: nastaliq_unicode.ttf Installation of URDU font "Urdu Nastaliq Unicode" in Win95/98 1. Go to Start/Settings/Control Panel/Fonts Here are all of your system fonts shown. 2. Go now to the menu File/Install New Font In this new window you should first select under the folders where you have downloaded the font file. In the above window List of Fonts the font name "Urdu Nastaliq Unicode" should appear. Select this font and click OK. After this step the Urdu font has been added successfully to your systems Font Folder and you can use this font in

any of your windows applications. -----------------------------------------------------------------------http://www.arbornet.org/~tabish/u-trans/ Tabish Qureshi U-TRANS, program for creating Urdu Webpages. Department of Physics Copyright (C) 2002 Tabish This program is free software; you can Jamia Millia Islamia, redistribute it and/or modify it under the New Delhi-110025, INDIA. terms of the GNU General Public License as tabish@arbornet.org published by the Free Software Foundation. 1st July 2002