8 * This file is part of LyX, the document processor.
9 * Licence details can be found in the file COPYING.
13 * Full author contact details are available in file CREDITS
16 #include "latexrunparams.h"
30 Converter(string const & f, string const & t, string const & c,
47 /// The converter is latex or its derivatives
49 /// Do we need to run the converter in the original directory?
51 /// This converter needs the .aux files
53 /// If the converter put the result in a directory, then result_dir
54 /// is the name of the directory
56 /// If the converter put the result in a directory, then result_file
57 /// is the name of the main file in that directory
59 /// Command to convert the program output to a LaTeX log file format
68 typedef std::vector<int> EdgePath; // to be removed SOON
70 typedef std::vector<Converter> ConverterList;
72 typedef ConverterList::const_iterator const_iterator;
74 Converter const & get(int i) const {
75 return converterlist_[i];
78 Converter const * getConverter(string const & from, string const & to);
80 int getNumber(string const & from, string const & to);
82 void add(string const & from, string const & to,
83 string const & command, string const & flags);
85 void erase(string const & from, string const & to);
89 std::vector<Format const *> const
90 getReachableTo(string const & target, bool clear_visited);
92 std::vector<Format const *> const
93 getReachable(string const & from, bool only_viewable,
96 bool isReachable(string const & from, string const & to);
98 Graph::EdgePath const getPath(string const & from, string const & to);
100 bool usePdflatex(Graph::EdgePath const & path);
102 bool convert(Buffer const * buffer,
103 string const & from_file, string const & to_file_base,
104 string const & from_format, string const & to_format,
107 bool convert(Buffer const * buffer,
108 string const & from_file, string const & to_file_base,
109 string const & from_format, string const & to_format);
111 string const dvips_options(Buffer const * buffer);
113 string const dvipdfm_options(Buffer const * buffer);
115 void update(Formats const & formats);
117 void updateLast(Formats const & formats);
119 bool formatIsUsed(string const & format);
121 const_iterator begin() const {
122 return converterlist_.begin();
124 const_iterator end() const {
125 return converterlist_.end();
131 std::vector<Format const *> const
132 Converters::intToFormat(std::vector<int> const & input);
134 bool scanLog(Buffer const * buffer, string const & command,
135 string const & filename);
137 bool runLaTeX(Buffer const * buffer, string const & command,
138 LatexRunParams const &);
140 ConverterList converterlist_;
142 string latex_command_;
144 bool move(string const & from, string const & to, bool copy);
149 extern Converters converters;
151 extern Converters system_converters;