TeXtalk: an interview with Khaled Hosny

textalk-pharaoh

Hello friends, welcome to the TeXtalk! We have a very special guest for today’s interview: our friend Khaled Hosny, 13k+ rep, 96+ badges, a very active member of our community and our XeTeX/LuaTeX resident expert. Get ready for this awesome interview!

Joseph Wright
Friends, are we about ready to go?
egreg
We’re waiting for our official interviewer to start.
Joseph
Ok, Paulo is busy so I guess that’s me.
Khaled Hosny
Hi all, sorry had brief power outage just when I logged in πŸ™‚
Joseph
No problem. These things are quite flexible πŸ™‚

What first led you to the TeX world?

(The usual starter question)

Khaled
I don’t recall for sure, but I probably was looking for a free software typesetting solution and found Scribus but was disappointed with its lack of Arabic support, then learnt about XeTeX but was again disappointed with the very limited TeX–XeT bidirectional model (and its broken handling of specials) and then learnt about LuaTeX and immediately fell in love with it πŸ™‚
Alan Munn
But does LuaTeX have bidi support yet?
Khaled
LuaTeX had an excellent multidirectional typesetting model from the start (inherited from Omega), but macro package support for it is variable (LaTeX support is mostly missing). But I don’t use LaTeX for my typesetting work, I use ConTeXt, and for bidi support I use an implementation of the Unicode bidirectional algorithm I wrote in Lua (can be found here: context-bidi ).
Joseph
Ah, the son of Omega πŸ™‚ But you went back to XeTeX …
Khaled
No, not really. I still rarely use XeTeX myself, since its bidi support is quite limiting. (Actually I used it only once since I started hacking on it, because the font I wanted to use has many bugs with the font layout code currently used with LuaTeX, and I then had to give up on colors and hyperlinks!)
Joseph
Yes, that’s certainly fair (although people can and do [work with] bidi in XeTeX and even pdfTeX).
Joseph
Documentation is a bit lacking in both XeTeX and LuaTeX, I’ve found, on the bidi stuff πŸ™‚
Khaled
That documentation is an issue indeed, but for TeX–XeT you can always refer to Knuth’s initial article since little (on the interface side) has changed since then; on the LuaTeX side things are not finalised yet to be formally documented, but there was a draft Omega manual that once covered the basics of its directional support.
Joseph
Yes, I know having dug around quite a bit! Still to do some L3 code on this …
egreg
The L3 team needs somebody who knows about languages that are written right to left. πŸ˜‰

Khaled, can you also tell something about you?

Khaled
I’m a 28-year-old Egyptian, and physician by education (but stopped practising medicine just after graduation). I enjoy free software and thanks to it I currently make a living as a software developer and a font “engineer”.
Papiro
… and, please, about the symbol in your avatar?
Khaled
That is the first letter of my name, [Kh]aled, written in Arabic script (Nastaliq style of calligraphy). Without the dot it is the first letter of my father’s name, [H]osny, so it serves a double duty as my initials πŸ™‚
Papiro
Nice! Thanks!
Graham Douglas
Hello Khaled, I’d like to thank you for the latest XeTeX release and ask your plans for future XeTeX releases (assuming there will be some).
Khaled
nothing big is planned. This year the indefatigable Peter Breitenlohner is continuing his work on merging xdvipdfmx back into dvipdfmx (since both are maintained by TeX Live team now) and I’ll be helping a bit. Apart from that I’ll try to fix some of the bugs I introduced in the previous two releases.
Joseph
Worth knowing πŸ™‚
Graham Douglas
How many hours do you spend per week, on average, on TeX-related programming work?
Khaled
it varies greatly; sometimes I spend weeks working continually on TeX-related stuff, sometimes I spend months without doing anything TeX at all. But generally I get bored quickly, so I switch between different things often, unless I’m doing something very interesting and having success with it.
Graham
The latest work on XeTeX must have taken many hours of coding, I guess — just getting familiar with the source code must have been quite challenging?
Khaled
I think Jonathan Kew writes good code, because I don’t recall taking too much time getting on with the code, and fortunately I don’t often need to hack on the WEB side of things and that does take time (and most of the bugs I introduced are there).
Graham
A dream would be a CMake-based build of XeTeX to compile it via Visual Studio… I’ve built the original TeX like that (from WEB source) but have yet to try LuaTeX or XeTeX. It would be wonderful to single-step through the code via the MS IDE πŸ™‚
Khaled
I’m not an expert in build systems, but I usually stick to autotools because it is the most mature solution on a free software system, but it does not play nice with MS stuff. XeTeX build scripts are maintained by the TeX Live team of course (mainly Peter); there is no way I can do all that magic myself πŸ™‚
egreg
You seem pretty involved in XeTeX and LuaTeX development; what are your plans? Making them more compatible with each other?
Khaled
I have a secret plan (I didn’t tell you this ;)) that would bring some of the niceties of XeTeX (mainly font support) to LuaTeX, but no concrete plan yet.
Joseph
Not such a bad plan, if the LuaTeX people will go for it
egreg
I was just hoping. πŸ˜‰
Graham
Hey, that sounds wonderful: XeTeX font handling with LuaTeX’s access to internals etc. Sounds like DreamTeX πŸ™‚
Khaled
My plan is to embrace LuaTeX binary loadable modules, to stay true to LuaTeX’s general design of not enforcing any particular solution.
Graham
do you mean binary modules (ie DLLs on Windows) that are loadable via Lua’s

require()

command?

Khaled
Yes
Paulo Cereda
Sorry, I’m late. Thanks Joseph for covering my absence, thanks Khaled for being so kind in accepting being interviewed, and everyone else for joining us today! πŸ™‚
Joseph
Has changing font shapes in XeTeX been an easy process? Any big issues it’s raised?
Khaled
Nothing big. HarfBuzz was missing few features, but its maintainer, Behdad Esfahbod, was kind enough to add whatever I asked for. Most of the time I was removing more code than writing anything new, which is what I do best, not being a good software developer myself.I met a few issues with FreeType and bridging the Core Text API with FreeType was a bit of a challenge, and I’m still not happy with the solution I’m using now.
Martin SchrΓΆder
What’s missing for XeTeX 1.0?
Khaled
No idea, I try not to release 1.x software as long as I can πŸ™‚
Paulo
(wow, you guys are so technical, I have no idea what to ask) πŸ™‚
Martin
Can you shed some light on the current situation in Egypt?

Paulo, was my last question un-technical enough? πŸ™‚

Paulo
πŸ˜›
Khaled
Things are complex πŸ™‚
Martin
Yes. πŸ™‚

IIRC last year you announced that you would be offline for quite some time because of military duty. Then you where online again not so much later. What happened? The revolution?

Khaled
My conscription was after the revolution (and it was two years ago, in 2011). I broke my leg in boot camp (badly) and spent the rest of the year on medical leave until I was dismissed for my medical condition.
egreg
Sorry to hear. How are you doing now?
Khaled
Thank you. It took a bit to recover (and a couple of surgeries :)), but things are better now.
Graham
Are XeTeX or LuaTeX widely used in Egypt or other Arabic-speaking countries — due to the ability to typeset Arabic to a good standard?
Khaled
I don’t think TeX in general is that well known around here, even in mostly English academic fields.
Paulo
sorry for this newbie question: I always wondered if, with the new and exciting features made possible with LuaTeX and XeTeX, these engines should be the starting point for teaching TeX/LaTeX instead of the “traditional” approaches (latex and pdflatex). Do you think a newbie tutorial could make use of them right out of the box?
Khaled
With my font “engineer”/Unicode hat on, I think it is time for 8-bit TeX to retire, and newcomers to TeX should definitely be introduced to modern TeX engines.
barbara beeton
re 8-bit engines, some of us are trying to keep production systems running smoothly, and until it’s certain that the Unicode-based systems are fully stable and have completely reliable math support, it’s rather optimistic to consider a switch now. Even after the engines are totally stable, it’ll take a year or more to transition.

For the question part, Taco hasn’t said that LuaTeX is fully stable yet, not even to the point of beginning to test an upgrade. How much longer before that happens?

Khaled
but you are not a newbie, and you can certainly handle encoding issues very well and I don’t think your font needs changed that much since the 80s. Not everyone is like that πŸ™‚
barbara
but many of our authors are relative newbies, who nonetheless try to “show off”, and define everything for themselves, sometimes causing complete havoc when we try to run their files through the production system. So, sadly, we too frequently have to rekey submissions; adds to the cost, and introduces new errors. (Now, if they’d only read the instructions, …)
Graham
Hi there. I’ve worked in (physics) journal production/submission systems — I completely hear what you are saying!!
Martin
How did you find out about tex.se?
Khaled
someone wrote about it on comp.text.tex
Paulo
could you name something you like in XeTeX and LuaTeX? And something you don’t like?
Khaled
I like the font support of XeTeX and the bidirectional support of LuaTeX, and don’t like the bidirectional support of XeTeX and the font support of LuaTeX.
Joseph
Sounds about right to me πŸ˜‰
egreg
What do you like, and don’t, in TeX.SX?
Khaled
I like the QA format of the site and the nice TeX people, I can’t think of something I do not like.
Paulo
do you have a favourite answer of yours in this site?
Khaled
too many to name just one
Paulo
πŸ™‚
Papiro
Please talk about your hobbies, not TeX related πŸ™‚
Khaled
I enjoy reading, reading just about anything. I used to draw and do Arabic calligraphy (self-taught in both cases), but not much these days. I enjoy doing manual work and fixing things in general. But since I was introduced to computers 7 or 8 years ago, I have been spending most of my time playing with software.
Papiro
Thanks! What about trips? Are you invited to talk about your TeX related work?
Khaled
I got invited several times, but couldn’t attend for various reasons. I’m yet to attend a TeX conference or meet any of the nice TeX people (actually I never left Egypt so far).
Paulo
Any hints for a newbie eager to learn about TeX and friends? πŸ™‚
Khaled
I’m not good at giving hints, but if someone asked me I’m likely to give him a general “read and practice” advice.
Graham
I have to go now so I’d like to say thanks again for the latest XeTeX releases which compile nicely under Windows. Keep up the fantastic work and very best wishes to you and for a long-lasting peace to come to Egypt — a country I’ve visited several times and loved it more each time.
Khaled
Thank you.

BTW, I follow your blog and I enjoy your posts πŸ™‚

barbara
it was originally proposed that this year’s TUG meeting be held in Cairo. I hope that this will be possible sometime in the future, while I’m still around to participate. Thanks for your contributions to TeX/fonts/everything else that goes along with it.
Khaled
I think that was 2011 and I really missed it.
percusse
I hope I still have an opportunity to squeeze in one more question/advice seeking: Most often font-TeX problems originate from either TeX not having the necessary info about the fonts (missing tables etc.) or some fonts just don’t play nice with Lua/XeTeX at all. Is there any way that we can somehow help to collect this missing information?

I’m not of course talking about all the design related issues, new glyphs, etc., but if possible I would like to know how and where can an average user contribute.

By the way, I also would like to express my gratitude for all the fantastic contributions you have put into the TeX world.

Khaled
Thank you πŸ™‚ I’m not sure I get your question, though. Can you give some examples on the issues you are concerned about?
percusse
Let me reword it; do you have any issues at hand that might benefit from the general public contributing along the lines of this question.
Khaled
Nothing specific, but general things like beta testing (without the help of all the wonderful people who beta-tested XeTeX 0.9999, it would have been a disaster).
ricmarques
Hi πŸ™‚ What operating system and editor do you use to edit your ConTeXt documents? And what operating system and editor/IDE (Integrated Development Environment) do you use to edit the Lua source code that you contribute?
Khaled
GNU/Linux and Vim in both cases πŸ™‚
ricmarques
That’s great! πŸ™‚ Thanks for the reply.
Paulo
Thank you very much for this awesome interview!
Papiro
Thank you. Best wishes!
Khaled
Thanks for the interview, and thanks to everyone for their questions, I enjoyed it.
Paulo
πŸ™‚
texenthusiast
Thanks a lot for your contributions to the TeX world, especially in the Arabic font world, and being an active contributor to tex.sx
Khaled
Thank you πŸ™‚

Stay tuned for the next episode of TeXtalk!

Leave a Reply

Your email address will not be published. Required fields are marked *