David Kastrup <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Karl Berry) writes:
>
>>     Doesn't look straightforward to fix - any ideas?
>>
>> We will probably reinstate the Catalogue in TL, and when we do, I guess
>> we should not just copy the files, but set up some kind of "conversion"
>> process.  Ugh.
>>
>> Does MiKTeX contain the Catalogue?  If so, are the links properly
>> transformed?  If so, maybe we could just work from that.
>>
>> If someone wants to take this up, great.
>
> I'll try massaging an Emacs script in my free time.  This sounds like
> a reasonably doable job, and since it is a one-time exercise, my
> choice of scripting engine should not really matter.

Ok, I think I have this more or less finished (though only tested the
diagnosis functions so far).

It is actually rather instructive to run this over the whole TeXlive
tree as both source and target with a single C-u argument (which omits
the "fixable" things in the report).

We have a freak show of broken links here.

I'd recommend that somebody run this over the original catalog, thus
making sure that we start with something more or less consistent.
Then the "fixing run" in TeXlive should be able to resolve most stuff.

Usage: put this file somewhere, use
M-x byte-compile-file RET fixtexlive.el RET
M-x load-file RET fixtexlive.elc RET
M-x fix-html-tree RET /usr/TeX/2007/texmf-doc/doc/english/catalogue RET
  /usr/TeX/2007 RET

(or, of course, your subversion tree equivalents).

This will report all problems and purported changes.  Using
C-u M-x fix-html-tree RET ...
will just report the problems.

And
C-u C-u M-x fix-html-tree RET ...
will report the problems and _perform_ the changes.

I am no longer sure whether that is the best idea.  Maybe one should
just output a diff.  But then you can just let Emacs do the work, let
subversion generate the diff, revert to the last checked-in version,
edit the diff and apply it.

Attachment: fixtexlive.el
Description: application/emacs-lisp

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

Reply via email to