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
|
|
|
|
2003-09-05 17:23:11 +00:00
|
|
|
#include "support/std_string.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
class LyXLex;
|
|
|
|
class TeXErrors;
|
|
|
|
|
|
|
|
///
|
|
|
|
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.
|
|
|
|
*/
|
1999-10-02 16:21:10 +00:00
|
|
|
Chktex(string const & cmd, string const & file,
|
|
|
|
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 &);
|
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string cmd;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string file;
|
2002-03-21 17:27:08 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string path;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|