} else if (token == "\\defskip") {
lex.nextToken();
params.defskip = VSpace(lex.GetString());
+#if 0
} else if (token == "\\no_isolatin1") { // obsolete
lex.nextToken();
} else if (token == "\\no_babel") { // obsolete
lex.nextToken();
} else if (token == "\\no_epsfig") { // obsolete
lex.nextToken();
+#endif
} else if (token == "\\epsfig") { // obsolete
// Indeed it is obsolete, but we HAVE to be backwards
// compatible until 0.14, because otherwise all figures
else if (lyxrc->rtl_support)
options += "hebrew,";
options += params.language + ',';
- } else if (lyxrc->rtl_support)
- options += "hebrew,english,";
+ }
// the user-defined options
if (!params.options.empty()) {
// We try to load babel late, in case it interferes
// with other packages.
- if (params.language != "default" || lyxrc->rtl_support ) {
- ofs << "\\usepackage{babel}\n";
+ if (params.language != "default") {
+ ofs << lyxrc->language_package;
texrow.newline();
}
texrow.newline();
} // only_body
lyxerr.debug() << "preamble finished, now the body." << endl;
+ if (lyxrc->language_command_begin &&
+ params.getDocumentDirection() == LYX_DIR_RIGHT_TO_LEFT)
+ ofs << lyxrc->language_command_rtl;
bool was_title = false;
bool already_title = false;
texrow.newline();
}
+ if (lyxrc->language_command_end &&
+ params.getDocumentDirection() == LYX_DIR_RIGHT_TO_LEFT)
+ ofs << lyxrc->language_command_ltr;
+
if (!only_body) {
ofs << "\\end{document}\n";
texrow.newline();
font1 = font2;
}
+ if (lyxrc->language_command_end &&
+ params.getDocumentDirection() == LYX_DIR_RIGHT_TO_LEFT)
+ os << lyxrc->language_command_ltr;
+
/* needed if there is an optional argument but no contents */
if (main_body > 0 && main_body == par->size()) {
font1 = style.font;