Re: Using LyX to Prepare Mixed Farsi-Arabic-English documents (Howto)

2007-06-20 Thread Mostafa Vahedi
> Mostafa Vahedi schrieb:

> > I have attached the Farsi translation of the file 
> > "example_lyxified.lyx" (that can be put in the directory "examples\fa\").

> I'll add this.
   
  Thanks.

> > 1) the fontenc should be adjusted. There are two ways:
> > 1-a) One way is to adjust "Tools->Preferences:Outpus:LaTeX" and put 
> > the "LFE,LAE" beside the existing one "T1" in the input field "TeX 
> > encoding".
> > 1-b) One easier way is to add the command 
> > "\usepackage[LFE,LAE]{fontenc}" inside "Document->Setteings:LaTeX 
  > > Preamble".

> The correct way is to add the options "LFE,LAE" to the existing call of 
> fontenc in the preamble.
   
  You are right. In fact I don't know how to do that. Whether I should do 
something in the source or somewhere else. 

> > 2) Due to the current bugs or limitations of the ARABI package 
> > whenever we want to use Farsi we should use Arabic too (because some of the 
> > shared definitions are defined in Arabic definitions files only). 
> > Moreover Farsi should be called before Arabic. Again there are two ways:
> > 2-a) It is possible to adjust the input field "Options" in 
> > "Document->Setteings:Document Class" (though I am not sure!).

> This is the way we do know: When a language is used in a document, its 
> name is automatically added 
> to the document class option. To in case the user uses Farsi, we should 
> also add arabic.
   
  You are right! But since this is a bug of ARABI package hopefully it will be 
OK later and then we should/may remove this part from the source. However 
Please let me know the point that I should look into the source or 

> > 3) ARABI has a seperate command to specify the Main language of the 
> > document. This main language 
> > is used to specify the language and orientation of the "Table of 
> > Contents" and "Page numbers" and so 
> > on. It is necessary to put the command "\TOCLanguage{farsi}" in the 
> > "Document->Setteings:LaTeX Preamble".

> Yes, but not to the user visible preamble but to the one that LyX sets.
   
  You are right! How can we understand what the main language of the document 
is?

> > 4) (One other bug!) We should add the command 
> > "[EMAIL PROTECTED]@R{#1}}}" to "Document->Setteings:LaTeX
  > > Preamble".

> Why?
   
  Don't worry. This bug is due to ARABI package not to LyX. If we don't do this 
then the Table of Contents will be written in Arabic Font and also LyX will 
complain about some undefined characters. We should not change the source code 
of LyX. This is a bug of ARABI.

> > 5) (One other bug!) We should add the following two commands
> > "\DeclareTextSymbol{\guillemotright}{LFE}{62}" and 
  > > "\DeclareTextSymbol{\guillemotleft}{LFE}{60}" to 
"Document->Setteings:LaTeX
  > > Preamble".

> Why?
   
  The bug is again due to ARABI package. These two lines define the quote 
symboles in defined font-encoding LFE used for Farsi which are "«" and "»". 
Again we should not change the source of LyX. This is a bug of ARABI.

> > 6) (One other bug!). We should add the command 
> > "\selectlanguage{farsi}" as an ERT as the first line of the document.

> No need for this. When the document language is Farsi, no switch is 
> needed. For later switches, this 
> is currently correctly done by LyX.
   
  Again as I said this bug is due to ARABI package. In the previous email I 
have attached the example_lyxified.lyx. Try to compile it as it is and then try 
to compile it without the first line containing the ERT. You will see that LyX 
will complain about some undefined characters. Again since this is a bug of LyX 
we should not change the source again as I said before!

> regards Uwe

  Thanks, Mostafa

 
-
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.

Re: Using LyX to Prepare Mixed Farsi-Arabic-English documents (Howto)

2007-06-20 Thread Uwe Stöhr

Uwe Stöhr schrieb:

I have attached the Farsi translation of the file 
"example_lyxified.lyx" (that can be put in the directory "examples\fa\").


I'll add this.


Sorry, I was too fast. This will only be added when we fixed the remaining issues correctly because 
preamble hacks are no solution.


regards Uwe


Re: Using LyX to Prepare Mixed Farsi-Arabic-English documents (Howto)

2007-06-20 Thread Uwe Stöhr

Mostafa Vahedi schrieb:


Here I will explain how to adjust LyX to prepare mixed Farsi-Arabic-English 
documents (which is based on ARABI package).


Yes, with the arabi-package this is no problem.


I have attached the Farsi translation of the file "example_lyxified.lyx" (that can be put 
in the directory "examples\fa\").


I'll add this.


1) the fontenc should be adjusted. There are two ways:
1-a) One way is to adjust "Tools->Preferences:Outpus:LaTeX" and put the "LFE,LAE" beside the 
existing one "T1" in the input field "TeX encoding".
1-b) One easier way is to add the command "\usepackage[LFE,LAE]{fontenc}" inside 
"Document->Setteings:LaTeX Preamble".


The correct way is to add the options "LFE,LAE" to the existing call of fontenc 
in the preamble.


2) Due to the current bugs or limitations of the ARABI package whenever we want 
to use Farsi we should use Arabic too (because some of the shared definitions 
are defined in Arabic definitions files only). Moreover Farsi should be called 
before Arabic. Again there are two ways:
2-a) It is possible to adjust the input field "Options" in 
"Document->Setteings:Document Class" (though I am not sure!).


This is the way we do know: When a language is used in a document, its name is automatically added 
to the document class option. To in case the user uses Farsi, we should also add arabic.


 > 3) ARABI has a seperate command to specify the Main language of the document. This main language 
is used to specify the language and orientation of the "Table of Contents" and "Page numbers" and so 
on. It is necessary to put the command "\TOCLanguage{farsi}" in the "Document->Setteings:LaTeX 
Preamble".


Yes, but not to the user visible preamble but to the one that LyX sets.


4) (One other bug!) We should add the command "[EMAIL PROTECTED]@R{#1}}}" to 
"Document->Setteings:LaTeX Preamble".


Why?


5) (One other bug!) We should add the following two commands
"\DeclareTextSymbol{\guillemotright}{LFE}{62}" and 
"\DeclareTextSymbol{\guillemotleft}{LFE}{60}" to "Document->Setteings:LaTeX Preamble".


Why?


6) (One other bug!). We should add the command "\selectlanguage{farsi}" as an 
ERT as the first line of the document.


No need for this. When the document language is Farsi, no switch is needed. For later switches, this 
is currently correctly done by LyX.


regards Uwe