On 9/29/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
>
>
> Ernesto Posse wrote:
> > I think the arabi package was installed correctly, since MiKTeX didn't
> > give me any errors. I don't know how else to check if it is correctly
> > installed (it has about 207 files.) I tried reinstalling it, but I
> > obtain the same results.
> >
>
> One way to check would be to see if you can "compile" a regular latex
> (non-LyX) file with Farsi, maybe arabi includes some Farsi examples you
> could test with. If you are able to do that, then it means that
> arabi/latex are set up correctly, and the problem is getting LyX to work
> with it. Otherwise, it means the problem is with your latex/arabi setup,
> and there's not too much point in trying to get LyX to work before you
> fix that.


I didn't find any examples in the arabi package, but I wrote my own.
Apparently the error occurs when using the babel package:

This compiles fine:

\documentclass[farsi,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8,latin9]{inputenc}
\begin{document}
hello
\end{document}

But if I try to use a command from farsi, such as \alefhamza, I get a
babel error: (even if I don't use babel, which is odd:)
Package babel Error: You haven't loaded the option english yet.

If I add

\usepackage{babel}

I get

LaTeX Error: Encoding scheme `LAE' unknown.

But apparently the solution is to modify the options for fontenc and
babel as follows:

\usepackage[LFE,LAE,OT1]{fontenc}
\usepackage[farsi,english]{babel}

So LyX should generate these instead of the default

\usepackage[T1]{fontenc}
\usepackage{babel}

Nevertheless, LaTeX does give some warnings:
"LaTeX Font Warning: Encoding `LFE' has changed to `OT1' for symbol font.



> > Furthermore, I spoke too soon when I said that just typing worked
> > fine. When I switch languages, it does seem to correctly switch the
> > script, except for punctuation symbols. Only latin letters and digits
> > seem to be correctly rendered, but the rest of the keyboard seems
> > "stuck" with the other keyboard map. Only when I switch off keybord
> > maps do I get the correct symbols.
> >
>
> Hmm, this is strange. What have you set your primary and secondary
> keymaps to? What is your default language (Tools -> Preferences ->
> Language settings -> Language) and what is the document language
> (Document -> Settings... -> Language)? Which language seems to be
> working correctly, and which does not? Can you give an exact recipe for
> reproducing (e.g.: open a new document, set language to xxxx, type
> "abc"...)?

Primary: american
Secondary: farsi

Default language: English

Things seem to go awry when the language is switched, regardless of
whether keyboard maps are on or off.

Here's the recipe:

1. Open new document
2. type some text, including punctuation symbols
3. Set language to Farsi (Edit->Test Style->Customize->Language set to Farsi)
4. Type some text.
5. Set language to English or American (Edit->Test
Style->Customize->Language set to English)
6. Type text. Punctuation symbols are now wrong.





> Dov
>
>


-- 
Ernesto Posse
Modelling, Simulation and Design Lab - School of Computer Science
McGill University - Montreal, Quebec, Canada
url: http://moncs.cs.mcgill.ca/people/eposse

Reply via email to