Пример #1
0
LRESULT CALLBACK myWindowProc(
  HWND hwnd, 
  UINT uMsg, 
  WPARAM wParam, 
  LPARAM lParam
  ){
	  if( !myProc( uMsg,wParam,lParam ) )
		return pwowProc(hwnd,uMsg,wParam,lParam);
	  else
	    return DefWindowProc(hwnd,uMsg,wParam,lParam);
}
Пример #2
0
LatexStyleParser::LatexStyleParser(QObject *parent,QString baseDirName,QString kpsecmd) :
    SafeThread(parent)
{
    baseDir=baseDirName;
    stopped=false;
    kpseWhichCmd=kpsecmd;
    mFiles.clear();
    //check if texdef is present
#ifndef Q_WS_WIN
    texdefDir=kpsecmd.left(kpsecmd.length()-9);
    QProcess myProc(0);
    myProc.start(texdefDir+"texdef");
    myProc.waitForFinished();
    texdefMode=(myProc.exitCode()==1);
#else
    texdefMode=false;
    //miktex always has a texdef.exe present even if texdef is not installed or no working perl is present. Furthermore the call from txs does not seem to work properly with miktex
#endif
}
Пример #3
0
LatexStyleParser::LatexStyleParser(QObject *parent,QString baseDirName,QString kpsecmd) :
    SafeThread(parent)
{
    baseDir=baseDirName;
    stopped=false;
    kpseWhichCmd=kpsecmd;
    mFiles.clear();
    //check if pdflatex is present
    texdefDir=kpsecmd.left(kpsecmd.length()-9);
    QProcess myProc(0);
    //myProc.start(texdefDir+"texdef");
    myProc.start(texdefDir+"pdflatex --version");
    myProc.waitForFinished();
    texdefMode=(myProc.exitCode()==0);
    if(texdefMode){
	QString output=myProc.readAllStandardOutput();
	output=output.split("\n").first().trimmed();
	if(output.contains("MiKTeX")){
	    kpseWhichCmd.chop(9);
	    kpseWhichCmd.append("findtexmf");
	}
    }
}