+ // output change tracking marks only if desired,
+ // if dvipost is installed,
+ // and with dvi/ps (other formats don't work)
+ LaTeXFeatures features(buf, bparams, runparams);
+ bool const output = bparams.output_changes
+ && runparams.flavor == OutputParams::LATEX
+ && features.isAvailable("dvipost");
+
+ if (inset->canTrackChanges()) {
+ column += Changes::latexMarkChange(os, running_change,
+ Change::UNCHANGED, output);
+ running_change = Change::UNCHANGED;
+ }
+
+ bool close = false;
+ ostream::pos_type const len = os.tellp();
+
+ if ((inset->lyxCode() == InsetBase::GRAPHICS_CODE
+ || inset->lyxCode() == InsetBase::MATH_CODE
+ || inset->lyxCode() == InsetBase::URL_CODE)
+ && running_font.isRightToLeft()) {
+ os << "\\L{";
+ close = true;
+ }
+
+#ifdef WITH_WARNINGS
+#warning Bug: we can have an empty font change here!
+// if there has just been a font change, we are going to close it
+// right now, which means stupid latex code like \textsf{}. AFAIK,
+// this does not harm dvi output. A minor bug, thus (JMarc)
+#endif
+ // some insets cannot be inside a font change command
+ if (open_font && inset->noFontChange()) {
+ column +=running_font.
+ latexWriteEndChanges(os,
+ basefont,
+ basefont);