}
-void LaTeXFeatures::addPreambleSnippet(string const & preamble)
+void LaTeXFeatures::addPreambleSnippet(string const & preamble,
+ bool allowdupes)
{
SnippetList::const_iterator begin = preamble_snippets_.begin();
SnippetList::const_iterator end = preamble_snippets_.end();
- if (find(begin, end, preamble) == end)
+ if (allowdupes || find(begin, end, preamble) == end)
preamble_snippets_.push_back(preamble);
}
/// Print requirements to lyxerr
void showStruct() const;
///
- void addPreambleSnippet(std::string const &);
+ void addPreambleSnippet(std::string const & snippet,
+ bool allowdupes = false);
///
std::string getPreambleSnippets() const;
///
}
}
string const snippet = to_utf8(ods.str());
- features.addPreambleSnippet(snippet);
+ features.addPreambleSnippet(snippet, true);
}
}
* DOCUMENT INPUT/OUTPUT
+- InPreamble styles should be written to the premable as many times as the
+ user requests them, even if it results in duplicate commands.
* LYX2LYX