## Arabic/Urdu Typesetting the Easy Way

As the regular readers might know, I’m a big fan and regular user of the LaTeX typsetting system. Keeping to the tradition of occasionally posting a LaTeX tutorial on the blog, here’s one that will be useful to all those that are trying to get up and running with XeTeX — the unicode support adding big brother to the TeX typesetting system. XeTeX basically allows you to use all the Opentype (and other) fonts installed on your system — and it adds unicode support. That means you can use the latest Adobe fonts you’ve got as well as all the Arabic, Urdu, Chinese and Japanese fonts and typeset them as beautifully as you would any Latin script in LaTeX. It’s a hassle to set it up though and you wouldn’t find many tutorials or how-tos on the Internet.

So, here’s one that will allow you to setup and start using XeTeX — especially if you’re trying to find a way to easily typeset Arabic/Urdu. Let’s get started: First, download and install MikTeX 2.7+ (for Windows or any other LaTeX package for your favourite OS). I use 2.8 but I guess you should download the latex (2.9). Everything after 2.6 t has XeTeX built-in. You should download the basic installer from here.

Install also the TeXMaker IDE. We’re going to configure that in a little while to use XeTeX instead of LaTeX. Get the Scheherazade font from the SIL page. You can just extract the zip file anywhere and copy the .ttf file into C:\Windows\Fonts folder. That installs the font required for Arabic typesetting.

Now, fire up TexMaker, go to Options menu and click on ‘Configure Texmaker’. In the Pdflatex section, replace pdflatex with xelatex.

Configure texmaker for XeLaTeX

Create a new file and insert the following code:

\documentclass{article}
\usepackage{arabxetex}
\begin{document}

\begin{arab}[novoc]
mi_tAl: \aemph{45} darajaT
\end{arab}

\end{document}


Before we build, you might need to refresh the font-cache for XeLaTeX (especially if you’ve used it before). For that, go to your MikTeX bin directory and enter the command fc-cache.exe --force. It might take a while but it should run without any errors.

Now, back to Texmaker   and ‘Quick Build’.

Build ArabXeTeX

You should be able to see the output like so:

Arabic Output

During the quick build, you might get a dialog box saying that a certain package is missing and you need to install it. If so, just click ‘Ok’ or ‘Install’ and it will be automatically installed on-the-fly by MikTeX. (You’ll need an internet connection though.) If it simply exits giving some error about a missing .sty file (look at the bottom of the screen for the errors/output messages) — you need to open up the “Package Manager” from the MikTeX folder in the start menu and install that package. For example, if you get the error, “Missing arabxetex.sty”, search for arabxetex package, select it in the list and click on the ‘install button’. Then try to quick build again. Let me know in the comments below if you have any errors and I’ll try to help you out.

Installing MikTeX Packages

Finally, you can look at the original documentation for ArabXeTeX for the details of use. I’ll leave you with another output from the examples in that doc.

Another example output from ArabXeTeX

## Venturing into Arabic Font Design

I started using Arabic (and Urdu) scripts quite a while ago. I came across the whole non-latin script problem when I was developing a software for a government agency related to land revenue. In the development of this software, I found myself learning about alternative keyboards and Asian language support in Windows. I also found out about the excellent research going on in FAST-NU Islamabad related to Urdu language support for computers. As an aside, I encourage all readers to go read about their work on CRULP and see the Naskh, Web Naskh and Nastaliq fonts they’ve developed and released free of charge. They’ve done a truly great job and none of my comments in the rest of the post should be taken as an offense to them or their work. Read more…

## CSS Layout

I wrote this article back when I was learning to cope with CSS layout. It’s not the best one around but it’s certainly the simplest. It assumes you’ve been working with CSS for font styles and colours and are comfortable with designing layouts using tables. I uploaded it on my old site but that site is no longer there, so this is an update post.

Title: CSS Layout

Abstract:
Tables are a powerful way of creating complex page layouts. That’s why many people simply refuse to let them go. Now, CSS designs have come a long way and have the same sort of power. Let go of your tables and come see how powerful CSS has become. The main problem I faced when I started learning CSS designs was how to get some of those DIVs floating to the right position while still keeping others in their place. HTML tables made it so easy but they have their drawbacks. I decided to redo my weblog template and write a small article in the meantime. There are a lot of CSS tutorials out there. I’m not going to go into the details of CSS. I’ll just take a design and implement it with precise values to show you just how it’s done. Having said that, be forewarned, this tutorial is not for the faint of heart.

Source in .zip

## Comic Sans – "only its parents could love it"

I’ve been saying this for a long long time. Here’s a quote in case you need convincing:

What article on web typography could forget the font so ugly that only its parents could love it – Comic Sans MS.

Spurned by designers and typographers worldwide, Comic Sans has few fans – and despite being part of Microsoft’s ‘Core Fonts For The Web’ package, is generally left unused by most people who know a little about typefaces.

It has found favour in certain niches – you can probably spot Comic Sans on a few eBay auctions (in garish red & yellow no doubt), as well as on personal homepages and the lesser blog sites (MySpace, LiveJournal et al).

If you absolutely must have a ‘comic’ style font, or blackboard style writing, go for Comic Sans – but there are few other applications for this font. Use with caution!

That comes from here.