示例#1
0
文件: kilehelp.cpp 项目: fagu/kileip
	void Help::initContextHelp()
	{
		// read a list with keywords for context help
		if ( m_contextHelpType == HelpKileRefs ) {
			readHelpList("latex-kile.lst");
		}
		else if ( m_contextHelpType == HelpLatex2eRefs ) {
			readHelpList("latex2e-texlive.lst");
		}
		else if ( m_contextHelpType == HelpTexRefs ) {
			QString keyfile = ( m_texVersion != TETEX3 ) ? "latex-texlive-3.9.lst" : "latex-tetex3.lst";
			readHelpList(keyfile);
		}
	}
示例#2
0
void Help::initTexDocumentation()
{
    // use documentation for teTeX v2.x, v3.x or TexLive2005
    m_texdocPath = KileConfig::location();

    // first check for TexLive2005
    QString texref = m_texdocPath + "/english/tex-refs";
    QDir dir(texref);
    if ( dir.exists() )
    {
        // we found TexLive2005
        m_texVersion = TEXLIVE2005;
        m_texReference = "/english/tex-refs/";
        readHelpList("latex-texlive-3.9.lst",m_dictHelpTex);
    }
    else
    {
        // now we check for tetex3
        dir.setPath(m_texdocPath + "/latex/tex-refs");
        if ( dir.exists() )
        {
            m_texVersion = TETEX3;
            // check if this is buggy tetex3.0 or an updated version with subdirectory 'html'
            dir.setPath(m_texdocPath + "/latex/tex-refs/html");
            m_texReference = ( dir.exists() )
                             ? "/latex/tex-refs/html/" : "/latex/tex-refs/";
            readHelpList("latex-tetex3.lst",m_dictHelpTex);
        }
        else
        {
            // we set it to tetex2 (what else should it be?)
            m_texVersion = TETEX2;
            m_texReference = "/latex/latex2e-html/";
            readHelpList("latex-tetex.lst",m_dictHelpTex);
        }
    }
}
示例#3
0
Help::Help(KileDocument::EditorExtension *edit) : m_edit(edit), m_userhelp(0L)
{
    readHelpList("latex-kile.lst",m_dictHelpKile);
    initTexDocumentation();
}