Dov Feldstern schrieb:
one-time setup for ArabTeX) were not taking effect. It looks like the
language switch commands are currently used only if babel is activated.
I cannot reproduce this - works fine here or I do need a better recipe
to reproduce.
Try the attached file.
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. This is bug 2928 that I originally tried to fix when I
started the discussions about Arabic, see also my last request in the bug report to add this
preamble command automatically. Attached is a patch that does this, OK?
> With the current situation (latest svn) I get the
> output in arabtex2-bad.dvi. Adding arabtex (or anything, it doesn't
> matter what, it could say 'dummy') to lib/languages as in my patch fixes
> it, and I get the output as portrayed in arabtex2-good.lyx.
Not for me: when I use e.g. the word "arabtex" as dummy language for babel I get LaTeX-errors,
because then your file reads in LaTeX:
\selectlanguage{english}
\inputencoding{latin9}English and \inputencoding{cp1256}\R{عربي}
\selectlanguage{arabtex}
عربي وال-\inputencoding{latin9}\L{English}
\selectlanguage calls babel and therefore needs a valid language name. When you use "arabic" you
always get arabi and not arabtex.
With current SVN where no babel ame is given, the file reads:
\selectlanguage{english}
\inputencoding{latin9}English and \inputencoding{cp1256}\R{عربي
عربي وال-\inputencoding{latin9}\L{English}
Then you get LaTeX errors because the characters are unknown in the encoding. To fix this
\inputencoding must be replace by \setcode as described in the arabtex manual or omitted. So this
one compiles:
\selectlanguage{english}
\inputencoding{latin9}English and \setcode{cp1256}\R{عربي
عربي وال-\inputencoding{latin9}\L{English}
But the output is as ugly as in your dvi-file. What was the LaTeX-code when you
get the nice output?
I'm not able to get this at the moment.
regards Uwe
Index: BufferParams.cpp
===================================================================
--- BufferParams.cpp (revision 18917)
+++ BufferParams.cpp (working copy)
@@ -1429,6 +1429,12 @@
os << "\\usepackage{armtex}\n";
texrow.newline();
}
+
+ // Load the arabtex package when the document language is "arabic_aratex"
+ if (language->lang() == "arabic_arabtex") {
+ os << "\\usepackage{arabtex}\n";
+ texrow.newline();
+ }
}