Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
XeTeX: A modern LaTeX with proper OpenType and Unicode support (wikipedia.org)
47 points by nailer on March 12, 2010 | hide | past | favorite | 30 comments


It was because of the poor font support in LaTeX that I gave up trying to use it many years back.

[And without fail, every time I make this claim, I get piled on by LaTeX die-hards -- please don't bother. It's a total PITA to get the fonts of your choice working properly in LaTeX. It SHOULD be as easy as referencing a font file or dropping a font in a directory, but it's not.]

XeTeX looks awesome. Finally, full, easy, natural OTF support through Freetype. Even AAT support on a Mac! Looks like I'm jumping back into the world of TeX.


I suggest having a look at http://en.wikipedia.org/wiki/LuaTeX It is still in beta, but once the power of LuaTeX is unleashed, it will be the only used TeX engine (in two or three years). This is because it combines the quality of TeX's typesetting algorithms (+ unicode/opentype/...) with the ability to program in Lua, a very decent programming language. In "Lua mode", you have access to all TeX's internal parameters and algorithms, so you can even do the line breaking and pdf writing from inside lua. That means you don't have to use TeX's input language any more, a language that keeps many people away from using TeX. Now that you have everything on the Lua side, there is no reason why not to read XML, RTF, Wiki-Markup and other file formats and use the TeX algorithms to typeset these files.

TeX internally works with nodes. Every character you type, every space you use (like the space between paragraphs), every color command will be changed to a nodelist. The boxes and linebreaking algorithm operate on these nodes. In LuaTeX (in lua) you can create nodes manually and feed this list into the linebreaking algorithm and you get back a box of a perfectly nice typeset paragraph. Then you can even operate on these nodes again (or just before linebreaking) and ship out this paragraph into the pdf file. Nobody cares where you get the input from. There are several libraries included with LuaTeX and available for inclusion, such as LPEG (for really nice and sophisticated parsing), luasocket (internet access), luazip, etc. Even luaexpat (xml) and luasql (Database access) are available, so that makes LuaTeX perfectly suited for database publishing (which is what I am doing)

No other TeX engine can do that at the moment!

For the german speaking hackers, I am running the site

http://www.luatex.de

where I write technical stuff about LuaTeX (and some announcements), but beware: all in german.

[Edit: here is the site with google translation to english:

http://translate.google.com/translate?js=y&prev=_t&h...

]


So let's say I am totally convinced, not by the programmability, but by the combination of unicode support and microtypography.

For LaTeX, everyone knows that to get professional output you just read through the two (!) manuals for the memoir class and then you know pretty much everything you need. Where do I start to make professional looking output with ConTeXt?



How is this news, exactly? I use it and love it every day, but ... eh.

EDIT: Well, I see it's turned someone back onto LaTeX, so good on the submitter, then.


OpenType? What's wrong with Computer Modern? ;)


I'm not a huge fan of Computer Modern's appearance, but as a practical font for typesetting math it's a work of genius.

Alas, there are hardly any other fonts that include the range of glyphs required for serious mathematical typesetting.

On the subject of XeTeX, fontspec, et al, while they do make using OpenType fonts much easier, alas they cannot magically create corresponding mathematical glyphs. They also, last time I used them, lacked decent support for setting equations using OpenType fonts, though the situation did seem to be improving so that may no longer be an issue.

Now, if someone wanted to sponsor the guys at some of the big font foundries to make matching mathematical glyphs to accompany some of the nice, professional-grade OpenType fonts they make, that would be fabulous, but probably a rather expensive bit of philanthropy given the niche market.


There are some surprising available math fonts, here is a page with sample output showing which available math fonts match which available text fonts:

http://ctan.tug.org/tex-archive/info/Free_Math_Font_Survey/s...


I appreciate what you're saying, but IMHO almost none of the samples on that page looks sufficiently professional that I would use it to set a textbook. Computer Modern has at least stood the test of time, and gives a clean, uniform appearance to text and mathematical type.

If I were setting a serious work, I would like to use a high quality serif font, something like Emigre's Mrs Eaves or Adobe's Arno Pro, but alas, these fonts have a rather limited range of mathematical glyphs, which means you either get the "two similar but different fonts" problem (which nearly always looks bad) or you have to pick a font that isn't as nice for the body text just because it has matching math symbols available.


Should have mentioned to jump to the bottom of the page. Many of the examples are ugly, but Minion and Utopia are, of course, pro Adobe fonts used in a large number of professionally-typeset books.


Should also point out that for not that much money ($79) you can buy a great looking alternative font called Lucida Bright which comes with a complete set of matching math glyphs. It is much easier on the eyes (both on screen and in print) than the standard CM. Well worth it if you write lot of Tex.


Unfortunately, this doesn't mean that everything that you'd like to work actually works. E.g. \mathbb, for things like the set of real numbers (\mathbb{R}).

Or am I missing something?


That's like asking "What's wrong with pepperoni pizza?" Nothing's wrong with it, but I like lots of pizzas.


The difference is that pepperoni pizza looks good.


CM is difficult on the eyes when you print it out with a laser printer. Thin lines within the glyphs are too thin.

Otherwise, it's beautiful.


so this is basically latex, with with support for unicode and difficult font features...

i'd love to see someone submit a different approach to writing technical documents. something that doesn't look like the macro system of latex, or a soup of XML tags.


The least of my complaints about LaTeX is how it looks. I don't mind the markup at all.

Now, the complexity of the whole system, that's what I have a problem with.


I've mentioned it before, but Pandoc is a nice workaround; it can convert Markdown (and a few other input languages) into LaTeX. It comes with a shortcut for taking Markdown and generating a PDF out of it via LaTeX.

http://johnmacfarlane.net/pandoc/


Any chance of a version that works on Snow Leopard being released? Just tried installing – no luck. A shame, I'm about to start typesetting a paper.



Got it, messing with it now :) There a neat way to use emacs with it?


I'm new at AUCTeX but so far, so good. I'm using TeX Live via MacPorts but I guess AUCTeX and XeTeX would get along fine.


They should and mactex should basically be the same as texlive as I believe that is what it is created from, if someone wants a gui for the mac I believe http://www.uoregon.edu/~koch/texshop/ is popular


Not XeTeX but MacTex-2009 is great on SL. http://www.tug.org/mactex/2009/


xetex is available as a MacPorts port. Works fine for me on 10.6.2. I think it got installed as a dependency, actually. Possibly for MathML.


Although note that MacPorts currently has TexLive 2007, which is a few years old. Packaging TexLive 2009 is in the works, but will take some doing.


maybe I'm missing something, but XeTeX is part of MacTeX, as MacTeX includes TeXLive. (MacTeX 2009, SL)

  $ which xetex
  /usr/local/texlive/2009/bin/universal-darwin/xetex
  $ xetex
  This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009)
  **


So is XeTeX+ConTeXt (ed note: I hate the odd capitalization) the typesetting system to use, or are there even better combos?


LuaTeX + ConTeXt (also called MKIV), see the page on http://wiki.contextgarden.net/Mark_IV. With this combo, you can use the typesetting power of TeX and the programming power of LuaTeX combined.


Misread as XeXeca




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: