[tex-live] texdoc in luatex

Reinhard Kotucha reinhard.kotucha at web.de
Tue Jun 26 18:19:15 CEST 2007


Frank Küster writes:
 > Frank Küster <frank at kuesterei.ch> wrote:

 > - the shebang line is not yet fixed, since the Debian package doesn't
 >   install /usr/bin/texlua yet.

For TeXLive we need /usr/bin/env anyway.

When I try texdoc -l vntex I get what I expect, but texdoc -s vntex does
not work properly.  The path to the doc tree appears twice and the
slash in front of doc/... is missing.
 
 >    -- TODO: We completely ignore trees without ls-R files.  Since I
 >    -- don't know how to get the output of "find" without resorting to
 >    -- temporary files, anyway, I don't care.

You could use io.popen() in order to read from a pipe.  But do you
want to give up platform independence?

Assuming that in texmf trees which do not use an ls-R database the doc
tree will either be empty or very small, you could probably better
search the directory tree using some lua code.

This is what I found among the lfs files:
_____________________________________________________
function attrdir (path)
    for file in lfs.dir(path) do
        if file ~= "." and file ~= ".." then
            local f = path..'/'..file
            print ("\t "..f)
            local attr = lfs.attributes (f)
            assert (type(attr) == "table")
            if attr.mode == "directory" then
                attrdir (f)
            else
                for name, value in pairs(attr) do
                    print (name, value)
                end
            end
        end
    end
end

attrdir (".")
_____________________________________________________

This is probably a starting point.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------



More information about the tex-live mailing list