[texdoc] [tex-live] texdoc update

Manuel Pégourié-Gonnard mpg at elzevir.fr
Wed Nov 25 11:33:38 CET 2009

Norbert Preining a écrit :
> On Mi, 25 Nov 2009, Manuel Pégourié-Gonnard wrote:
>> I reimplemented part of it :-/ I have two excuses:
>> - for now I just wanted to play with it, this is temporary
>> - your Lua module isn't up to date :-) (It fails with current tlpdb.)
> Upps, sorry. Well good that you remade it. Hopefully in some reuseable 
> way that someone can just load a library and gets access.
Nope, not at all, sorry. I made very specific code since it was faster
to write (and I thought it might be running faster). I just wanted to
play a bit with tlpdb reading before I decided to include it in 0.6 or
postpone it (I chose the later).

When I'll get back to it, I'll first fix the existing code (unless you
het to it first), then see if the execution speed difference is enough
to jutifiy using specific code or if I'd better use yours.

Also, see below.

> That is what I experienced my self. The File IO was the limiting factor.
Right. I get the best results here by reading the whole file and then
breaking it in line using LuaTeX's string.explode like this:

    local tlpdb = assert(io.open(get_tlroot()..'/tlpkg/texlive.tlpdb'))
    local tlpdb_content = tlpdb:read('*all')
    for _, line in ipairs(string.explode(tlpdb_content, '\n')) do

(Not sure if a tlpdb generated on Windows will have the correct line
endings.) Mentionning it just in case you want to reuse the trick.

> Ah I didn't realize that. I was using the version from TL2009-DVD.
> (Debian bug report!)
Sorry for shipping a broken version on the DVD. I wanted to fix the
manpages thing quickly and had no time to take of zip support. I now
re-implemented it in a more robust way, so I don't plan to break it any
more in the future :-)

While we're talking about Debian, there will be no texlive.tlpdb on a
TeX Live installed from Debian packages, right? I wonder if I should use
a file derived from the tlpdb that I would ship with texdoc. The only
information I'm interested in is the association:

.sty or .cls file -> package name -> list of docfiles with metadata.

I wonder if I really need the whole tlpdb just for that. (Of course the
real tlpdb is more convenient since it only mentions files that actually
exists on the installation. With an external file I would have to check
that files actually exist. Damn.)


More information about the texdoc mailing list