Re: Miximg scripts.

2007-10-09 Thread Ernesto Posse
Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style - Customize dialog box.

One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?


On 10/4/07, Dov Feldstern [EMAIL PROTECTED] wrote:


 Ernesto Posse wrote:
  On 9/29/07, Dov Feldstern dfeldstern-rhxOsnTko2JWk0Htik3J/[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}
 

 Uwe, I believe you worked on this at some point? I may have thwarted
 your efforts then...? Do you know what the current situation is?

  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 , type
  abc...)?
 

 It's working for me (with a few slight variations on your setup and
 recipe -- see below --- perhaps those will help).

  Primary: american

 Try switching this (primary) to null --- I think that means that your
 default language will be used.

  Secondary: farsi
 
  Default language: English
 
  Things seem to go awry when the language is switched, regardless of
  whether keyboard maps are on or off.
 
 (this seems to indicate that the problem is not with the keymaps, but
 elsewhere in your system. Could it be that by accident you also switched
 the language at the OS-keyboard-level?)

  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)

 Try switching languages by typing language farsi in the minibuffer
 (Alt-x).

  4. Type some text.
  5. Set language to English or American (Edit-Test
  Style-Customize-Language set to English)

 Again, try the same command as above (still with farsi! this will
 toggle farsi off).

  6. Type text. Punctuation symbols are now wrong.

 Does this help?

 If it does, you can bind the language farsi command to a key, see,
 e.g., the suggestions here:
 http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .

 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


Re: Miximg scripts.

2007-10-09 Thread Dov Feldstern

Ernesto Posse wrote:

Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style - Customize dialog box.



Great! I'm glad I was able to help.


One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?



Uwe, do you remember what the story is with this issue, regarding farsi? 
(see below for more details)



Ernesto Posse wrote:

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}


Uwe, I believe you worked on this at some point? I may have thwarted
your efforts then...? Do you know what the current situation is?


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





Re: Miximg scripts.

2007-10-09 Thread Ernesto Posse
Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style - Customize dialog box.

One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?


On 10/4/07, Dov Feldstern [EMAIL PROTECTED] wrote:


 Ernesto Posse wrote:
  On 9/29/07, Dov Feldstern dfeldstern-rhxOsnTko2JWk0Htik3J/[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}
 

 Uwe, I believe you worked on this at some point? I may have thwarted
 your efforts then...? Do you know what the current situation is?

  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 , type
  abc...)?
 

 It's working for me (with a few slight variations on your setup and
 recipe -- see below --- perhaps those will help).

  Primary: american

 Try switching this (primary) to null --- I think that means that your
 default language will be used.

  Secondary: farsi
 
  Default language: English
 
  Things seem to go awry when the language is switched, regardless of
  whether keyboard maps are on or off.
 
 (this seems to indicate that the problem is not with the keymaps, but
 elsewhere in your system. Could it be that by accident you also switched
 the language at the OS-keyboard-level?)

  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)

 Try switching languages by typing language farsi in the minibuffer
 (Alt-x).

  4. Type some text.
  5. Set language to English or American (Edit-Test
  Style-Customize-Language set to English)

 Again, try the same command as above (still with farsi! this will
 toggle farsi off).

  6. Type text. Punctuation symbols are now wrong.

 Does this help?

 If it does, you can bind the language farsi command to a key, see,
 e.g., the suggestions here:
 http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .

 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


Re: Miximg scripts.

2007-10-09 Thread Dov Feldstern

Ernesto Posse wrote:

Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style - Customize dialog box.



Great! I'm glad I was able to help.


One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?



Uwe, do you remember what the story is with this issue, regarding farsi? 
(see below for more details)



Ernesto Posse wrote:

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}


Uwe, I believe you worked on this at some point? I may have thwarted
your efforts then...? Do you know what the current situation is?


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





Re: Miximg scripts.

2007-10-09 Thread Ernesto Posse
Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style -> Customize dialog box.

One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?


On 10/4/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
>
>
> Ernesto Posse wrote:
> > On 9/29/07, Dov Feldstern  > 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}
> >
>
> Uwe, I believe you worked on this at some point? I may have thwarted
> your efforts then...? Do you know what the current situation is?
>
> > 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 , type
> >> "abc"...)?
> >
>
> It's working for me (with a few slight variations on your setup and
> recipe -- see below --- perhaps those will help).
>
> > Primary: american
>
> Try switching this (primary) to "null" --- I think that means that your
> default language will be used.
>
> > Secondary: farsi
> >
> > Default language: English
> >
> > Things seem to go awry when the language is switched, regardless of
> > whether keyboard maps are on or off.
> >
> (this seems to indicate that the problem is not with the keymaps, but
> elsewhere in your system. Could it be that by accident you also switched
> the language at the OS-keyboard-level?)
>
> > 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)
>
> Try switching languages by typing "language farsi" in the minibuffer
> (Alt-x).
>
> > 4. Type some text.
> > 5. Set language to English or American (Edit->Test
> > Style->Customize->Language set to English)
>
> Again, try the same command as above (still with "farsi"! this will
> toggle farsi off).
>
> > 6. Type text. Punctuation symbols are now wrong.
>
> Does this help?
>
> If it does, you can bind the "language farsi" command to a key, see,
> e.g., the suggestions here:
> http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .
>
> 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


Re: Miximg scripts.

2007-10-09 Thread Dov Feldstern

Ernesto Posse wrote:

Thanks. Your suggestion worked, after changing the primary keyboard
map to null. It works with both the mini-buffer command and through
the Text style -> Customize dialog box.



Great! I'm glad I was able to help.


One more question, is the issue of the options for fontenc and babel
addressed in version 1.5.2?



Uwe, do you remember what the story is with this issue, regarding farsi? 
(see below for more details)



Ernesto Posse wrote:

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}


Uwe, I believe you worked on this at some point? I may have thwarted
your efforts then...? Do you know what the current situation is?


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





Re: Miximg scripts.

2007-10-04 Thread Dov Feldstern

Ernesto Posse wrote:

On 9/29/07, Dov Feldstern dfeldstern-rhxOsnTko2JWk0Htik3J/[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}



Uwe, I believe you worked on this at some point? I may have thwarted 
your efforts then...? Do you know what the current situation is?



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 , type
abc...)?




It's working for me (with a few slight variations on your setup and 
recipe -- see below --- perhaps those will help).



Primary: american


Try switching this (primary) to null --- I think that means that your 
default language will be used.



Secondary: farsi

Default language: English

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

(this seems to indicate that the problem is not with the keymaps, but 
elsewhere in your system. Could it be that by accident you also switched 
the language at the OS-keyboard-level?)



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)


Try switching languages by typing language farsi in the minibuffer 
(Alt-x).



4. Type some text.
5. Set language to English or American (Edit-Test
Style-Customize-Language set to English)


Again, try the same command as above (still with farsi! this will 
toggle farsi off).



6. Type text. Punctuation symbols are now wrong.


Does this help?

If it does, you can bind the language farsi command to a key, see, 
e.g., the suggestions here: 
http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .


Dov



Re: Miximg scripts.

2007-10-04 Thread Dov Feldstern

Ernesto Posse wrote:

On 9/29/07, Dov Feldstern dfeldstern-rhxOsnTko2JWk0Htik3J/[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}



Uwe, I believe you worked on this at some point? I may have thwarted 
your efforts then...? Do you know what the current situation is?



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 , type
abc...)?




It's working for me (with a few slight variations on your setup and 
recipe -- see below --- perhaps those will help).



Primary: american


Try switching this (primary) to null --- I think that means that your 
default language will be used.



Secondary: farsi

Default language: English

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

(this seems to indicate that the problem is not with the keymaps, but 
elsewhere in your system. Could it be that by accident you also switched 
the language at the OS-keyboard-level?)



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)


Try switching languages by typing language farsi in the minibuffer 
(Alt-x).



4. Type some text.
5. Set language to English or American (Edit-Test
Style-Customize-Language set to English)


Again, try the same command as above (still with farsi! this will 
toggle farsi off).



6. Type text. Punctuation symbols are now wrong.


Does this help?

If it does, you can bind the language farsi command to a key, see, 
e.g., the suggestions here: 
http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .


Dov



Re: Miximg scripts.

2007-10-04 Thread Dov Feldstern

Ernesto Posse wrote:

On 9/29/07, Dov Feldstern  
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}



Uwe, I believe you worked on this at some point? I may have thwarted 
your efforts then...? Do you know what the current situation is?



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 , type
"abc"...)?




It's working for me (with a few slight variations on your setup and 
recipe -- see below --- perhaps those will help).



Primary: american


Try switching this (primary) to "null" --- I think that means that your 
default language will be used.



Secondary: farsi

Default language: English

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

(this seems to indicate that the problem is not with the keymaps, but 
elsewhere in your system. Could it be that by accident you also switched 
the language at the OS-keyboard-level?)



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)


Try switching languages by typing "language farsi" in the minibuffer 
(Alt-x).



4. Type some text.
5. Set language to English or American (Edit->Test
Style->Customize->Language set to English)


Again, try the same command as above (still with "farsi"! this will 
toggle farsi off).



6. Type text. Punctuation symbols are now wrong.


Does this help?

If it does, you can bind the "language farsi" command to a key, see, 
e.g., the suggestions here: 
http://permalink.gmane.org/gmane.editors.lyx.devel/88941 .


Dov



Re: Miximg scripts.

2007-10-01 Thread Ernesto Posse
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 , 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


Re: Miximg scripts.

2007-10-01 Thread Ernesto Posse
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 , 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


Re: Miximg scripts.

2007-10-01 Thread Ernesto Posse
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 , 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


Re: Miximg scripts.

2007-09-29 Thread Dov Feldstern

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.



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 , type 
abc...)?


Dov


Re: Miximg scripts.

2007-09-29 Thread Dov Feldstern

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.



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 , type 
abc...)?


Dov


Re: Miximg scripts.

2007-09-29 Thread Dov Feldstern

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.



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 , type 
"abc"...)?


Dov


Re: Miximg scripts.

2007-09-28 Thread Ernesto Posse
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.

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.



On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
 Ernesto Posse wrote:
  Great, thanks. I wasn't setting  Edit - Text style -Customized...
  - Language properly. Is there a key binding for this option?
 

 There is an lfun called language which does exactly this, and which
 you can bind to any key you want. In Hebrew, we use F12 for the binding.
 I suggest adapting one of the files attached here, just use the language
 farsi: http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just
 place the file to your .lyx/bind directory (I'm not sure what the
 Windows equivalent is, the truth is you could probably place the file
 anywhere), and select it as your bind file (Tools - Preferences... -
 Look and feel - User interface).

 Note that since you're using an RTL language, then you shouldn't even
 have to use the bindings for explicitly setting the keymap (M-k 1, etc.)
 --- it should happen automatically when you switch the language.

  When I am typing, it seems to work, but when I try to view it (for
  example in DVI) I get latex errors such as:
 
  LaTeX Error: Encoding scheme `LAE' unknown.
  Command \alefhamza unavailable in encoding T1.
  Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.
 
  I am trying to mix English and Farsi. I followed the instructions from
  the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
  on Windows Vista, with MiKTeX 2.6.
 
  What could be the problem?

 I don't know the Farsi stuff, Mostafa is our Farsi expert. But some
 things I would check: are you sure that the arabi latex package is
 installed and set up correctly? What's bothering me is that the LAE
 encoding scheme seems to be unknown, I believe that's what should be
 used for Farsi.

 Uwe, Mostafa --- any ideas?

 
  By the way, I found that in menus.bind, both options for M-k o and
  M-k x are set to keymap-off. If I change one of them to
  'keymap-on', it seems to be ignored.

 I'm not even sure what the keymap-off and keymap-on lfuns are supposed
 to do... But as I said above, for an RTL language, you shouldn't need
 any of the keymap lfuns, switching the language should take care of this
 as long as you've setup the keymaps to be used.

 
 
 
  On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
  Ernesto Posse wrote:
  Is it possible to write a document in LyX (1.5.1) that mixes two (or
  more) scripts? If so, how?
 
  I have been able to install and use an alternative keyboard map for a
  non-latin script, but, even though one can specify two keyboard maps,
  I have not been able to find anywhere in the documentation how to
  select the second map.
 
  Thanks.
 
  Hi!
 
  Yes, it is possible, there are actually a few different ways to do it.
  However, your success may also depend on which scripts specifically you
  are talking about.
 
  The easiest way is perhaps to just switch the keyboard at the OS-level.
  Depending on your OS / Desktop Environment, you can probably change the
  keyboard's language, and then whatever you type will be in that script.
 
  Another option is to use LyX's built-in keymaps. It sounds like you have
  already discovered this option. In order to use it, you can use the
  following keybindings: M-k 1 M-k 2 to choose the primary / secondary
  keymap; M-k t to toggle between them. Two caveats, though: Firstly,
  Keymaps currently support only two scripts simultaneously. Secondly, if
  both scripts you want to use are non-RTL, you have to turn off the RTL
  option (see the RELEASE-NOTES, or
  http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).
 
  Personally, I prefer keymaps. I have pointed out some of the reasons why
  in a previous post
  (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
  there if those reasons make sense to you or not, and that may help you
  decide which method is better for you.
 
  Note, however, that regardless of which method you use, you should also
  make sure that the language of the text (Edit - Text style -
  Customized... - Language) is set correctly. Otherwise, chances are that
  latex will choke on the non-latin characters. This is where using a LyX
  keymap has an advantage: since you can change the keymap from within
  LyX, you can create a keybinding which will both switch the keymap and
  set the language using only a single keystroke. I 

Re: Miximg scripts.

2007-09-28 Thread Ernesto Posse
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.

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.



On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
 Ernesto Posse wrote:
  Great, thanks. I wasn't setting  Edit - Text style -Customized...
  - Language properly. Is there a key binding for this option?
 

 There is an lfun called language which does exactly this, and which
 you can bind to any key you want. In Hebrew, we use F12 for the binding.
 I suggest adapting one of the files attached here, just use the language
 farsi: http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just
 place the file to your .lyx/bind directory (I'm not sure what the
 Windows equivalent is, the truth is you could probably place the file
 anywhere), and select it as your bind file (Tools - Preferences... -
 Look and feel - User interface).

 Note that since you're using an RTL language, then you shouldn't even
 have to use the bindings for explicitly setting the keymap (M-k 1, etc.)
 --- it should happen automatically when you switch the language.

  When I am typing, it seems to work, but when I try to view it (for
  example in DVI) I get latex errors such as:
 
  LaTeX Error: Encoding scheme `LAE' unknown.
  Command \alefhamza unavailable in encoding T1.
  Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.
 
  I am trying to mix English and Farsi. I followed the instructions from
  the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
  on Windows Vista, with MiKTeX 2.6.
 
  What could be the problem?

 I don't know the Farsi stuff, Mostafa is our Farsi expert. But some
 things I would check: are you sure that the arabi latex package is
 installed and set up correctly? What's bothering me is that the LAE
 encoding scheme seems to be unknown, I believe that's what should be
 used for Farsi.

 Uwe, Mostafa --- any ideas?

 
  By the way, I found that in menus.bind, both options for M-k o and
  M-k x are set to keymap-off. If I change one of them to
  'keymap-on', it seems to be ignored.

 I'm not even sure what the keymap-off and keymap-on lfuns are supposed
 to do... But as I said above, for an RTL language, you shouldn't need
 any of the keymap lfuns, switching the language should take care of this
 as long as you've setup the keymaps to be used.

 
 
 
  On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
  Ernesto Posse wrote:
  Is it possible to write a document in LyX (1.5.1) that mixes two (or
  more) scripts? If so, how?
 
  I have been able to install and use an alternative keyboard map for a
  non-latin script, but, even though one can specify two keyboard maps,
  I have not been able to find anywhere in the documentation how to
  select the second map.
 
  Thanks.
 
  Hi!
 
  Yes, it is possible, there are actually a few different ways to do it.
  However, your success may also depend on which scripts specifically you
  are talking about.
 
  The easiest way is perhaps to just switch the keyboard at the OS-level.
  Depending on your OS / Desktop Environment, you can probably change the
  keyboard's language, and then whatever you type will be in that script.
 
  Another option is to use LyX's built-in keymaps. It sounds like you have
  already discovered this option. In order to use it, you can use the
  following keybindings: M-k 1 M-k 2 to choose the primary / secondary
  keymap; M-k t to toggle between them. Two caveats, though: Firstly,
  Keymaps currently support only two scripts simultaneously. Secondly, if
  both scripts you want to use are non-RTL, you have to turn off the RTL
  option (see the RELEASE-NOTES, or
  http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).
 
  Personally, I prefer keymaps. I have pointed out some of the reasons why
  in a previous post
  (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
  there if those reasons make sense to you or not, and that may help you
  decide which method is better for you.
 
  Note, however, that regardless of which method you use, you should also
  make sure that the language of the text (Edit - Text style -
  Customized... - Language) is set correctly. Otherwise, chances are that
  latex will choke on the non-latin characters. This is where using a LyX
  keymap has an advantage: since you can change the keymap from within
  LyX, you can create a keybinding which will both switch the keymap and
  set the language using only a single keystroke. I 

Re: Miximg scripts.

2007-09-28 Thread Ernesto Posse
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.

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.



On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> Ernesto Posse wrote:
> > Great, thanks. I wasn't setting  "Edit -> Text style ->Customized...
> > -> Language" properly. Is there a key binding for this option?
> >
>
> There is an lfun called "language" which does exactly this, and which
> you can bind to any key you want. In Hebrew, we use F12 for the binding.
> I suggest adapting one of the files attached here, just use the language
> "farsi": http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just
> place the file to your .lyx/bind directory (I'm not sure what the
> Windows equivalent is, the truth is you could probably place the file
> anywhere), and select it as your bind file (Tools -> Preferences... ->
> Look and feel -> User interface).
>
> Note that since you're using an RTL language, then you shouldn't even
> have to use the bindings for explicitly setting the keymap (M-k 1, etc.)
> --- it should happen automatically when you switch the language.
>
> > When I am typing, it seems to work, but when I try to view it (for
> > example in DVI) I get latex errors such as:
> >
> > LaTeX Error: Encoding scheme `LAE' unknown.
> > Command \alefhamza unavailable in encoding T1.
> > Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.
> >
> > I am trying to mix English and Farsi. I followed the instructions from
> > the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
> > on Windows Vista, with MiKTeX 2.6.
> >
> > What could be the problem?
>
> I don't know the Farsi stuff, Mostafa is our Farsi expert. But some
> things I would check: are you sure that the "arabi" latex package is
> installed and set up correctly? What's bothering me is that the LAE
> encoding scheme seems to be unknown, I believe that's what should be
> used for Farsi.
>
> Uwe, Mostafa --- any ideas?
>
> >
> > By the way, I found that in menus.bind, both options for "M-k o" and
> > "M-k x" are set to "keymap-off". If I change one of them to
> > 'keymap-on', it seems to be ignored.
>
> I'm not even sure what the keymap-off and keymap-on lfuns are supposed
> to do... But as I said above, for an RTL language, you shouldn't need
> any of the keymap lfuns, switching the language should take care of this
> as long as you've setup the keymaps to be used.
>
> >
> >
> >
> > On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> >> Ernesto Posse wrote:
> >>> Is it possible to write a document in LyX (1.5.1) that mixes two (or
> >>> more) scripts? If so, how?
> >>>
> >>> I have been able to install and use an alternative keyboard map for a
> >>> non-latin script, but, even though one can specify two keyboard maps,
> >>> I have not been able to find anywhere in the documentation how to
> >>> select the second map.
> >>>
> >>> Thanks.
> >>>
> >> Hi!
> >>
> >> Yes, it is possible, there are actually a few different ways to do it.
> >> However, your success may also depend on which scripts specifically you
> >> are talking about.
> >>
> >> The easiest way is perhaps to just switch the keyboard at the OS-level.
> >> Depending on your OS / Desktop Environment, you can probably change the
> >> "keyboard's language", and then whatever you type will be in that script.
> >>
> >> Another option is to use LyX's built-in keymaps. It sounds like you have
> >> already discovered this option. In order to use it, you can use the
> >> following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary
> >> keymap; "M-k t" to toggle between them. Two caveats, though: Firstly,
> >> Keymaps currently support only two scripts simultaneously. Secondly, if
> >> both scripts you want to use are non-RTL, you have to turn off the RTL
> >> option (see the RELEASE-NOTES, or
> >> http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).
> >>
> >> Personally, I prefer keymaps. I have pointed out some of the reasons why
> >> in a previous post
> >> (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
> >> there if those reasons make sense to you or not, and that may help you
> >> decide which method is better for you.
> >>
> >> Note, however, that regardless of which method you use, you should also
> >> make sure that the language of the text (Edit -> Text style ->
> >> Customized... -> Language) is set correctly. Otherwise, chances are that
> >> latex will choke on the 

Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.



Hi!

Yes, it is possible, there are actually a few different ways to do it. 
However, your success may also depend on which scripts specifically you 
are talking about.


The easiest way is perhaps to just switch the keyboard at the OS-level. 
Depending on your OS / Desktop Environment, you can probably change the 
keyboard's language, and then whatever you type will be in that script.


Another option is to use LyX's built-in keymaps. It sounds like you have 
already discovered this option. In order to use it, you can use the 
following keybindings: M-k 1 M-k 2 to choose the primary / secondary 
keymap; M-k t to toggle between them. Two caveats, though: Firstly, 
Keymaps currently support only two scripts simultaneously. Secondly, if 
both scripts you want to use are non-RTL, you have to turn off the RTL 
option (see the RELEASE-NOTES, or 
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).


Personally, I prefer keymaps. I have pointed out some of the reasons why 
in a previous post 
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see 
there if those reasons make sense to you or not, and that may help you 
decide which method is better for you.


Note, however, that regardless of which method you use, you should also 
make sure that the language of the text (Edit - Text style - 
Customized... - Language) is set correctly. Otherwise, chances are that 
latex will choke on the non-latin characters. This is where using a LyX 
keymap has an advantage: since you can change the keymap from within 
LyX, you can create a keybinding which will both switch the keymap and 
set the language using only a single keystroke. I don't know of any way 
to do this if you use OS-level keyboard support.


If you provide a little more specific information (which scripts? what 
OS are your working on? ...) we may be able to provide further assistance.


Dov


Re: Miximg scripts.

2007-09-27 Thread Ernesto Posse
Great, thanks. I wasn't setting  Edit - Text style -Customized...
- Language properly. Is there a key binding for this option?

When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?

By the way, I found that in menus.bind, both options for M-k o and
M-k x are set to keymap-off. If I change one of them to
'keymap-on', it seems to be ignored.

On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
 Ernesto Posse wrote:
  Is it possible to write a document in LyX (1.5.1) that mixes two (or
  more) scripts? If so, how?
 
  I have been able to install and use an alternative keyboard map for a
  non-latin script, but, even though one can specify two keyboard maps,
  I have not been able to find anywhere in the documentation how to
  select the second map.
 
  Thanks.
 

 Hi!

 Yes, it is possible, there are actually a few different ways to do it.
 However, your success may also depend on which scripts specifically you
 are talking about.

 The easiest way is perhaps to just switch the keyboard at the OS-level.
 Depending on your OS / Desktop Environment, you can probably change the
 keyboard's language, and then whatever you type will be in that script.

 Another option is to use LyX's built-in keymaps. It sounds like you have
 already discovered this option. In order to use it, you can use the
 following keybindings: M-k 1 M-k 2 to choose the primary / secondary
 keymap; M-k t to toggle between them. Two caveats, though: Firstly,
 Keymaps currently support only two scripts simultaneously. Secondly, if
 both scripts you want to use are non-RTL, you have to turn off the RTL
 option (see the RELEASE-NOTES, or
 http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).

 Personally, I prefer keymaps. I have pointed out some of the reasons why
 in a previous post
 (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
 there if those reasons make sense to you or not, and that may help you
 decide which method is better for you.

 Note, however, that regardless of which method you use, you should also
 make sure that the language of the text (Edit - Text style -
 Customized... - Language) is set correctly. Otherwise, chances are that
 latex will choke on the non-latin characters. This is where using a LyX
 keymap has an advantage: since you can change the keymap from within
 LyX, you can create a keybinding which will both switch the keymap and
 set the language using only a single keystroke. I don't know of any way
 to do this if you use OS-level keyboard support.

 If you provide a little more specific information (which scripts? what
 OS are your working on? ...) we may be able to provide further assistance.

 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


Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Great, thanks. I wasn't setting  Edit - Text style -Customized...
- Language properly. Is there a key binding for this option?



There is an lfun called language which does exactly this, and which 
you can bind to any key you want. In Hebrew, we use F12 for the binding. 
I suggest adapting one of the files attached here, just use the language 
farsi: http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just 
place the file to your .lyx/bind directory (I'm not sure what the 
Windows equivalent is, the truth is you could probably place the file 
anywhere), and select it as your bind file (Tools - Preferences... - 
Look and feel - User interface).


Note that since you're using an RTL language, then you shouldn't even 
have to use the bindings for explicitly setting the keymap (M-k 1, etc.) 
--- it should happen automatically when you switch the language.



When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?


I don't know the Farsi stuff, Mostafa is our Farsi expert. But some 
things I would check: are you sure that the arabi latex package is 
installed and set up correctly? What's bothering me is that the LAE 
encoding scheme seems to be unknown, I believe that's what should be 
used for Farsi.


Uwe, Mostafa --- any ideas?



By the way, I found that in menus.bind, both options for M-k o and
M-k x are set to keymap-off. If I change one of them to
'keymap-on', it seems to be ignored.


I'm not even sure what the keymap-off and keymap-on lfuns are supposed 
to do... But as I said above, for an RTL language, you shouldn't need 
any of the keymap lfuns, switching the language should take care of this 
as long as you've setup the keymaps to be used.






On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.


Hi!

Yes, it is possible, there are actually a few different ways to do it.
However, your success may also depend on which scripts specifically you
are talking about.

The easiest way is perhaps to just switch the keyboard at the OS-level.
Depending on your OS / Desktop Environment, you can probably change the
keyboard's language, and then whatever you type will be in that script.

Another option is to use LyX's built-in keymaps. It sounds like you have
already discovered this option. In order to use it, you can use the
following keybindings: M-k 1 M-k 2 to choose the primary / secondary
keymap; M-k t to toggle between them. Two caveats, though: Firstly,
Keymaps currently support only two scripts simultaneously. Secondly, if
both scripts you want to use are non-RTL, you have to turn off the RTL
option (see the RELEASE-NOTES, or
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).

Personally, I prefer keymaps. I have pointed out some of the reasons why
in a previous post
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
there if those reasons make sense to you or not, and that may help you
decide which method is better for you.

Note, however, that regardless of which method you use, you should also
make sure that the language of the text (Edit - Text style -
Customized... - Language) is set correctly. Otherwise, chances are that
latex will choke on the non-latin characters. This is where using a LyX
keymap has an advantage: since you can change the keymap from within
LyX, you can create a keybinding which will both switch the keymap and
set the language using only a single keystroke. I don't know of any way
to do this if you use OS-level keyboard support.

If you provide a little more specific information (which scripts? what
OS are your working on? ...) we may be able to provide further assistance.

Dov






Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.



Hi!

Yes, it is possible, there are actually a few different ways to do it. 
However, your success may also depend on which scripts specifically you 
are talking about.


The easiest way is perhaps to just switch the keyboard at the OS-level. 
Depending on your OS / Desktop Environment, you can probably change the 
keyboard's language, and then whatever you type will be in that script.


Another option is to use LyX's built-in keymaps. It sounds like you have 
already discovered this option. In order to use it, you can use the 
following keybindings: M-k 1 M-k 2 to choose the primary / secondary 
keymap; M-k t to toggle between them. Two caveats, though: Firstly, 
Keymaps currently support only two scripts simultaneously. Secondly, if 
both scripts you want to use are non-RTL, you have to turn off the RTL 
option (see the RELEASE-NOTES, or 
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).


Personally, I prefer keymaps. I have pointed out some of the reasons why 
in a previous post 
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see 
there if those reasons make sense to you or not, and that may help you 
decide which method is better for you.


Note, however, that regardless of which method you use, you should also 
make sure that the language of the text (Edit - Text style - 
Customized... - Language) is set correctly. Otherwise, chances are that 
latex will choke on the non-latin characters. This is where using a LyX 
keymap has an advantage: since you can change the keymap from within 
LyX, you can create a keybinding which will both switch the keymap and 
set the language using only a single keystroke. I don't know of any way 
to do this if you use OS-level keyboard support.


If you provide a little more specific information (which scripts? what 
OS are your working on? ...) we may be able to provide further assistance.


Dov


Re: Miximg scripts.

2007-09-27 Thread Ernesto Posse
Great, thanks. I wasn't setting  Edit - Text style -Customized...
- Language properly. Is there a key binding for this option?

When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?

By the way, I found that in menus.bind, both options for M-k o and
M-k x are set to keymap-off. If I change one of them to
'keymap-on', it seems to be ignored.

On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:
 Ernesto Posse wrote:
  Is it possible to write a document in LyX (1.5.1) that mixes two (or
  more) scripts? If so, how?
 
  I have been able to install and use an alternative keyboard map for a
  non-latin script, but, even though one can specify two keyboard maps,
  I have not been able to find anywhere in the documentation how to
  select the second map.
 
  Thanks.
 

 Hi!

 Yes, it is possible, there are actually a few different ways to do it.
 However, your success may also depend on which scripts specifically you
 are talking about.

 The easiest way is perhaps to just switch the keyboard at the OS-level.
 Depending on your OS / Desktop Environment, you can probably change the
 keyboard's language, and then whatever you type will be in that script.

 Another option is to use LyX's built-in keymaps. It sounds like you have
 already discovered this option. In order to use it, you can use the
 following keybindings: M-k 1 M-k 2 to choose the primary / secondary
 keymap; M-k t to toggle between them. Two caveats, though: Firstly,
 Keymaps currently support only two scripts simultaneously. Secondly, if
 both scripts you want to use are non-RTL, you have to turn off the RTL
 option (see the RELEASE-NOTES, or
 http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).

 Personally, I prefer keymaps. I have pointed out some of the reasons why
 in a previous post
 (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
 there if those reasons make sense to you or not, and that may help you
 decide which method is better for you.

 Note, however, that regardless of which method you use, you should also
 make sure that the language of the text (Edit - Text style -
 Customized... - Language) is set correctly. Otherwise, chances are that
 latex will choke on the non-latin characters. This is where using a LyX
 keymap has an advantage: since you can change the keymap from within
 LyX, you can create a keybinding which will both switch the keymap and
 set the language using only a single keystroke. I don't know of any way
 to do this if you use OS-level keyboard support.

 If you provide a little more specific information (which scripts? what
 OS are your working on? ...) we may be able to provide further assistance.

 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


Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Great, thanks. I wasn't setting  Edit - Text style -Customized...
- Language properly. Is there a key binding for this option?



There is an lfun called language which does exactly this, and which 
you can bind to any key you want. In Hebrew, we use F12 for the binding. 
I suggest adapting one of the files attached here, just use the language 
farsi: http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just 
place the file to your .lyx/bind directory (I'm not sure what the 
Windows equivalent is, the truth is you could probably place the file 
anywhere), and select it as your bind file (Tools - Preferences... - 
Look and feel - User interface).


Note that since you're using an RTL language, then you shouldn't even 
have to use the bindings for explicitly setting the keymap (M-k 1, etc.) 
--- it should happen automatically when you switch the language.



When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?


I don't know the Farsi stuff, Mostafa is our Farsi expert. But some 
things I would check: are you sure that the arabi latex package is 
installed and set up correctly? What's bothering me is that the LAE 
encoding scheme seems to be unknown, I believe that's what should be 
used for Farsi.


Uwe, Mostafa --- any ideas?



By the way, I found that in menus.bind, both options for M-k o and
M-k x are set to keymap-off. If I change one of them to
'keymap-on', it seems to be ignored.


I'm not even sure what the keymap-off and keymap-on lfuns are supposed 
to do... But as I said above, for an RTL language, you shouldn't need 
any of the keymap lfuns, switching the language should take care of this 
as long as you've setup the keymaps to be used.






On 9/27/07, Dov Feldstern [EMAIL PROTECTED] wrote:

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.


Hi!

Yes, it is possible, there are actually a few different ways to do it.
However, your success may also depend on which scripts specifically you
are talking about.

The easiest way is perhaps to just switch the keyboard at the OS-level.
Depending on your OS / Desktop Environment, you can probably change the
keyboard's language, and then whatever you type will be in that script.

Another option is to use LyX's built-in keymaps. It sounds like you have
already discovered this option. In order to use it, you can use the
following keybindings: M-k 1 M-k 2 to choose the primary / secondary
keymap; M-k t to toggle between them. Two caveats, though: Firstly,
Keymaps currently support only two scripts simultaneously. Secondly, if
both scripts you want to use are non-RTL, you have to turn off the RTL
option (see the RELEASE-NOTES, or
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).

Personally, I prefer keymaps. I have pointed out some of the reasons why
in a previous post
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
there if those reasons make sense to you or not, and that may help you
decide which method is better for you.

Note, however, that regardless of which method you use, you should also
make sure that the language of the text (Edit - Text style -
Customized... - Language) is set correctly. Otherwise, chances are that
latex will choke on the non-latin characters. This is where using a LyX
keymap has an advantage: since you can change the keymap from within
LyX, you can create a keybinding which will both switch the keymap and
set the language using only a single keystroke. I don't know of any way
to do this if you use OS-level keyboard support.

If you provide a little more specific information (which scripts? what
OS are your working on? ...) we may be able to provide further assistance.

Dov






Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.



Hi!

Yes, it is possible, there are actually a few different ways to do it. 
However, your success may also depend on which scripts specifically you 
are talking about.


The easiest way is perhaps to just switch the keyboard at the OS-level. 
Depending on your OS / Desktop Environment, you can probably change the 
"keyboard's language", and then whatever you type will be in that script.


Another option is to use LyX's built-in keymaps. It sounds like you have 
already discovered this option. In order to use it, you can use the 
following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary 
keymap; "M-k t" to toggle between them. Two caveats, though: Firstly, 
Keymaps currently support only two scripts simultaneously. Secondly, if 
both scripts you want to use are non-RTL, you have to turn off the RTL 
option (see the RELEASE-NOTES, or 
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).


Personally, I prefer keymaps. I have pointed out some of the reasons why 
in a previous post 
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see 
there if those reasons make sense to you or not, and that may help you 
decide which method is better for you.


Note, however, that regardless of which method you use, you should also 
make sure that the language of the text (Edit -> Text style -> 
Customized... -> Language) is set correctly. Otherwise, chances are that 
latex will choke on the non-latin characters. This is where using a LyX 
keymap has an advantage: since you can change the keymap from within 
LyX, you can create a keybinding which will both switch the keymap and 
set the language using only a single keystroke. I don't know of any way 
to do this if you use OS-level keyboard support.


If you provide a little more specific information (which scripts? what 
OS are your working on? ...) we may be able to provide further assistance.


Dov


Re: Miximg scripts.

2007-09-27 Thread Ernesto Posse
Great, thanks. I wasn't setting  "Edit -> Text style ->Customized...
-> Language" properly. Is there a key binding for this option?

When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?

By the way, I found that in menus.bind, both options for "M-k o" and
"M-k x" are set to "keymap-off". If I change one of them to
'keymap-on', it seems to be ignored.

On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:
> Ernesto Posse wrote:
> > Is it possible to write a document in LyX (1.5.1) that mixes two (or
> > more) scripts? If so, how?
> >
> > I have been able to install and use an alternative keyboard map for a
> > non-latin script, but, even though one can specify two keyboard maps,
> > I have not been able to find anywhere in the documentation how to
> > select the second map.
> >
> > Thanks.
> >
>
> Hi!
>
> Yes, it is possible, there are actually a few different ways to do it.
> However, your success may also depend on which scripts specifically you
> are talking about.
>
> The easiest way is perhaps to just switch the keyboard at the OS-level.
> Depending on your OS / Desktop Environment, you can probably change the
> "keyboard's language", and then whatever you type will be in that script.
>
> Another option is to use LyX's built-in keymaps. It sounds like you have
> already discovered this option. In order to use it, you can use the
> following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary
> keymap; "M-k t" to toggle between them. Two caveats, though: Firstly,
> Keymaps currently support only two scripts simultaneously. Secondly, if
> both scripts you want to use are non-RTL, you have to turn off the RTL
> option (see the RELEASE-NOTES, or
> http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).
>
> Personally, I prefer keymaps. I have pointed out some of the reasons why
> in a previous post
> (http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
> there if those reasons make sense to you or not, and that may help you
> decide which method is better for you.
>
> Note, however, that regardless of which method you use, you should also
> make sure that the language of the text (Edit -> Text style ->
> Customized... -> Language) is set correctly. Otherwise, chances are that
> latex will choke on the non-latin characters. This is where using a LyX
> keymap has an advantage: since you can change the keymap from within
> LyX, you can create a keybinding which will both switch the keymap and
> set the language using only a single keystroke. I don't know of any way
> to do this if you use OS-level keyboard support.
>
> If you provide a little more specific information (which scripts? what
> OS are your working on? ...) we may be able to provide further assistance.
>
> 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


Re: Miximg scripts.

2007-09-27 Thread Dov Feldstern

Ernesto Posse wrote:

Great, thanks. I wasn't setting  "Edit -> Text style ->Customized...
-> Language" properly. Is there a key binding for this option?



There is an lfun called "language" which does exactly this, and which 
you can bind to any key you want. In Hebrew, we use F12 for the binding. 
I suggest adapting one of the files attached here, just use the language 
"farsi": http://permalink.gmane.org/gmane.editors.lyx.devel/88941 . Just 
place the file to your .lyx/bind directory (I'm not sure what the 
Windows equivalent is, the truth is you could probably place the file 
anywhere), and select it as your bind file (Tools -> Preferences... -> 
Look and feel -> User interface).


Note that since you're using an RTL language, then you shouldn't even 
have to use the bindings for explicitly setting the keymap (M-k 1, etc.) 
--- it should happen automatically when you switch the language.



When I am typing, it seems to work, but when I try to view it (for
example in DVI) I get latex errors such as:

LaTeX Error: Encoding scheme `LAE' unknown.
Command \alefhamza unavailable in encoding T1.
Package inputenc Error: Unicode char \u8:0' not set up for use with LaTeX.

I am trying to mix English and Farsi. I followed the instructions from
the Wiki (http://wiki.lyx.org/Windows/Farsi). I am running LyX 1.5.1
on Windows Vista, with MiKTeX 2.6.

What could be the problem?


I don't know the Farsi stuff, Mostafa is our Farsi expert. But some 
things I would check: are you sure that the "arabi" latex package is 
installed and set up correctly? What's bothering me is that the LAE 
encoding scheme seems to be unknown, I believe that's what should be 
used for Farsi.


Uwe, Mostafa --- any ideas?



By the way, I found that in menus.bind, both options for "M-k o" and
"M-k x" are set to "keymap-off". If I change one of them to
'keymap-on', it seems to be ignored.


I'm not even sure what the keymap-off and keymap-on lfuns are supposed 
to do... But as I said above, for an RTL language, you shouldn't need 
any of the keymap lfuns, switching the language should take care of this 
as long as you've setup the keymaps to be used.






On 9/27/07, Dov Feldstern <[EMAIL PROTECTED]> wrote:

Ernesto Posse wrote:

Is it possible to write a document in LyX (1.5.1) that mixes two (or
more) scripts? If so, how?

I have been able to install and use an alternative keyboard map for a
non-latin script, but, even though one can specify two keyboard maps,
I have not been able to find anywhere in the documentation how to
select the second map.

Thanks.


Hi!

Yes, it is possible, there are actually a few different ways to do it.
However, your success may also depend on which scripts specifically you
are talking about.

The easiest way is perhaps to just switch the keyboard at the OS-level.
Depending on your OS / Desktop Environment, you can probably change the
"keyboard's language", and then whatever you type will be in that script.

Another option is to use LyX's built-in keymaps. It sounds like you have
already discovered this option. In order to use it, you can use the
following keybindings: "M-k 1" "M-k 2" to choose the primary / secondary
keymap; "M-k t" to toggle between them. Two caveats, though: Firstly,
Keymaps currently support only two scripts simultaneously. Secondly, if
both scripts you want to use are non-RTL, you have to turn off the RTL
option (see the RELEASE-NOTES, or
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_5_X/RELEASE-NOTES#L31?rev=20486).

Personally, I prefer keymaps. I have pointed out some of the reasons why
in a previous post
(http://permalink.gmane.org/gmane.editors.lyx.devel/88939), you can see
there if those reasons make sense to you or not, and that may help you
decide which method is better for you.

Note, however, that regardless of which method you use, you should also
make sure that the language of the text (Edit -> Text style ->
Customized... -> Language) is set correctly. Otherwise, chances are that
latex will choke on the non-latin characters. This is where using a LyX
keymap has an advantage: since you can change the keymap from within
LyX, you can create a keybinding which will both switch the keymap and
set the language using only a single keystroke. I don't know of any way
to do this if you use OS-level keyboard support.

If you provide a little more specific information (which scripts? what
OS are your working on? ...) we may be able to provide further assistance.

Dov