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 /** All the different files produced by TeX.
68 This is the files mentioned on page 208-9 in Lamports book +
74 /// used for table of contents et.al.
80 /// glossary (not supported by LyX so far)
84 /// written by makeindex
88 /// the LaTeX log file
98 /// list of algorithms
102 /** Return values from scanLogFile() and run() (to come)
104 This enum should be enlarged a bit so that one could
105 get more feedback from the LaTeX run.
115 UNDEF_REF = 4, // Reference '...' on page ... undefined.
117 UNDEF_CIT = 8, // Citation '...' on page ... undefined.
119 RERUN = 16, // Label(s) may have changed. Rerun to get...
129 PACKAGE_WARNING = 512,
135 TOO_MANY_ERRORS = 4096,
137 ERRORS = TEX_ERROR + LATEX_ERROR,
139 WARNINGS = TEX_WARNING + LATEX_WARNING + PACKAGE_WARNING
144 cmd = the latex command, file = name of the (temporary) latex file,
145 path = name of the files original path.
147 LaTeX(string const & cmd, string const & file, string const & path);
149 /// runs LaTeX several times
150 int run(TeXErrors &, MiniBuffer *);
153 int getNumErrors() { return num_errors;}
155 /// use this for running LaTeX once
158 /// The dependency file.
162 LaTeX(LaTeX const &);
164 LaTeX & operator= (LaTeX const &);
167 void deplog(DepTable & head);
170 void deptex(DepTable & head);
173 int scanLogFile(TeXErrors &);
176 bool runMakeIndex(string const &);
179 bool scanAux(DepTable &);
182 bool runBibTeX(string const &, DepTable &);
185 void deleteFilesOnError() const;
201 // used by scanLogFile