Uwe Stöhr wrote:
First, sorry for the delay. This mail never reached me, I found it by chance in the mail-archive.

> All of the problems you're describing are because you haven't performed the one-time setup > required for Arabtex, see http://permalink.gmane.org/gmane.editors.lyx.devel/88100 for details. > Note that most or all of the things I'm saying that you should add to the preferences file could
 > also be added from within the preferences in the GUI.

>> First, I cannot process your file because the command \R is not known. It therefore only works
 >> when I add \usepackage{arabtex} to the preamble.
 >
 > add the following line to your preferences file:
 > \language_package "\usepackage{arabtex,cp1256} \setcode{cp1256}"

OK, yes this works. I tried this once as it is described in the arabTeX-doku. But I always got errors about the unknown package "cp1256". Works now, I don't knwo why it didn't the last time.

> The patch is not working for me. I think it's because the document language is not (and shouldn't > be) arabtex --- it should be English, as in the example file I provided; in which case the patch
 > won't kick in.

But you above said I should add

\usepackage{arabtex,cp1256} \setcode{cp1256}

to the preamble, so why does it not work. The resulting TeX-file is exactly the same because the preferences entry does nothing different. But now I see that it only works when the document language is English, so my patch therefore fails. So why do we have the language "arabic (ArabTeX)" in LyX's menu when it can never be used?

If you know of a way to not include it in the list, but still have the language present for all other intents and purposes, then yes, IMO it should be removed from the display.


> Secondly, I agree with JMarc about the hardcoding of language info --- I'm not sure that it really > belongs in the source code. I don't think it's so terrible to require a little setup from the
 > user, and if it is --- the installer could do this one-time setup.

I don't agree. We should take care of such fundamental settings. That's why we created the new language arabic_arabtex. Fiddling around wit preferences is not user friendly and will cause problems when the users wants to typeset other languages.

ArabTeX is non-standard (i.e., non-babel). Therefore, I don't think we need to go out of our way to make it work "out of the box". I felt strongly --- and still do --- that we should continue supporting it as much as we did up until now, and that's why I wanted the separation between ArabTeX and arabi --- so that we could move ahead with arabi without harming ArabTeX; but I think that level of support is sufficient, at least until we know where the users lean. (Remember, we still don't know if anyone is using any of the Arabic stuff at all!). So I feel that for now, what we have done for ArabTeX is enough. If there is demand for more, then we can see about how to do it correctly, even if it involves hard-coding.


> Right, that's why you need to add the following two lines to the preferences file, so that you
 > *don't* use babel's \selectlanguage:
 >
 > \language_command_begin "\begin{arabtext}"
 > \language_command_end "\end{arabtext}"

Fine. But with this setting I can no longer compile my English-German mix documents. So this setting makes LyX only usable for arabTeX and unusable for all other languages!

Again, because ArabTeX is non-standard, it doesn't play nicely with other languages. This is one very good reason for getting arabi into the picture. But again, what I was concerned with is keeping the level of support we had up until now for ArabTeX --- which means Arabic + one primary language. That we have. To go out of our way for more, when we don't know it's necessary/wanted, and when it does make the code messy, I think is too far for now.

The correct way of fixing this is like Georg did this for the CJK-package that also uses special commands to begin/end languages.

> Uwe, before trying to patch the code, please try to perform the setup I described for ArabTeX

I did this know and get now the same correct output as you. I won't send further patches concerning arabtex.

I also see now the problem of the missing dummy babel language in the languages file. The fix would be the same as for the CJK-package. But to make it work for now I committed this missing part of our last change. (Because letting the user change the languages file is not acceptable for a stable release.):
http://www.lyx.org/trac/changeset/18957

I agree, Thanks! As with everything else, I also agree that this is not a very good long-term solution, but I think that for our current purposes it is better to have this hack than to change the code.


regards Uwe


Reply via email to