// used anyway.
OutputParams runparams(buffer ? &buffer->params().encoding() : 0);
runparams.flavor = getFlavor(edgepath);
-
- if (buffer)
+
+ if (buffer) {
runparams.use_japanese = buffer->bufferFormat() == "platex";
+ runparams.use_indices = buffer->params().use_indices;
+ runparams.bibtex_command = (buffer->params().bibtex_command == "default") ?
+ string() : buffer->params().bibtex_command;
+ runparams.index_command = (buffer->params().index_command == "default") ?
+ string() : buffer->params().index_command;
+ }
// Some converters (e.g. lilypond) can only output files to the
// current directory, so we need to change the current directory.
void Converters::buildGraph()
{
+ // clear graph's data structures
G_.init(formats.size());
ConverterList::iterator beg = converterlist_.begin();
ConverterList::iterator const end = converterlist_.end();
+ // each of the converters knows how to convert one format to another
+ // so, for each of them, we create an arrow on the graph, going from
+ // the one to the other
for (ConverterList::iterator it = beg; it != end ; ++it) {
- int const s = formats.getNumber(it->from);
- int const t = formats.getNumber(it->to);
- G_.addEdge(s,t);
+ int const from = formats.getNumber(it->from);
+ int const to = formats.getNumber(it->to);
+ G_.addEdge(from, to);
}
}
}
+vector<Format const *> Converters::exportableFormats(bool only_viewable)
+{
+ vector<string> s = savers();
+ vector<Format const *> result = getReachable(s[0], only_viewable, true);
+ for (vector<string>::const_iterator it = s.begin() + 1;
+ it != s.end(); ++it) {
+ vector<Format const *> r =
+ getReachable(*it, only_viewable, false);
+ result.insert(result.end(), r.begin(), r.end());
+ }
+ return result;
+}
+
+
vector<string> Converters::loaders() const
{
vector<string> v;
}
+vector<string> Converters::savers() const
+{
+ vector<string> v;
+ v.push_back("docbook");
+ v.push_back("latex");
+ v.push_back("literate");
+ v.push_back("lyx");
+ v.push_back("xhtml");
+ v.push_back("pdflatex");
+ v.push_back("platex");
+ v.push_back("text");
+ v.push_back("xetex");
+ return v;
+}
+
+
} // namespace lyx