+ if (lyxrc.language_command_end.empty())
+ os << from_ascii(subst(
+ lyxrc.language_command_begin,
+ "$$lang",
+ doc_language->babel()));
+ else
+ os << from_ascii(subst(
+ lyxrc.language_command_end,
+ "$$lang",
+ language->babel()));
+ pending_newline = true;
+ }
+
+ // FIXME we switch from the encoding of this paragraph to the
+ // outer encoding, since I could not figure out the correct logic
+ // to take the encoding of the next paragraph into account.
+ // This may result in some unneeded encoding changes.
+ basefont = pit->getLayoutFont(bparams, outerfont);
+ switchEncoding(os, bparams, *(basefont.language()->encoding()),
+ outer_encoding);
+ if (pending_newline) {
+ os << '\n';
+ texrow.newline();
+ }
+
+ // we don't need it for the last paragraph!!!
+ // Note from JMarc: we will re-add a \n explicitely in
+ // TeXEnvironment, because it is needed in this case
+ if (boost::next(pit) != paragraphs.end()) {
+ os << '\n';
+ texrow.newline();