4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
31 Converter(std::string const & f, std::string const & t, std::string const & c,
32 std::string const & l);
48 /// The converter is latex or its derivatives
50 /// Do we need to run the converter in the original directory?
52 /// This converter needs the .aux files
54 /// If the converter put the result in a directory, then result_dir
55 /// is the name of the directory
56 std::string result_dir;
57 /// If the converter put the result in a directory, then result_file
58 /// is the name of the main file in that directory
59 std::string result_file;
60 /// Command to convert the program output to a LaTeX log file format
69 typedef std::vector<int> EdgePath; // to be removed SOON
71 typedef std::vector<Converter> ConverterList;
73 typedef ConverterList::const_iterator const_iterator;
75 Converter const & get(int i) const {
76 return converterlist_[i];
79 Converter const * getConverter(std::string const & from, std::string const & to);
81 int getNumber(std::string const & from, std::string const & to);
83 void add(std::string const & from, std::string const & to,
84 std::string const & command, std::string const & flags);
86 void erase(std::string const & from, std::string const & to);
90 std::vector<Format const *> const
91 getReachableTo(std::string const & target, bool clear_visited);
93 std::vector<Format const *> const
94 getReachable(std::string const & from, bool only_viewable,
97 bool isReachable(std::string const & from, std::string const & to);
99 Graph::EdgePath const getPath(std::string const & from, std::string const & to);
101 bool usePdflatex(Graph::EdgePath const & path);
103 bool convert(Buffer const * buffer,
104 std::string const & from_file, std::string const & to_file_base,
105 std::string const & from_format, std::string const & to_format,
106 std::string & to_file);
108 bool convert(Buffer const * buffer,
109 std::string const & from_file, std::string const & to_file_base,
110 std::string const & from_format, std::string const & to_format);
112 void update(Formats const & formats);
114 void updateLast(Formats const & formats);
116 bool formatIsUsed(std::string const & format);
118 const_iterator begin() const {
119 return converterlist_.begin();
121 const_iterator end() const {
122 return converterlist_.end();
128 std::vector<Format const *> const
129 Converters::intToFormat(std::vector<int> const & input);
131 bool scanLog(Buffer const & buffer, std::string const & command,
132 std::string const & filename);
134 bool runLaTeX(Buffer const & buffer, std::string const & command,
135 LatexRunParams const &);
137 ConverterList converterlist_;
139 std::string latex_command_;
141 bool move(std::string const & from, std::string const & to, bool copy);
146 extern Converters converters;
148 extern Converters system_converters;