summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-07-04 18:53:46 +0000
committerKarl Berry <karl@freefriends.org>2008-07-04 18:53:46 +0000
commitfec2c58ab6469ff23cf0de01118e1dc9c78d737f (patch)
treedec15bae7a09ba8f807816d05625eb1babdaded6 /Master/texmf
parentff76916b56843576e95bb66869aa6ed7ba8190b2 (diff)
semi-respect --dest for language.def generation; generate it in runtime; doc fixes
git-svn-id: svn://tug.org/texlive/trunk@9248 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl90
-rw-r--r--Master/texmf/tex/plain/config/language.us.def14
2 files changed, 59 insertions, 45 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 3704e47f530..205d8802133 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -58,7 +58,6 @@ my $opt_gui = 0;
my $opt_gui_lang;
TeXLive::TLUtils::process_logging_options();
-
GetOptions("location=s" => \$opt_location,
"netarchive=s" => \$opt_netarchive,
"diskarchive=s" => \$opt_diskarchive,
@@ -75,28 +74,27 @@ if (!defined($action) && $opt_gui) {
if ($opt_version) {
print "tlmgr revision $tlmgrrevision\n";
- exit(0);
-}
-
-if (!defined($action) && !$opt_help) {
- print "missing action\ntry 'tlmgr help' for more information.\n";
- exit 1;
+ exit 0;
}
if (defined($action) && ($action =~ m/^help/i)) {
$opt_help = 1;
}
-$NetArchive = $opt_netarchive if (defined($opt_netarchive));
-$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive));
+if (!defined($action) && !$opt_help) {
+ die "$0: missing action; try --help if you need it.\n";
+}
-if ($^O=~/^MSWin(32|64)$/i) {
+if ($^O =~ /^MSWin(32|64)$/i) {
pod2usage(-exitstatus => 0, -verbose => 2, -noperldoc => 1) if $opt_help;
} else {
pod2usage(-exitstatus => 0, -verbose => 2) if $opt_help;
}
-my $loadmediasrcerror = "Cannot load TeX Live Database from ";
+$NetArchive = $opt_netarchive if (defined($opt_netarchive));
+$DiskArchive = $opt_diskarchive if (defined($opt_diskarchive));
+
+my $loadmediasrcerror = "Cannot load TeX Live database from ";
my %ret;
if ($action =~ m/^_include_tlpobj$/) {
@@ -923,34 +921,38 @@ sub action_generate {
GetOptions("localcfg=s" => \$localconf, "dest=s" => \$dest,) or pod2usage(2);
init_local_db();
+ my $TEXMFSYSVAR = kpsewhich("TEXMFSYSVAR");
+ my $TEXMFLOCAL = kpsewhich("TEXMFLOCAL");
+
if ($what =~ m/^language(\.dat|\.def)?$/i) {
if ($what =~ m/^language(\.dat)?$/i) {
- $dest || ($dest = kpsewhich ("TEXMFSYSVAR") . "/tex/generic/config/language.dat");
- $localconf || ($localconf = kpsewhich ("TEXMFLOCAL") . "/tex/generic/config/language-local.dat");
- debug("$0: writing language data to $dest\n");
- TeXLive::TLUtils::create_language_dat ($localtlpdb, $dest, $localconf);
+ $dest ||= "$TEXMFSYSVAR/tex/generic/config/language.dat";
+ $localconf ||= "$TEXMFLOCAL/tex/generic/config/language-local.dat";
+ debug ("$0: writing language.dat data to $dest\n");
+ TeXLive::TLUtils::create_language_dat($localtlpdb, $dest, $localconf);
+ $dest .= ".def";
}
- $dest = "";
if ($what =~ m/^language(\.def)?$/i) {
- $dest || ($dest = kpsewhich ("TEXMFSYSVAR") . "/tex/plain/config/language.def");
- $localconf || ($localconf = kpsewhich ("TEXMFLOCAL") . "/tex/plain/config/language-local.def");
- debug("$0: writing language data to $dest\n");
- TeXLive::TLUtils::create_language_def ($localtlpdb, $dest, $localconf);
+ $dest ||= "$TEXMFSYSVAR/tex/plain/config/language.def";
+ $localconf ||= "$TEXMFLOCAL/tex/plain/config/language-local.def";
+ debug("$0: writing language.def data to $dest\n");
+ TeXLive::TLUtils::create_language_def($localtlpdb, $dest, $localconf);
}
+
} elsif ($what =~ m/^fmtutil$/i) {
- $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/fmtutil.cnf");
- $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/fmtutil-local.cnf");
- debug("$0: writing fmtutil.cnf data to $dest\n");
+ $dest ||= "$TEXMFSYSVAR/web2c/fmtutil.cnf";
+ $localconf ||= "$TEXMFLOCAL/web2c/fmtutil-local.cnf";
+ debug("$0: writing new fmtutil.cnf to $dest\n");
TeXLive::TLUtils::create_fmtutil($localtlpdb, $dest, $localconf);
} elsif ($what =~ m/^updmap$/i) {
- $dest || ($dest = kpsewhich("TEXMFSYSVAR") . "/web2c/updmap.cfg");
- $localconf || ($localconf = kpsewhich("TEXMFLOCAL") . "/web2c/updmap-local.cfg");
+ $dest ||= "$TEXMFSYSVAR/web2c/updmap.cfg";
+ $localconf ||= "$TEXMFLOCAL/web2c/updmap-local.cfg";
debug("$0: writing new updmap.cfg to $dest\n");
- TeXLive::TLUtils::create_updmap ($localtlpdb, $dest, $localconf);
+ TeXLive::TLUtils::create_updmap($localtlpdb, $dest, $localconf);
} else {
- die "$0: Unknown option for generate: $what (try --help if you need it)\n";
+ die "$0: Unknown option for generate: $what; try --help if you need it.\n";
}
return;
@@ -1219,12 +1221,12 @@ tlmgr - the TeX Live Manager
=head1 SYNOPSIS
-tlmgr [I<options>] I<action> [I<option>]... [I<operand>]...
+tlmgr [I<option>]... I<action> [I<option>]... [I<operand>]...
=head1 DESCRIPTION
B<tlmgr> manages an existing TeX Live installation, both packages and
-options.
+configurations options.
=head1 OPTIONS
@@ -1262,13 +1264,12 @@ Overrides the default settings for netarchive. Should be used with care.
Overrides the default settings for diskarchive. Should be used with care.
-=item B<--version>
-
-Echos the tlmgr.pl script's revision number and exits.
-
=back
-The standard options B<--help/-h/-?> and B<--debug> are also accepted.
+The standard options are also accepted: B<--help/-h/-?>, B<--version>,
+B<-q> (no informational messages), B<-v> (debugging messages, can be
+repeated). For more information about the latter, see the
+TeXLive::TLUtils documentation.
=head1 ACTIONS
@@ -1528,17 +1529,16 @@ to disable all maps which have been manually installed via C<updmap-sys
the C<--localcfg> file mentioned below are incorporated.
In more detail, this action regenerates any of the four config files
-C<language.dat>, C<language.def>, C<fmtutil.cnf>, and C<updmap.cfg> from
-the information
-present in the local TLPDB. If the files C<language-local.dat>,
-C<language-local.def>,
-C<fmtutil-local.cnf>, or C<updmap-local.cfg> are present under
-C<TEXMFLOCAL> in the respective directories, their contents will be
-simply merged into the final files, with no error checking of any kind.
+C<language.dat>, C<language.def>, C<fmtutil.cnf>, and C<updmap.cfg> from
+the information present in the local TLPDB. If the files
+C<language-local.dat>, C<language-local.def>, C<fmtutil-local.cnf>, or
+C<updmap-local.cfg> are present under C<TEXMFLOCAL> in the respective
+directories, their contents will be simply merged into the final files,
+with no error checking of any kind.
The form C<generate language> recreates both the C<language.dat> and the
C<language.def> files, while the forms with extension only recreates
-the spefic file.
+the given file.
Options:
@@ -1547,7 +1547,11 @@ Options:
=item B<--dest> I<output file>
specifies the output file (defaults to the respective location in
-C<TEXMFSYSVAR>).
+C<TEXMFSYSVAR>). If B<--dest> is given to C<generate language>, its
+value will be used for the C<language.dat> output, and C<.def> will be
+appended to the value for the name of the C<language.def> output file.
+(This is just to avoid overwriting; if you really want a specific name
+for each output file, we recommend invoking C<tlmgr> twice.)
=item B<--localcfg> I<local conf file>
diff --git a/Master/texmf/tex/plain/config/language.us.def b/Master/texmf/tex/plain/config/language.us.def
index 92c43bf08aa..a78690282a4 100644
--- a/Master/texmf/tex/plain/config/language.us.def
+++ b/Master/texmf/tex/plain/config/language.us.def
@@ -3,7 +3,8 @@
% Note: the first line of this file must match the corresponding line
% in "etex.src" and "etexdefs.lib", otherwise fallback will be used.
-% This is "language.def", e-TeX's language definition file.
+% This is the header for "language.def", e-TeX's language definition file.
+% $Id$
% It is explicitly permitted to augment this file by adding additional
% \addlanguage ... commands AFTER the first (\addlanguage {USenglish})
@@ -11,7 +12,16 @@
% portability for pre-\language documents. The last line of the file
% MUST be left as \uselanguage {USenglish} for the sane reason.
+% Additional languages, patterns, exceptions and left- and right-hyphen
+% minima may be added here, and an example is given for German.
+
+% The five parameters for \addlanguage are:
+% language, patterns file, exceptions file, left- and right-hyphen minima
+
+%%% Next section is E X A M P L E O N L Y
+%%% \addlanguage {German}{ghyph31}{}{2}{2} %%% further such lines may be used;
+%%% Previous section is E X A M P L E O N L Y
+
\addlanguage {USenglish}{hyphen}{}{2}{3} %%% This MUST be the first non-comment
%%% line of the file
-