2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich
7 * Copyright 1995-2000 The Lyx Team
9 * This file is Copyright 1996-1999
12 * ======================================================
34 Error () : error_in_line(0) {}
36 Error(int line, string const & desc, string const & text)
37 : error_in_line(line),
40 /// what line in the TeX file the error occured in
44 /// The line/cmd that caused the error.
49 typedef std::vector<Error> Errors;
51 Errors::const_iterator begin() const { return errors.begin(); }
53 Errors::const_iterator end() const { return errors.end(); }
55 void insertError(int line, string const & error_desc,
56 string const & error_text);
66 /** Return values from scanLogFile() and run() (to come)
68 This enum should be enlarged a bit so that one could
69 get more feedback from the LaTeX run.
79 UNDEF_REF = 4, // Reference '...' on page ... undefined.
81 UNDEF_CIT = 8, // Citation '...' on page ... undefined.
83 RERUN = 16, // Label(s) may have changed. Rerun to get...
93 PACKAGE_WARNING = 512,
99 TOO_MANY_ERRORS = 4096,
101 ERRORS = TEX_ERROR + LATEX_ERROR,
103 WARNINGS = TEX_WARNING + LATEX_WARNING + PACKAGE_WARNING
108 cmd = the latex command, file = name of the (temporary) latex file,
109 path = name of the files original path.
111 LaTeX(string const & cmd, string const & file, string const & path);
113 /// runs LaTeX several times
114 int run(TeXErrors &, MiniBuffer *);
117 int getNumErrors() { return num_errors;}
119 /// use this for running LaTeX once
122 /// The dependency file.
126 LaTeX(LaTeX const &);
128 LaTeX & operator= (LaTeX const &);
131 void deplog(DepTable & head);
134 int scanLogFile(TeXErrors &);
137 bool runMakeIndex(string const &);
140 bool scanAux(DepTable &);
143 bool runBibTeX(string const &, DepTable &);
146 void deleteFilesOnError() const;
157 /// used by scanLogFile