void Help::helpTexGuide() { QString filename = m_texdocPath; switch(m_texVersion) { case TEXLIVE_201x_TUG: filename = filename.replace("texmf-dist","texmf"); filename += "/texlive/texlive-en/texlive-en.html"; break; case TEXLIVE2009: filename += "/texlive/texlive-en/texlive-en.html"; break; case TEXLIVE2005: filename += "/english/texlive-en/live.html"; break; case TETEX3: filename += "/index.html"; break; default: return; } KILE_DEBUG() << "show TeX Guide: " << m_texVersionText << " file=" << filename; showHelpFile( filename ); }
void Help::helpTexRefsKeyword(Kate::View *view) { QString word = getKeyword(view); KILE_DEBUG() << "keyword: " << word << endl; if ( !word.isNull() && m_dictHelpTex.contains(word) ) { KILE_DEBUG() << "about to show help for " << word << " (section " << m_dictHelpTex[word] << " )" << endl; showHelpFile( m_texdocPath + m_texReference + m_dictHelpTex[word] ); } else noHelpAvailableFor(word); }
// Context help: user either current TexLive's Latex2e help, TexLive's older tex-refs help or Kile LaTeX help void Help::helpKeyword(KTextEditor::View *view) { QString word = getKeyword(view); KILE_DEBUG() << "keyword: " << word; if ( !m_helpDir.isEmpty() && !word.isEmpty() && m_dictHelpTex.contains(word) ) { KILE_DEBUG() << "about to show help for '" << word << "' (section " << m_dictHelpTex[word] << " )"; if ( m_contextHelpType == HelpLatex2eRefs ) { showHelpFile( m_latex2eReference + "#" + m_dictHelpTex[word] ); } else if ( m_contextHelpType == HelpTexRefs ) { showHelpFile( m_texdocPath + m_texrefsReference + m_dictHelpTex[word] ); } else if ( m_contextHelpType == HelpKileRefs ) { showHelpFile(m_kileReference + '#' + m_dictHelpTex[word]); } } else { noHelpAvailableFor(word); } }
void Help::helpLatex(HelpType type) { QString filename; // use older 'tex-refs' documentation, if this document is present and explicitly wanted // in all other cases use current TexLive documentation (latex2e-texlive.html) if ( m_contextHelpType==HelpTexRefs && m_texVersion!=TETEX3 ) { QString link; switch(type) { case HelpLatexIndex: link = "tex-refs.html#latex"; break; case HelpLatexCommand: link = "tex-refs.html#tex-refs-idx"; break; case HelpLatexSubject: link = "tex-refs.html#commands"; break; case HelpLatexEnvironment: link = "tex-refs.html#env-latex"; break; default: return; } filename = m_texdocPath + m_texrefsReference + link; } else { QString link; switch(type) { case HelpLatexIndex: link = "LaTeX2e"; break; case HelpLatexCommand: link = "Command-Index"; break; case HelpLatexSubject: link = "SEC_Overview"; break; case HelpLatexEnvironment: link = "Environments"; break; default: return; } filename = m_latex2eReference + "#" + link; } // show help file KILE_DEBUG() << "show LaTeX help: " << m_texVersionText << " file=" << filename; showHelpFile( filename ); }
void Help::helpKileRefsKeyword(Kate::View *view) { QString kilehelp = KGlobal::dirs()->findResource("html","en/kile/latexhelp.html"); KILE_DEBUG() << "kilehelp = " << kilehelp << endl; if ( ! kilehelp.isEmpty() ) { QString word = getKeyword(view); KILE_DEBUG() << "word = " << word << " " << m_dictHelpKile.contains(word) << endl; if ( !word.isNull() && m_dictHelpKile.contains(word) ) { showHelpFile( kilehelp + '#' + m_dictHelpKile[word] ); } else noHelpAvailableFor(word); } }
void Help::helpTexGuide() { QString filename; switch ( m_texVersion ) { case TEXLIVE2005: filename = "english/texlive-en/live.html"; break; case TETEX3: filename = "index.html"; break; case TETEX2: filename = "newhelpindex.html"; break; default: return; } showHelpFile( m_texdocPath + '/' + filename ); }
void Help::helpLatex(Type type) { QString link; if ( m_texVersion == TEXLIVE2005) { switch ( type ) { case HelpLatexIndex: link = "tex-refs.html#latex"; break; case HelpLatexCommand: link = "tex-refs.html#tex-refs-idx"; break; case HelpLatexSubject: link = "tex-refs.html#commands"; break; case HelpLatexEnvironment: link = "tex-refs.html#env-latex"; break; default: return; } } else if ( m_texVersion == TETEX3) { switch ( type ) { case HelpLatexIndex: link = "latex.html#latex"; break; case HelpLatexCommand: link = "appendices.html#tex-refs-idx"; break; case HelpLatexSubject: link = "latex.html#commands"; break; case HelpLatexEnvironment: link = "latex.html#environments"; break; default: return; } } else { switch ( type ) { case HelpLatexCommand: link = "ltx-2.html#cmd"; break; case HelpLatexSubject: link = "ltx-2.html#subj"; break; case HelpLatexEnvironment: link = "ltx-2.html#env"; break; case HelpLatexIndex: link = "ltx-2.html"; break; default: return; } } // show help file QString texversion; if ( m_texVersion == TEXLIVE2005 ) texversion = "TexLive 2005"; else if ( m_texVersion == TETEX3 ) texversion = "teTeX v3.x"; else texversion = "teTeX v2.x"; KILE_DEBUG() << "TeX Version: "<< texversion << " link=" << link << endl; showHelpFile( m_texdocPath + m_texReference + link ); }