if (packages.empty()) {
// adding a package here implies a file format change!
packages.push_back("amsmath");
+ packages.push_back("amssymb");
packages.push_back("esint");
packages.push_back("mathdots");
packages.push_back("mathtools");
os << "\\begin_removed_modules" << '\n';
list<string>::const_iterator it = removed_modules_.begin();
list<string>::const_iterator en = removed_modules_.end();
- for (; it != en; it++)
+ for (; it != en; ++it)
os << *it << '\n';
os << "\\end_removed_modules" << '\n';
}
os << "\\begin_modules" << '\n';
LayoutModuleList::const_iterator it = layout_modules_.begin();
LayoutModuleList::const_iterator en = layout_modules_.end();
- for (; it != en; it++)
+ for (; it != en; ++it)
os << *it << '\n';
os << "\\end_modules" << '\n';
}
os << "\\begin_includeonly" << '\n';
list<string>::const_iterator it = included_children_.begin();
list<string>::const_iterator en = included_children_.end();
- for (; it != en; it++)
+ for (; it != en; ++it)
os << *it << '\n';
os << "\\end_includeonly" << '\n';
}
// hyperref loads this automatically
lyxpreamble += "\\usepackage{nameref}\n";
+ // bibtopic needs to be loaded after hyperref.
+ // the dot provides the aux file naming which LyX can detect.
+ if (features.mustProvide("bibtopic"))
+ lyxpreamble += "\\usepackage[dot]{bibtopic}\n";
+
// Will be surrounded by \makeatletter and \makeatother when not empty
docstring atlyxpreamble;
DocumentClass const & BufferParams::documentClass() const
{
- return *doc_class_;
+ return *doc_class_.get();
}
-DocumentClass const * BufferParams::documentClassPtr() const
+DocumentClassConstPtr BufferParams::documentClassPtr() const
{
return doc_class_;
}
-void BufferParams::setDocumentClass(DocumentClass const * const tc)
+void BufferParams::setDocumentClass(DocumentClassConstPtr tc)
{
// evil, but this function is evil
- doc_class_ = const_cast<DocumentClass *>(tc);
+ doc_class_ = const_pointer_cast<DocumentClass>(tc);
}
it = layout_modules_.begin();
en = layout_modules_.end();
- for (; it != en; it++)
+ for (; it != en; ++it)
mods.push_back(*it);
it = cite_engine_.begin();
en = cite_engine_.end();
- for (; it != en; it++)
+ for (; it != en; ++it)
mods.push_back(*it);
- doc_class_ = &(DocumentClassBundle::get().makeDocumentClass(*baseClass(), mods));
+ doc_class_ = getDocumentClass(*baseClass(), mods);
if (!local_layout.empty()) {
TextClass::ReturnValues success =
{
LayoutModuleList::const_iterator it = layout_modules_.begin();
LayoutModuleList::const_iterator end = layout_modules_.end();
- for (; it != end; it++)
+ for (; it != end; ++it)
if (*it == modName)
return false;
layout_modules_.push_back(modName);
vector<string> BufferParams::backends() const
{
vector<string> v;
- v.push_back(bufferFormat());
+ string const buffmt = bufferFormat();
+
// FIXME: Don't hardcode format names here, but use a flag
- if (v.back() == "latex") {
- v.push_back("pdflatex");
+ if (buffmt == "latex") {
+ if (!useNonTeXFonts) {
+ v.push_back("pdflatex");
+ v.push_back("latex");
+ }
v.push_back("luatex");
v.push_back("dviluatex");
v.push_back("xetex");
- } else if (v.back() == "xetex") {
+ } else if (buffmt == "xetex") {
+ v.push_back("xetex");
v.push_back("luatex");
v.push_back("dviluatex");
- }
+ } else
+ v.push_back(buffmt);
+
v.push_back("xhtml");
v.push_back("text");
v.push_back("lyx");
if (dformat == "xhtml")
result = OutputParams::HTML;
+ else if (dformat == "text")
+ result = OutputParams::TEXT;
+ else if (dformat == "lyx")
+ result = OutputParams::LYX;
else {
// Try to determine flavor of default output format
vector<string> backs = backends();
// start of the read.
list<string>::const_iterator rit = removed_modules_.begin();
list<string>::const_iterator const ren = removed_modules_.end();
- for (; rit != ren; rit++) {
+ for (; rit != ren; ++rit) {
LayoutModuleList::iterator const mit = layout_modules_.begin();
LayoutModuleList::iterator const men = layout_modules_.end();
LayoutModuleList::iterator found = find(mit, men, *rit);