Fast Fact About Singapore 2
I went again to S'Pore to visit my customer again. Here are some more fact about S'Pore.
- There exists Bua Loi Nam Khing (บัวลอยน้ำขิง) in S'Pore. Except that they use soy milk instead of ginger soup and the ball is stuffed with various topic, not only sesame, but also peanot, yam, etc.
- Benz E240 Taxi is not a rare sight. Cost is the same for the other taxi. I still wonder whether the taxi company get any "cash" profit for this.
- This sign is very funny <img src="http://upload.wikimedia.org/wikipedia/en/2/28/Noexplosive.jpg" />. It tells you that car carrying explosive is not allowed.
- Log in to post comments
Pickpocket
My pocket was stolen... at QSNCC...
The pickpocket dropped my wallet, minus its money, at the guard at the car park.
luckily that no card was taken. Nevertheless, because of my super fast precaution, I have suspended all my card just an hour before the wallet was returned to me.
Sadly, I cannot reactivate my VISA ans MASTER card, so, next week I will be in Singapore with no card at all.
Damn that thief.
- Log in to post comments
Deja Vu
Today I have had enough free time for a few movies, so I went to my local rental shop which underwent small renovation a few months ago. The new shop offers lots more DVDs and I picked Ghost Riders and Deja Vu. Forget about Ghost Riders, I have nothing to speak about it except that it features Nicolas Cage, my fav actor, the rest won't worth your time.
However, Deja Vu turns out to be quite remarkable. A good Sci-Fi(?) thriller with an interesting plot.
Funny thing is that, I was once told that Hollywood action always contains some kind of Speedy Pursuit, Car pursuit is very common. The scene is something like someone is chasing over another one, both using some kind of vehicles. They perform some thrilling action sequence or so, keeping the tense of the audience, or at least making the audience to follow the thrill of the chase.
Obviously, screen writers have came up with several creative imagination, not sticking only with cars. Well, you can see cars VS cars, any kind of them, truck, ambulance, trailer, bus, etc., all are cliche, not to mention those bikes. You can see Spacecraft VS Spacecraft, quite common in space Sci-Fi. Airborne action would provide jet fighter chasing over jet fighter, chopper vs chopper, etc. Snowmobile vs Snowmobile is not something new also. Speedboat has also been used for long. Submarine is also possible but the thrill is not presented by speed but rather the dangerous of the see.
There also exists several cross breeds such as chopper vs train, chopper vs car, hovercraft vs boat. When Die Hard 4 comes available, I believe we would see Jet chasing a car. Recently, the comic heroes began to appear on silver screens, we then see much more exotic chasing, such as human(superman) chasing airplane, Human vs Train, etc. you name it.
I believe that taking any set of fast moving vehicle in all movie, you can pick anyone that is a member of Cartesian product of the set and it should already made its way to Hollywood.
However, the variety in these pursuit-evasion is changing in the object of pursuing. In Deja Vu, it is my first time to see pursuit over the ghostly shadow of the past. The space you are running and the object you are pursuing is on a different world. Quite interesting.
Not that the pursuit is heart stopping, though, others had done better, but this is quite creative and this is not the best part of the movie, anyway. I just wanna point out this new trick.
Try it if you have a chance.
- Log in to post comments
Fast Fact About Singapore
I went to Singapore last week trying to sell my software and getting user requirement. Have not much time walking around but these are a few fact I discovered myself.
- Singapore has ข้าวมันไก่ + ขาหมู and people there think that it is their local food.
- ก๋วยเตี๋ยว is called Kyaw Teaw (well, understandable since the word is chinese) but เส้นใหญ่ is called Hor Fun.
- MRT in Singapore says "Please mind the platform gap". Comparing to Thailand version, "Please mind the gap between train and platform", it seems like Thai people need to be told where the gap is actually is.
- Traveling anywhere taking more than half an hour is considered very very far by most Taxi.
- A 7-11 girl at the register did not ask whether I need dim sum or dumpling when I bought a bottle of soft drink.
- Taxi can bid for a job which is posted to the in-car monitor by the calling center. They don't have GPS, though, but I think they don't need it.
- It really takes only 15 minutes from the plane to a taxi at Changi Airpot. For Suwannabhumi, It takes more than an hour. This might be biased, since I went back to Suwannabhumi on Friday Night, while I arrived at Changi on Wed Noon.
- People here drive very safe, Taxi is faster but still safe comparing to Thai taxi.
Well, that is all.
- Log in to post comments
Submitted
Finally, I have submitted an article to IEEE Trans. on Robotics. Hope that good news arrive soon.
Proceed to the next article.
- Log in to post comments
Long awaited...
http://www.starcraft2.com/ NUFF SAID!!!!!
- Log in to post comments
In Search for a Font
As a computer engineer, you are more or less frequent yourself with programming, or at least something very close to programming and since we are not at the point where natural language can serve as a courier of our need to the computer yet, typing in a program, source code, HTML, etc. is still our de facto modus operandi. In programming, or more to say, typing a program, we do love our code tidy, we wish things to be aligned properly, i.e., we always stick with monospace font.
Of course, this verbiage is a common wisdom which is recognized by all PC. They already come with a handful of monospace, or the so-called fixed-width, font. Courier New is my favorite. Now, for Windows Vista, we have Consolas which is intended to dethrone Courier New. (Moreover, Vista and Office 2007 come packed with fix new fonts, Consolas included, two san-serif, two serif, one flared-serif and one monospace. See The Technology of Text for more information.
This is greatly appreciated. The only problem is that I am Thai. I need good monospace Thai font. There exist many monospace Thai font, of course, but none is good enough for my meticulous need. My current best monospace thai font is the Courier Mono Thai, created by Khun Settapol, which is based on the very popular Courier. There are also many more font such as Phaisarn Font, by Khun Phaisarn Techajaruwong, TlwgMono, by Thai Linux Working Group. These are good works but it still does not match my need. Most of these fonts can be downloaded from ZzzThai page while Tlwg Font can be found in the Tlwg page.
I need a font such that its English character is at least as good as Courier New. The current problem of the aforementioned font is that the stroke of English characters are ways too thin. Since Thai has over and under character, the line space has to be enlarged however, the stroke of the character is the same, rendering the character to appear very thin and is not as legible as it should be. On the other hand, th e Fixedsys font which comes bundled with Windows is ways too thick both in Thai characters and English characters. (Now, you believe that I am very picky.)
Anyway, Courier Thai is still my monospace Thai font of the choice, it is a good work, though. It is just not perfectly match my need. Let me hope that I would have enough time and energy to fix this issue, somehow.
- Log in to post comments
Mini-HOWTO: Thai Language Support for LaTeX in Windows, using MiKTeX 2.5 (and 2.6 and 2.7)
--- updated ---
- MikTeX 2.6 I have tried this also on MiKTeX 2.6 and everything works just fine, except that some files have to be put on different directory, see the bottom of the article
- MikTeX 2.7 I also tried this on MikTeX 2.7 and the step is still the same as 2.6.
- I also added a figure roughly showing what you have to do, exclude the modification to the existing miktex file.
[img_assist|nid=2044|title=MikTeX Thai Font Installation Guide|desc=|link=node|align=left|width=640|height=415]
--- end of update ---
There are several pressing requests given to me to describe the process needed to enable Thai support on LaTeX for Windows (in MiKTeX), a topic I wish to cover in the upcoming LaTeX guide series. I will publish a quick and dirty method on the blog first and it will be refined and included in the series later.
Please note that if you are running MiKTeX version 2.4, which is now out-of-date and no longer available in the MiKTeX site, the easiest way is to use the MiKTeX Thai Extension which is extremely easy to setup. The package cannot be used in MiKTeX 2.5 nor 2.6.
For those who just want to get the thing done, I recommend you to consult this page (in Thai) at the school of physics, Suranaree University. You will find everything you need to start using Thai in TeX, described in an easy step-by-step manner.
However, if you wish to do things manually, starting from a minimal set of input and work your way to the actual installation of the font file, please read along.
These step is generic and should works on all distribution of LaTeX, providing that the file is put to there respective folder (which, sadly, differs from distro to distro).
Basically, you have to do two things.
- Enable Thai support by patching the babel package.
- Install Thai font to MikTeX.
First, you will need thailatex package. Please download the source package. As of May 2007, the latest version of the package is 0.4.0-1. This package includes Thai Font and babel package patching.
Optionally, you will also need sed, a stream editor. With sed, the installation process becomes much more easier.
This guide is tested against MiKTeX version 2.5 on Windows XP.
The first thing to do after obtaining the thailatex source package is to extract it somewhere, says c:\thailatex-0.4.0. After that, you have to follow these steps.
#1. Enable Thai Support in Babel Babel is a package for multilingual support in LaTeX. Sadly, the standard distribution of babel does not include Thai. Dr. Surapant Meknavin, then a researcher at NECTEC, created the first version of Thai Language Definition File to be used as a part of babel package. After that, the file is maintained by Theppitak, Poonlap and Chanop, subsequently.
To enable Thai in babel you will need the following files.
thai.sty
thswitch.sty
lthenc.def
thai.ldf
The style files (.sty) and encoding file (.def) come already with the thailatex. They should be located in c:\thailatex-0.4.0\babel. The Language Definition File (.ldf) is to be generated from the source file, thai.dtx by executing this command, in the same folder as the thai.dtx.
c:\\thailatex-0.4.0\\babel\\>latex thai.ins
Now, you should put these files into the babel folder of your MikTex installation, presumably to be at C:\Program Files\MiKTeX 2.5\tex\generic\babel.
c:\\thailatex-0.4.0\\babel\\>copy *.sty \"C:\\Program Files\\MiKTeX 2.5\\tex\\generic\\babel\"
c:\\thailatex-0.4.0\\babel\\>copy lthenc.def \"C:\\Program Files\\MiKTeX 2.5\\tex\\generic\\babel\"
c:\\thailatex-0.4.0\\babel\\>copy thai.ldf \"C:\\Program Files\\MiKTeX 2.5\\tex\\generic\\babel\"
Next, we have to patch the original babel package to recognize Thai language. Edit C:\Program Files\MiKTeX 2.5\tex\generic\babel\babel.sty by your favorite text editor. Add the following line to the file.
\\DeclareOption{thai}{\\input{thai.ldf}}
The line should be added in the "declare option" part, i.e., it should be inserted beside the other \DeclareOption lines. Since the options in the file are originally sorted by language, it is nice to put our line next to Turkish option. Simply add the line after this line.
\\DeclareOption{turkish}{\\input{turkish.ldf}}.
Now, babel package knows Thai language. The next step is to install Thai font to MikTeX.
#2. Font Installation Font installation in TeX is quite a pain. There is no one-click step that just put the font up and running like installing font in Windows. I would recommend you to read the documentation of FONTINST for an insight on the font mechanism of TeX. Let us proceed to the installation of font.
Font comes in various format, most notably, Type 1 Font and True Type font. For Windows users, True Type is ubiquitous. However, TeX was created in *nix platform where Type 1 is more common. Type 1 is usually distributed into two files, .pfb file (sometime disguised as .pfa) and .afm file. The .pfb is the actual Type 1 font containing the description of a font in terms of a Bezier curve, while .afm is an Adobe Font Matric which contain information about size, ligature, of each curve.
Starting from these two files, we will construct .tfm (TeX Font Metrics) which is used by TeX and .vf (virtual font) which is used by DVI driver to actually render the font. To create a .vf file, we need immediate format .vpl (virtual property list). The .vpl is not need by TeX and can be deleted afterward.
Apart from the font itself, we still requires more information about the font. We need LaTeX encoding file and font encoding file. The first one maps TeX character into a slot, or a numbered representation of a glyph and the latter maps slot into an actual glyph in the font. Both type of files come already with thailatex package. The LaTeX encoding file is available in c:\thailatex-0.4.0\fonts\ and c:\thailatex-0.4.0\babel\ as lthenc.def while font encoding files are available at c:\thailatex-0.4.0\fonts\*.fd.
At this stage, we know what we need and what we have. We then proceed to produce what we need from what we have and then put everything required into its proper place in the MiKTeX distribution. Here is the procedure for doing so.
2.1 Create a .vpl file and .tfm file 2.2 Create a .vf file 2.3 Put the generated font files into the appropriate directories 2.4 Put the encoding file into the appropriate directory 2.5 Put the font definition file for babel package 2.6 Create a font mapping file and put it into appropriate directory 2.7 Update MiKTeX database.
For our illustrative purpose, we will assume that our type 1 font file is norasi.afm. Be noted that we must do all of these on every type 1 font file.
2.1 Create a .vpl file and .tfm file
First, we construct a "raw" TeX font metrics file and a virtual property list from Type 1 file. Then, we construct a mapped TeX font metrics file and a property list file from a virtual property list file. We will use norasi font for our example. Run the following command in c:\thailatex-0.4.0\fonts\ folder.
afm2tfm norasi.afm -v norasi.vpl -T lthuni.enc rnorasi.tfm
The -T argument indicates the font encoding file used to create the output file. Be noted that the raw .tfm file begins with letter r. The font encoding file lthuni.enc is already available with the thailatex at c:\thailatex-0.4.0\fonts\, for your convenience.
2.2 Create a .vf file
Next, we construct the virtual font file and a mapped TeX font metrics file. Execute the following command in the same folder.
vptovf norasi.vpl norasi.vf norasi.tfm
2.3 Put the generated font files into the appropriate directories
Now, we have all font files we need. Let put them into the appropriate place. First, put all font files in their respective folder.
copy norasi.afm \"C:\\Program Files\\MiKTeX 2.5\\fonts\\afm\\public\\thai\"
copy norasi.vf \"C:\\Program Files\\MiKTeX 2.5\\fonts\\vf\\public\\thai\"
copy norasi.tfm \"C:\\Program Files\\MiKTeX 2.5\\fonts\\tfm\\public\\thai\"
copy rnorasi.tfm \"C:\\Program Files\\MiKTeX 2.5\\fonts\\tfm\\public\\thai\"
copy norasi.pfb \"C:\\Program Files\\MiKTeX 2.5\\fonts\\type1\\public\\thai\"
2.4 Put the encoding file into the appropriate directory
Next, we put an encoding file to their respective folder also.
copy lthuni.enc \"C:\\Program Files\\MiKTeX 2.5\\fonts\\map\\dvips\\thai\"
2.5 Put the font definition file for babel package
We also need to put the font definition file to the babel package folder. The font definition which involves in LaTeX encoding is already given in the thailatex package and is located in c:\thailatex-0.4.0\babel\.
cd c:\\thailatex-0.4.0\\babel\\
copy lthnorasi.fd \"C:\\Program Files\\MiKTeX 2.5\\tex\\generic\\babel\"
2.6 Create a font mapping file and put it into appropriate directory
The last thing is to tell dvips that we have the font for it and it is mapped with the specific TeX font. This involves several step. To do this, we create a text file using any text editor and name it as Thai.map. The file should have this line.
rnorasi Norasi \" LTHEncoding ReEncodeFont \" <lthuni.enc <norasi.pfb
Now, a vigilant reader might notice that the screen output of afm2tfm is almost the same as the above line, except that it does not have the last part, "<norasi.pfb". So, if we manage to append this string to the output file it would be very convenient. I would recommend two options to produce Thai.map file. The first option is for a user having "sed" tools. This is a little bit faster. However, if you don't have sed, that is still alright. Please use the second option instead.
OPTION_1: for sed user (if you don't have sed or have no idea what it is, please use OPTION_2)
This is where the optional sed comes in handy. When we create the virtual property list using afm2tfm, we pipe the screen output to for immediate concatination, using this command instead.
afm2tfm norasi.afm -v norasi.vpl -T lthuni.enc rnorasi.tfm | sed \"s/$/ <norasi.pfb/\" >> thai.map
This line will create a file thai.map which contain the line we need.
WARNING!!!! be noted that sed that is built natively for windows might produce *nix style end of line which render the line to be incorrect. I recommend using sed that comes with cygwin. A quick work around would be using the last words in the line instead of end-of-line symbol.
The generating of each required file is necessary for every font. Please make sure that all font files have undergo ne this step, so that thai.map includes all information. The following batch file would run the script on all font files and utilize sed. You still need to copy each font file to the appropriate location.
del thai.map
FOR %%I IN (*.afm) DO afm2tfm %%I -v %%~nI.vpl -T lthuni.enc r%%~nI.tfm | sed -e \"s/enc/enc <%%~nI.pfb/\" >> thai.map
FOR %%I IN (*.vpl) DO vptovf %%I %%~nI.vf %%~nI.tfm
OPTION2: for non-sed user
Even without sed, we could do that by running a batch file containing these lines.
del thai.map
FOR %%I IN (*.afm) DO afm2tfm %%I -v %%~nI.vpl -T lthuni.enc r%%~nI.tfm >> thai.map
FOR %%I IN (*.vpl) DO vptovf %%I %%~nI.vf %%~nI.tfm
This is almost the same as in the OPTION_1 except that the "sed" part is omitted. So, we have to do this manually. For every line in the Thai.map generated from the above batch file, you have to append xxx.tfm where xxx is the name of the original font file. If you happen to have any text editor that supports regex you could do find&replace using the following regex command.
FIND strings
(r(.+)\\ .+\\ \\\"\\ .+<lthuni.enc)
REPLACE strings
\\1 <\\2.pfb
No matter which option we take, we have to put this "mapping" file to MiKTeX distribution.
copy thai.map \"C:\\Program Files\\MiKTeX 2.5\\fonts\\map\\dvips\\thai\"
DON'T FORGET THAT the directory is not the same for MiKTeX 2.6 and 2.7, please check the bottom of this article.
2.7 Update MiKTeX database.
This going to be our real final step. Now, make sure that all font related files (*.afm, *.vf, *.tfm, *.pfb, *.fd, lthuni.enc) are put in the appropriated place. Finally, we let dvips know that we have this mapping file. This step is different from distribution to distribution. For MiKTeX 2.5 and 2.6, you can edit the respective updmap.cfg file using this command.
initexmf --edit-config-file updmap
And put this line into the file.
Map thai.map
Finally, let the MiKTeX refersh its file database and making the map file using the following command.
updmap
initexmf -v --mkmaps -u
Now, MiKTeX understands thai font and can use thai. You can test the system by compiling the teststd.tex file available at c:\thailatex-0.4.0\doc. You can also delete the entire c:\thailatex-0.4.0 folder since we no longer need it.
The only remaining problem is that LaTeX cannot break thai words since Thai sentence does not have space between each word. This problem can be solved by using seperate Thai word breaking utilies such as swath by Paisarn or older cttex by Hui.
Happy TeXing.
-------- updated --------
I have tried this on MikTeX 2.6 and MikTeX 2.7 and it seems like that I have to put lthuni.enc and thai.map at C:\Program Files\MiKTeX 2.*\dvips\base instead of C:\Program Files\MiKTeX 2.x\fonts\map\dvips\thai.
- Log in to post comments
What does Ph.D. mean
Doctor of Philosophy? -- that's the canonical meaning. Permanent Head Damage? -- that's a good one. But the one I came across many months ago and believe that it is very interesting is this quotation from Rondam Ramblings' "Top ten geek business myths".
The only thing a Ph.D. means is that you're not a moron, and you're willing to put up with the bullshit it takes to slog your way through a Ph.D. program somewhere.
Please check out the full article.
I don't have a Ph.D. yet but I believe that I am not a moron, though. Hence, getting a Ph.D. will benefit me only the second phrase :D.
- Log in to post comments
The Current Trend
OK, here are my result.
<a href="http://www.bbspot.com/News/2004/10/extension_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2004/10/file_extensions/ogg.jpg" width="300" height="90" border="0" alt="You are .ogg Even though many people consider you cool and happening, a lot still find that you're a bit too weird to hang out with.">
Which File Extension are You?
<a href="http://bbspot.com/News/2003/01/os_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2003/01/os_quiz/amiga.jpg" width="300" height="90" border="0" alt="You are Amiga OS. Ahead of your time. You keep a lot of balls in the air. If only your parents had given you more opportunities to suceed.">
Which OS are You?
<a href="http://www.bbspot.com/News/2006/08/language_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2006/08/language/python.jpg" width="300" height="90" border="0" alt="You are Python You are slower than others, but easier to understand. You are a minimalist, who doesn't like clutter.">
Which Programming Language are You?
<a href="http://www.bbspot.com/News/2005/02/website_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2005/02/website/mapquest.jpg" width="252" height="152" border="0" alt="You are mapquest.com You like to tell people where to go. You are not afraid to ask for directions. You would rather drive than fly. You like to travel.">
Which Website are You?
<a href="http://www.bbspot.com/News/2006/09/white-and-nerdy-quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2006/09/nerdy/40.jpg" width="150" height="150" border="0" alt="You are 40% white and nerdy.">
How White and Nerdy Are You?
<a href="http://www.bbspot.com/News/2006/11/caffeine_quiz.php"><img src="http://www.bbspot.com/Images/News_Features/2006/11/caffeine/code-red.jpg" width="300" height="90" border="0" alt="You are Code Red Mountain Dew. You're a bit of a disappointment. People expected a lot more from you.">
Which Caffeinated Beverage are You?
Truly a waste of time.
- Log in to post comments