from_utf8(child_tf),
from_utf8(master_tf));
Alert::warning(_("Different use-non-TeX-fonts settings"), text, true);
+ }
+ else if (tmp->params().inputenc != masterBuffer->params().inputenc) {
+ docstring text = bformat(_("Included file `%1$s'\n"
+ "uses input encoding \"%2$s\" [%3$s]\n"
+ "while parent file uses input encoding \"%4$s\" [%5$s]."),
+ included_file.displayName(),
+ _(tmp->params().inputenc),
+ from_utf8(tmp->params().encoding().guiName()),
+ _(masterBuffer->params().inputenc),
+ from_utf8(masterBuffer->params().encoding().guiName()));
+ Alert::warning(_("Different LaTeX input encodings"), text, true);
}
// Make sure modules used in child are all included in master
return subst(str, from_ascii("%%"), from_ascii("%"));
}
+docstring bformat(docstring const & fmt, docstring const & arg1,
+ docstring const & arg2, docstring const & arg3,
+ docstring const & arg4, docstring const & arg5)
+{
+ LATTEST(contains(fmt, from_ascii("%1$s")));
+ LATTEST(contains(fmt, from_ascii("%2$s")));
+ LATTEST(contains(fmt, from_ascii("%3$s")));
+ LATTEST(contains(fmt, from_ascii("%4$s")));
+ LATTEST(contains(fmt, from_ascii("%5$s")));
+ docstring str = subst(fmt, from_ascii("%1$s"), arg1);
+ str = subst(str, from_ascii("%2$s"), arg2);
+ str = subst(str, from_ascii("%3$s"), arg3);
+ str = subst(str, from_ascii("%4$s"), arg4);
+ str = subst(str, from_ascii("%5$s"), arg5);
+ return subst(str, from_ascii("%%"), from_ascii("%"));
+}
+
} // namespace support
} // namespace lyx
docstring bformat(docstring const & fmt, int arg1, int arg2);
docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2, docstring const & arg3);
docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2, docstring const & arg3, docstring const & arg4);
+docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2, docstring const & arg3, docstring const & arg4, docstring const & arg5);
} // namespace support