Whatever package name I use when invoking texdoc, I get no results. Which seems to indicate that something is missing from the setup. I made sure that several documentation packages are installed. Here's a transcript to make it more concrete:

$ sudo yum install texlive-commath-doc
<yum noise snipped>
Running Transaction
  Installing : 2:texlive-commath-doc-svn15878.0.3-20.fc18.noarch            1/1 
  Verifying  : 2:texlive-commath-doc-svn15878.0.3-20.fc18.noarch            1/1 

  texlive-commath-doc.noarch 2:svn15878.0.3-20.fc18                             

$ texdoc commath
/usr/share/texlive/texmf-local/lsR19748.tmp/ls-R: Permission denied
/usr/share/texlive/texmf-local/lsR19748.tmp/ls-r: Permission denied
/usr/share/texlive/texmf-local/lsR19748.tmp/ls-R: Permission denied
/usr/share/texlive/texmf-local/lsR19748.tmp/ls-r: Permission denied
/usr/share/texlive/texmf-local/lsR19748.tmp/aliases: Permission denied
Sorry, no documentation found for commath.
If you are unsure about the name, try searching CTAN's TeX catalogue at

What do I need to specify / install to make it work? Is there maybe an alternative?

As an aside, I'd be more interested in a solution which works with Emacs (man or info pages would be great).

  • It is a permissions problem as the message says. Either something is very screwed up with your system or something is very screwed up with Fedora/Red Hat's packaging. If the latter, you'd be best asking on their forums. Are you positive that yum is not giving warnings or errors? It should (almost certainly) not be looking for lsR19748.tmp. Does that directory even exist? – cfr Oct 17 '14 at 2:16
  • @cfr Nope, it isn't. The documentation isn't there. That directory was created by ESS as far as I can tell. I also ran texdoc as root, that didn't change anything (except the "Permission denied" message went away). Yum did install that package, I can find its content and look inside etc. – wvxvw Oct 17 '14 at 8:10
  • PS. The documentation appears to be installed in /usr/share/doc/. – wvxvw Oct 17 '14 at 8:11
  • 1
    I really hesitate to suggest anything since I'm not familiar with the packaging. If you wish to continue using packages from your distro, I recommend asking on their forums. An alternative would be installing TeX Live from upstream. – cfr Oct 17 '14 at 13:05

I finally found the reason, or at least I could fix it, following this thread: http://www.forums.fedoraforum.org/showthread.php?t=301163

What I found is that search.tlu had code that wouldn't create a database and thus texdoc wouldn't search at all. Below is the relevant code with my edits:

-- populate the doc_roots filename databases
function init_texdocs_database()
    doc_roots = {}
    local sep = (os.type == 'windows') and ';' or ':'
    local kpse_texdocs = kpse.expand_var("$TEXDOCS")
    -- expand the path and turn it into a lua list
    local raw_doc_roots = string.explode(kpse.expand_braces(kpse_texdocs), sep)
    local max = #raw_doc_roots + 1
    for j, dir in ipairs(raw_doc_roots) do
        local i = max - j
        local n
        local path, db
        -- get path, !! and // values
        dir, n = string.gsub(dir, '//$', '')
        local recursion_allowed = (n == 1)
        local path, n = string.gsub (dir, '^!!', '')
        local index_mandatory = (n == 1)
        deb_print('texdocs', string.format(
            'texdocs[%d] = %s (index_mandatory=%s, recursion_allowed=%s)',
            i, path, tostring(index_mandatory), tostring(recursion_allowed)))
        -- decide if we should use a ls-R index, the filesystem, or do nothing
        local root, shift = lsr_root(path)
        if root and shift and recursion_allowed then
            deb_print('texdocs', string.format(
                'texdocs[%d] using index: %s (shift=%s)', i, root, shift))
            db = init_lsr_db(root, shift)
        elseif not index_mandatory and lfs.isdir(path) then
            deb_print('texdocs', string.format(
                'texdocs[%d] using filesystem search', i))
            -- db = init_tree_db(path, recursion_allowed)
            -- Above was the original code, but it could never work because
            -- if you can't recurse on subdirectories of the documentation
            -- directory, there's no way you can find any files at all.
            -- I've no idea why this was the way it was.
            db = init_tree_db(path, true)
        -- register this in docroots
        doc_roots[i] = { path = path, db = db }
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.