View Full Version : Latex Unicode : missing .def for arabic ?
cudjoe
June 10th, 2008, 10:13 AM
Hola !
I was wondering where I could get this missing uni-6.def file Latex complains about.
Here is my piece of Unicode Latex code (save in a UTF8 file) :
\documentclass{article}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\title{éèê هه}
\begin{document}
\maketitle
\end{document}
The small piece of Arabic is missing its def file :
! Package ucs Error: Unknown Unicode character 1607 = U+0647,
(ucs) possibly declared in uni-6.def.
(ucs) Type H to see if it is available with options.
...
Unicode character 1607 = U+0647:
ARABIC LETTER HEH
ARABIC LETTER HA
Character is not defined in uni-*.def files.
I looked at /usr/share/texmf-texlive/tex/latex/ucs/data/ and it is not there.
Where can I get it ?
Should I fill a bug report on Launchpad ?
Thank you all for your patience.
hugmenot
June 10th, 2008, 08:06 PM
That file seems to not exist.
But I think you want to use XeTeX, the sister compiler to PDFTeX. It is very well suited for unicode and scripts like arabic.
www.tug.org/TUGboat/Articles/tb27-2/tb87kew.pdf
cudjoe
June 11th, 2008, 01:57 PM
Thanks for your answer.
Your example looks very nice indeed.
However, I was investigating a way to get Arabic characters in Matplotlib. It looked like the only way was Latex.
No idea if I can use XeTeX in Matplotlib.
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg04645.html
hugmenot
June 12th, 2008, 04:43 AM
I don't know what they do to get the output into the plot.
This link is very confusing. Do they process the dvi, or the ps, or the pdf?.
http://www.scipy.org/Cookbook/Matplotlib/UsingTex
You could set matplotlib to svg output and then edit the result in Inkscape to add r-t-l text there. Inkscape's text engine is Pango based, so I guess it is okay for this.
cudjoe
June 25th, 2008, 08:47 AM
matplotlib text layout engine is pretty rough. The generated strings in the SVG are not text objects. They are split into letters.
This is too much SVG manipulation.
I'll get in touch with matplotlib guyz to see what they think about Xetex
mdboom
June 25th, 2008, 09:30 AM
To answer your question about matplotlib's usetex functionality. matplotlib includes text from LaTeX by using 'latex' to produce .dvi and then either:
- if producing a bitmap, use "dvipng" to insert a bitmap into the plot
- if producing a Ps or Pdf file, using "dvips" to get a vectorized version of the text and inserting that
As for matplotlib's SVG output, by default, it saves individual characters as paths so that the SVG is portable to other systems where the particular fonts may not be installed. (SVG fonts would be better for this, but client support for them is patchy...) This behavior can be turned off, however, by setting "svg.embed_char_paths" to "False".
cudjoe
June 25th, 2008, 10:45 AM
Thank you so much mdboom !
Arabic layout in SVG works great ! Without adding style="orientation:rtl". (at least with Inkscape)
I will check out with pycairo to export from SVG and let you know.
mnajem
October 5th, 2009, 10:04 PM
Hello,
I used ArabTeX package for arabic character... I never use XeTeX, but it seems work for me
http://kict.iiu.edu.my/~najmi/ucap-raya.PNG
rumpeltux
December 1st, 2009, 07:30 AM
You can’t get it to work with ucs, but it’s right, that it works with ArabTex like that:
\documentclass{article}
\usepackage{arabtex}
\usepackage{utf8}
\begin{document}
\setcode{utf8}
\setarab
\RL{ سلام }
\end{document}
And you’d need to install texlive-lang-arab to get the package.
See also: http://itooktheredpill.dyndns.org/2009/arabic-script-in-latex/
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.