Re:ScribTeX online LaTeX editor (with git interface)
by _delirium on Thursday November 25, 2010 @12:40AM
(#1939466)
It's hackish, but you can do Unicode in LaTeX with the inputenc and ucs packages. If you do:
then the inputenc macro package does a first pass on the document, handing off all non-ASCII characters to ucs to replace them with LaTeX commands to generate the appropriate characters, if supported. So, ö gets replaced by \"{o}, א gets replaced with \hebalef, etc. Doesn't work for everything, but handles a good portion of common languages.
[ Parent
| on HN ]
Re:ScribTeX online LaTeX editor (with git interface)
by w1ntermute on Thursday November 25, 2010 @12:48AM
(#1939474)
Huh, it worked for ö, but א gave me:
! Undefined control sequence.
\u-default-1488 #1->\hebalef
And the Japanese example above gave me: Package ucs Error: Unknown Unicode character 12371 = U+3053
Either way, there's not much of a point in using LaTeX when XeLaTeX is available, save for intercompatibility. So until sites like this one start moving to XeTeX/XeLaTeX, we'll still often be stuck without (true) Unicode.
Re:ScribTeX online LaTeX editor (with git interface)
by jpallen on Thursday November 25, 2010 @04:24AM
(#1939809)
I agree, ScribTeX needs support for XeTeX and other LaTeX compilers. As the creator of the site, I guess I'm in a unique position to make this happen! It's been on my todo list for a while now and isn't without its difficulties, but I'll use this conversation as renewed motivation to get it done.
Re:ScribTeX online LaTeX editor (with git interface)
by _delirium on Thursday November 25, 2010 @01:02AM
(#1939492)
Ah yeah, for things other than the built-in special characters (like umlauts), you also need all the relevant language-specific packages that actually implement the macro, a bit of additional fun. ;-) In the Hebrew case, you need the ivritex package for \hebalef to be defined.
But yeah, XeLaTeX makes that all much simpler. The LaTeX solution is mostly good if you're already using LaTeX for some reason, but need to include non-ASCII text from a limited range of languages (e.g. you're writing a Hebrew document, or an English document with a Greek literature quotation).
Re:ScribTeX online LaTeX editor (with git interface)
by ludwigvan on Thursday November 25, 2010 @03:39AM
(#1939737)
I just use:
\usepackage[utf8]{inputenc}
It seems utf8x is more complete, but not officially supported. I haven't needeced the ucs package. (Maybe needed for extended characters, Chinese?)http://stackoverflow.com/questions/1797841/icelandic-utf8-an...
By the way, here is a document that can be compiled both with LaTeX and XeLaTeX, with Unicode:
http://ustunozgur.com/compiling-documents-via-both-latex-and...
Re:ScribTeX online LaTeX editor (with git interface)
by vlisivka on Thursday November 25, 2010 @06:05AM
(#1939948)
I am able to compile document with text in Ukrainian:
\documentclass[12pt,ukrainian]{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[ukrainian]{babel}
\title{Вітаю, світе!}
\begin{document}
\maketitle
Вітаю, світе! Як ся маєшся?
\end{document}