1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
2003-08-23 00:17:00 +00:00
|
|
|
/**
|
|
|
|
* \file Chktex.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* \author Asger Alstrup
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
1999-09-27 18:44:28 +00:00
|
|
|
*/
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#ifndef CHKTEX_H
|
|
|
|
#define CHKTEX_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
2007-04-26 11:30:54 +00:00
|
|
|
class Lexer;
|
1999-09-27 18:44:28 +00:00
|
|
|
class TeXErrors;
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
class Chktex {
|
|
|
|
public:
|
|
|
|
/**
|
2000-08-07 20:58:24 +00:00
|
|
|
@param cmd the chktex command.
|
|
|
|
@param file name of the (temporary) latex file.
|
|
|
|
@param path name of the files original path.
|
|
|
|
*/
|
2003-10-06 15:43:21 +00:00
|
|
|
Chktex(std::string const & cmd, std::string const & file,
|
|
|
|
std::string const & path);
|
2002-03-21 17:27:08 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
/** Runs chktex.
|
2000-08-07 20:58:24 +00:00
|
|
|
@return -1 if fail, number of messages otherwise.
|
1999-09-27 18:44:28 +00:00
|
|
|
*/
|
|
|
|
int run(TeXErrors &);
|
|
|
|
private:
|
|
|
|
///
|
|
|
|
int scanLogFile(TeXErrors &);
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string cmd;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string file;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string path;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#endif
|