+ list<docstring>::const_iterator cit = usedLayouts_.begin();
+ list<docstring>::const_iterator end = usedLayouts_.end();
+ for (; cit != end; ++cit)
+ tcpreamble << tclass[*cit].preamble();
+
+ cit = usedInsetLayouts_.begin();
+ end = usedInsetLayouts_.end();
+ TextClass::InsetLayouts const & ils = tclass.insetLayouts();
+ for (; cit != end; ++cit) {
+ TextClass::InsetLayouts::const_iterator it = ils.find(*cit);
+ if (it == ils.end())
+ continue;
+ tcpreamble << it->second.preamble();
+ }
+
+ return tcpreamble.str();
+}
+
+
+docstring const LaTeXFeatures::getTClassHTMLPreamble() const
+{
+ DocumentClass const & tclass = params_.documentClass();
+ odocstringstream tcpreamble;
+
+ tcpreamble << tclass.htmlpreamble();
+
+ list<docstring>::const_iterator cit = usedLayouts_.begin();
+ list<docstring>::const_iterator end = usedLayouts_.end();
+ for (; cit != end; ++cit)
+ tcpreamble << tclass[*cit].htmlpreamble();
+
+ cit = usedInsetLayouts_.begin();
+ end = usedInsetLayouts_.end();
+ TextClass::InsetLayouts const & ils = tclass.insetLayouts();
+ for (; cit != end; ++cit) {
+ TextClass::InsetLayouts::const_iterator it = ils.find(*cit);
+ if (it == ils.end())
+ continue;
+ tcpreamble << it->second.htmlpreamble();
+ }
+
+ return tcpreamble.str();
+}
+
+
+docstring const LaTeXFeatures::getTClassHTMLStyles() const {
+ DocumentClass const & tclass = params_.documentClass();
+ odocstringstream tcpreamble;
+
+ list<docstring>::const_iterator cit = usedLayouts_.begin();
+ list<docstring>::const_iterator end = usedLayouts_.end();
+ for (; cit != end; ++cit)
+ tcpreamble << tclass[*cit].htmlstyle();
+
+ cit = usedInsetLayouts_.begin();
+ end = usedInsetLayouts_.end();
+ TextClass::InsetLayouts const & ils = tclass.insetLayouts();
+ for (; cit != end; ++cit) {
+ TextClass::InsetLayouts::const_iterator it = ils.find(*cit);
+ if (it == ils.end())
+ continue;
+ tcpreamble << it->second.htmlstyle();
+ }
+
+ return tcpreamble.str();
+}
+
+
+namespace {
+docstring const getFloatI18nPreamble(docstring const & type, docstring const & name, docstring const & lang)
+{
+ odocstringstream os;
+ os << "\\addto\\captions" << lang
+ << "{\\renewcommand{\\" << type << "name}{" << name << "}}\n";
+ return os.str();
+}
+}
+
+
+docstring const LaTeXFeatures::getTClassI18nPreamble(bool use_babel) const
+{
+ DocumentClass const & tclass = params_.documentClass();
+ // collect preamble snippets in a set to prevent multiple identical
+ // commands (would happen if e.g. both theorem and theorem* are used)
+ set<docstring> snippets;
+ typedef LanguageList::const_iterator lang_it;
+ lang_it const lbeg = UsedLanguages_.begin();
+ lang_it const lend = UsedLanguages_.end();