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.
15 #include "latexrunparams.h"
29 Converter(string const & f, string const & t, string const & c,
46 /// The converter is latex or its derivatives
48 /// Do we need to run the converter in the original directory?
50 /// This converter needs the .aux files
52 /// If the converter put the result in a directory, then result_dir
53 /// is the name of the directory
55 /// If the converter put the result in a directory, then result_file
56 /// is the name of the main file in that directory
58 /// Command to convert the program output to a LaTeX log file format
67 typedef std::vector<int> EdgePath; // to be removed SOON
69 typedef std::vector<Converter> ConverterList;
71 typedef ConverterList::const_iterator const_iterator;
73 Converter const & get(int i) const {
74 return converterlist_[i];
77 Converter const * getConverter(string const & from, string const & to);
79 int getNumber(string const & from, string const & to);
81 void add(string const & from, string const & to,
82 string const & command, string const & flags);
84 void erase(string const & from, string const & to);
88 std::vector<Format const *> const
89 getReachableTo(string const & target, bool clear_visited);
91 std::vector<Format const *> const
92 getReachable(string const & from, bool only_viewable,
95 bool isReachable(string const & from, string const & to);
97 Graph::EdgePath const getPath(string const & from, string const & to);
99 bool usePdflatex(Graph::EdgePath const & path);
101 bool convert(Buffer const * buffer,
102 string const & from_file, string const & to_file_base,
103 string const & from_format, string const & to_format,
106 bool convert(Buffer const * buffer,
107 string const & from_file, string const & to_file_base,
108 string const & from_format, string const & to_format);
110 void update(Formats const & formats);
112 void updateLast(Formats const & formats);
114 bool formatIsUsed(string const & format);
116 const_iterator begin() const {
117 return converterlist_.begin();
119 const_iterator end() const {
120 return converterlist_.end();
126 std::vector<Format const *> const
127 Converters::intToFormat(std::vector<int> const & input);
129 bool scanLog(Buffer const & buffer, string const & command,
130 string const & filename);
132 bool runLaTeX(Buffer const & buffer, string const & command,
133 LatexRunParams const &);
135 ConverterList converterlist_;
137 string latex_command_;
139 bool move(string const & from, string const & to, bool copy);
144 extern Converters converters;
146 extern Converters system_converters;