Re: [latexusersgroup] how to recognize arabic characters with its transliteration using pdflatex

323 views
Skip to first unread message

Gildas Cotomale

unread,
Oct 16, 2012, 4:00:00 AM10/16/12
to latexus...@googlegroups.com
2012/10/16 Zheng Rui :
> Hi everyone, i am trying to editing a file with pdflatex these days, i need
> both arabic characters and it's transliterations in my file, my tex file is
> as follows:
>
> \documentclass[a4paper]{article}
> \usepackage[utf8]{inputenc}

This is OK, but be sure your document is really encoded in UTF-8 (see
your editor settings)
I think it's enough for arabic but in some cases utf8x package should
be required, that's another debate.

> \usepackage[arabic,english]{babel}

This also is OK, but default hyphenation for your document is english
(the last declared in the list)

> %\usepackage[LAE]{fontenc}

It seems that you need that one when dealing with arabic:
\usepackage[LAE,LFE]{fontenc} %
http://en.wikibooks.org/wiki/LaTeX/Internationalization#Arabic_script

>
> \begin{document}
> ʾistarḫā
> \AR{تنمب تهثن خه سبس}
> \end{document}

That's not a minimal working example! They are things you are not
talking about to us and that biases or falses our answers! Where does
\AR command come from? Maybe your problems are there ?
With babel package, use:
\foreignlanguage{arabic}{تنمب تهثن خه سبس} %
http://en.wikibooks.org/wiki/LaTeX/Internationalization#Hyphenating

[...]

Best regards

Zheng Rui

unread,
Oct 16, 2012, 4:32:28 AM10/16/12
to latexus...@googlegroups.com
Thanx Gildas, yes, my tex file is really encoded in UTF-8, when i used utf8x, there will be errors like this:

! Package ucs Error: Unknown Unicode character 1578 = U+062A,
(ucs)                possibly declared in uni-6.def.
(ucs)                Type H to see if it is available with options.

See the ucs package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.22 \AR{تنمب تهثن خه سبس}
                                       



the arabic characters cannot be recognized well. If i use utf8, there will be error like this:



! Package inputenc Error: Unicode char \u8:ʾ not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.21 ʾ
       istarḫā

i dont need \usepackage[LAE]{fontenc}, if i use it, then when i type english word, i have to add \textLR{}, like this \textLR{hello}, otherwise it will be treated as arabic's transliteration and will be transformed into arabic characters at last. 

the \AR commond is what i saw in arabi package used guide

In short i just want to print ʾistarḫā  and تنمب تهثن خه سبس as it shown here in the pdf with pdflatex. Anyone can modify my tex file so it works?

Thanks!

Gildas Cotomale

unread,
Oct 16, 2012, 5:55:07 AM10/16/12
to latexus...@googlegroups.com
> i dont need \usepackage[LAE]{fontenc}, if i use it, then when i type english
> word, i have to add \textLR{}, like this \textLR{hello}, otherwise it will
> be treated as arabic's transliteration and will be transformed into arabic
> characters at last.
>
When mixing two differents directions script, there must be a way to
tell the system "hey, here we are writing from rigth to left" and
"here from left to right", otherwhise it would mess up or break on
some characters because it's missinterpreting :-S
And for further process you may need the bidi package

When you just need to put words/sentenses in right-to-left inside a
left-to-right text, consider using the package arabtex (that let you
use romanization...) then the commands
\RL{ … } or \begin{RLtext} … \end{RLtext} or \begin{arabtext} … \end{arabtext}
http://en.wikipedia.org/wiki/ArabTeX

> the \AR commond is what i saw in arabi package used guide
> http://xml.web.cern.ch/XML/TLLATEST/texmf-dist/doc/latex/arabi/user_guide.pdf
>
page 22 to 26... for a good starting (and they are many informations
and tricks and hints)

Zheng Rui

unread,
Oct 16, 2012, 6:25:13 AM10/16/12
to latexus...@googlegroups.com
Hi Gildas, i have tried arabi, arabtex, arabxetex, all of them works fine. i think my problem is i dont know how to print ʾistarḫā using pdflatex cuz i dont know which language or encoding type i should choose for these characters, i can only print it normally with xelatex. Now i need to insert mp3 audio into the pdf file with xelatex, i need movie15_dvipdfmx.sty file, but it's already moved from sourceforge by the developer, and i cant find where to download it, if you have that file, please email me, thanx a lot!

Zheng Rui

unread,
Oct 16, 2012, 6:33:54 AM10/16/12
to latexus...@googlegroups.com
sorry the movie15_dvipdfmx.sty is removed from 

Zheng Rui

unread,
Oct 16, 2012, 10:17:02 AM10/16/12
to latexus...@googlegroups.com
I already got the file from the source tar ball of old release 2.16 of asymptote, it's suggested to use media9 package now.
Reply all
Reply to author
Forward
0 new messages