#include "LyXRC.h"
#include "output_latex.h"
#include "OutputParams.h"
+#include "texstream.h"
#include "support/lassert.h"
#include "support/convert.h"
tmp += "{";
os << from_ascii(tmp);
count += tmp.length();
+ pushPolyglossiaLang(language()->polyglossia(), true);
} else if (language()->encoding()->package() != Encoding::CJK) {
os << '{';
count += 1;
}
}
- // FIXME: skip this for XeTeX/LuaTeX? With nonTeXfonts or always?
if (language()->encoding()->package() == Encoding::CJK) {
pair<bool, int> const c = switchEncoding(os, bparams,
runparams, *(language()->encoding()));
// the numbers are written Left-to-Right. ArabTeX package
// reorders the number automatically but the packages used
// for Hebrew and Farsi (Arabi) do not.
- if (bits_.number() == FONT_ON && prev.fontInfo().number() != FONT_ON
- && (language()->lang() == "hebrew"
- || language()->lang() == "farsi"
- || language()->lang() == "arabic_arabi")) {
+ if (!runparams.pass_thru && bits_.number() == FONT_ON
+ && prev.fontInfo().number() != FONT_ON
+ && (language()->lang() == "hebrew"
+ || language()->lang() == "farsi"
+ || language()->lang() == "arabic_arabi")) {
os << "{\\beginL ";
count += 9;
}
// the numbers are written Left-to-Right. ArabTeX package
// reorders the number automatically but the packages used
// for Hebrew and Farsi (Arabi) do not.
- if (bits_.number() == FONT_ON && next.fontInfo().number() != FONT_ON
- && (language()->lang() == "hebrew"
- || language()->lang() == "farsi"
- || language()->lang() == "arabic_arabi")) {
+ if (!runparams.pass_thru && bits_.number() == FONT_ON
+ && next.fontInfo().number() != FONT_ON
+ && (language()->lang() == "hebrew"
+ || language()->lang() == "farsi"
+ || language()->lang() == "arabic_arabi")) {
os << "\\endL}";
count += 6;
}
&& language()->encoding()->package() != Encoding::CJK) {
os << '}';
++count;
+ if (runparams.use_polyglossia)
+ popPolyglossiaLang();
}
return count;