[tex-live] TeX Live suggestions

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jan 20 16:45:37 CET 2010


On Wed, Jan 20, 2010 at 04:06:25PM +0100, Manuel Pégourié-Gonnard wrote:

> Andreas Frick a écrit :
> 
> > missing packages:
> > 
> >     url.sty
> > 
> Present in ltxmisc. Arguably, ltxmisc should be split in individual packages,
> and each package in it should come with user documentation, but that's another
> story...

A text version could be automatically extracted from the package file,
see appended perl script and saved and provided as "url.txt" that
can then be found and presented by texdoc.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

%%% doc-url.pl %%%
#!/usr/bin/env perl
use strict;
$^W=1;

my $tex_url = `kpsewhich url.sty`;
chomp $tex_url;

print <<'END_HEAD';
Package `url'
=============

Documentation extracted from the package file `url.sty' by `doc-url.pl'.

Usage
=====

END_HEAD

open(IN, '<', $tex_url) or die "!!! Error: Cannot open `$tex_url'!\n";
while (<IN>) {
    last if /endinput/;
    s/^% //;
    s/^%$//;
    print;
}
while (<IN>) {
    last if /endinput/;
}
print <<'END_TXT';
Documentation
=============
END_TXT
while (<IN>) {
    s/^% //;
    s/^%$//;
    print;
    last if /The End/;
}
close(IN);

1;
%%% doc-url.pl %%%


More information about the tex-live mailing list