summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-04-16 22:17:27 +0000
committerKarl Berry <karl@freefriends.org>2017-04-16 22:17:27 +0000
commite2f647f28d1d99392613d28f7b1a751a57f7bbd1 (patch)
tree2776aade78e1a3a4107ef38cc0c4284727d411bc
parent90a31c615c9b36d2dd5fff3ab99ba6760b9dbb78 (diff)
latex2man (14apr17)
git-svn-id: svn://tug.org/texlive/trunk@43855 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/latex2man/latex2man570
-rw-r--r--Master/texmf-dist/doc/info/latex2man.info62
-rw-r--r--Master/texmf-dist/doc/man/man1/latex2man.124
-rw-r--r--Master/texmf-dist/doc/man/man1/latex2man.man1.pdfbin31801 -> 35512 bytes
-rw-r--r--Master/texmf-dist/doc/support/latex2man/CHANGES4
-rw-r--r--Master/texmf-dist/doc/support/latex2man/INSTALL4
-rw-r--r--Master/texmf-dist/doc/support/latex2man/Makefile24
-rw-r--r--Master/texmf-dist/doc/support/latex2man/README14
-rw-r--r--Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.241
-rw-r--r--Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.251
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man-CHANGES.html4
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.html27
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.pdfbin202717 -> 281109 bytes
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.tex36
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.texi20
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.trans4
-rw-r--r--Master/texmf-dist/doc/support/latex2man/latex2man.txt100
-rwxr-xr-xMaster/texmf-dist/scripts/latex2man/latex2man570
-rw-r--r--Master/texmf-dist/tex/latex/latex2man/latex2man.sty8
19 files changed, 865 insertions, 608 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/latex2man/latex2man b/Build/source/texk/texlive/linked_scripts/latex2man/latex2man
index 5987a8c8c0c..52e741e475c 100755
--- a/Build/source/texk/texlive/linked_scripts/latex2man/latex2man
+++ b/Build/source/texk/texlive/linked_scripts/latex2man/latex2man
@@ -3,10 +3,10 @@
# Descr: Latex --> MAN-page (groff -man), HTML and TexInfo;
# Language: PERL (>= 5.0)
# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
-# $Id: latex2man,v 1.156 2010/12/22 12:44:30 vollmer Exp $
+# $Id: latex2man,v 1.163 2017/04/13 14:25:56 vollmer Exp $
#
# Copyright (C) 1998 Dr. Juergen Vollmer
-# Viktoriastrasse 15, D-76133 Karlsruhe, Germany
+# Am Rennbuckel 21, D-76185 Karlsruhe, Germany
# Juergen.Vollmer@informatik-vollmer.de
# License:
# This program can be redistributed and/or modified under the terms
@@ -26,8 +26,8 @@ $CMD=`basename $0`; chop ($CMD);
$gen_date = `date`; chomp $gen_date; # date when the output was generated
sub date2str;
-$VERSION = "1.24";
-$DATE = date2str ('$Date: 2010/12/22 12:44:30 $' =~ m|(\d+/\d+/\d+)|);
+$VERSION = "1.25";
+$DATE = date2str ('$Date: 2017/04/13 14:25:56 $' =~ m|(\d+/\d+/\d+)|);
$tmp = "/tmp/$CMD.$$";
@@ -69,13 +69,13 @@ usage: latex2man [-t transfile] [-c cssfile] [-HTML] [-C name] [-h] [-V] infile
new line. In order to produce some additional space before
that word (using \SP) some character has to be printed
before the additional space. By default this is a . (dot).
- The \`char' specifies an alternative for that first character.
+ The 'char' specifies an alternative for that first character.
Giving a blank (-a" ") supresses the indentation of a line.
Note: only for the first \SP of a series that char is printed.
-h: Help.
-V: Version.
- Copyright (C) 1998 Dr. Jürgen Vollmer, Viktoriastr. 15, D-76133 Karlsruhe
+ Copyright (C) 1998 Dr. Jürgen Vollmer, Am Rennbuckel 21, D-76185 Karlsruhe
email: Juergen.Vollmer@informatik-vollmer.de
License:
This program can be redistributed and/or modified under the terms
@@ -119,16 +119,8 @@ $cond_name{HTML} = 1 if ($opt_H);
$cond_name{TEXI} = 1 if ($opt_T);
$cond_name{LATEX} = 1 if ($opt_L);
-
$SrcFile = $ARGV[0];
$DestFile = $ARGV[1];
-open (SRC, "<$SrcFile") || die "$CMD: Can't open file \`$SrcFile' for reading.\n";
-if ($opt_H || $opt_T) {
- # DestFile will be written in the postprocess
- open (DEST, ">$tmp") || die "$CMD: Can't open file \`$tmp' for writing.\n";
-} else {
- open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
-}
########################################################################
@@ -642,13 +634,6 @@ $texiMacro2a{'setlength'} = '';
$texiMacro2c{'setlength'} = '';
########################################################################
-# reading of translations for user macros
-
-if ($opt_t) {
- do $opt_t;
-}
-
-########################################################################
# processing for MAN
sub manStart
@@ -665,10 +650,12 @@ sub manStart
Print "\" \""; interpret_word "$tool"; Print "\""; NL;
# thanks to Andrew Anderson <aja@emulab.ee.mu.oz.au>
}
+
sub manEnd
{
NL; printf DEST ".\\\" NOTE: This file is generated, DO NOT EDIT.\n";
}
+
sub manSection
{
my ($cnt, $kind, $section) = @_;
@@ -677,6 +664,7 @@ sub manSection
}
interpret_line "\\$kind\{$section\}";
}
+
sub manParagraph
{
if (!$paragraph) {
@@ -688,12 +676,14 @@ sub manParagraph
$paragraph = 1;
}
}
+
sub manVerb
{
my $arg = $_[0];
if ($arg =~ /^\./) { print DEST '\\&' };
Print $arg
}
+
sub manItemWithArg
{
my $arg = $_[0];
@@ -706,6 +696,7 @@ sub manItemWithArg
PrintM ' ';
NL;
}
+
sub manItem
{
if ($manRS == 1) {
@@ -720,12 +711,14 @@ sub manItem
}
NL;
}
+
sub manDescriptionStart
{
if ($list_nest > 1) {
Print '\n.RS\n';
}
}
+
sub manDescriptionEnd
{
if ($manRS) {
@@ -737,12 +730,14 @@ sub manDescriptionEnd
}
manParagraph;
}
+
sub manItemStart
{
if ($list_nest > 1) {
Print '\n.RS\n';
}
}
+
sub manItemEnd
{
if ($manRS) {
@@ -754,6 +749,7 @@ sub manItemEnd
}
manParagraph;
}
+
sub manEnumEnd
{
if ($manRS) {
@@ -772,22 +768,27 @@ sub manEnumStart
Print '\n.RS\n';
}
}
+
sub manCenterStart
{
PrintM '\n.ce 100\n';
}
+
sub manCenterEnd
{
PrintM '\n.ce 0\n';
}
+
sub manNameStart
{
interpret_line "\\section\{NAME\}$rest";
}
+
sub manNameEnd
{
# nothing
}
+
sub manTableStart
{
my $columns = $_[0];
@@ -802,10 +803,12 @@ sub manTableStart
Print "w($width)" if ($width);
Print '.\n';
}
+
sub manTableSep
{
Print '\nT}&T{\n';
}
+
sub manTableEnd
{
Print '\n.TE\n';
@@ -861,33 +864,40 @@ sub htmlStart
Print "<h4 align=center>Version $version</h4>"; NL;
}
}
+
sub htmlEnd
{
Print "</body>"; NL;
Print "</html>"; NL;
Print "<!-- NOTE: This file is generated, DO NOT EDIT. -->"; NL;
}
+
sub htmlSection
{
my ($cnt, $kind, $section) = @_;
interpret_line "\\$kind\{$cnt\}\{$section\}";
}
+
sub htmlCenterStart
{
Print '\n<div align=center>\n';
}
+
sub htmlCenterEnd
{
Print '\n</div>\n';
}
+
sub htmlNameStart
{
# nothing
}
+
sub htmlNameEnd
{
Print '\n@@INSERTION-POINT@@-TOC@@\n';
}
+
sub htmlParagraph
{
if (!$paragraph) {
@@ -895,6 +905,7 @@ sub htmlParagraph
$paragraph = 1;
}
}
+
sub htmlVerb
{
$arg = $_[0];
@@ -903,6 +914,7 @@ sub htmlVerb
$arg =~ s/</&lt;/g;
Print $arg;
}
+
sub htmlItemWithArg
{
my $arg = $_[0];
@@ -914,6 +926,7 @@ sub htmlItemWithArg
interpret_word $arg; Print "</dt>"; NL;
Print "<dd>";
}
+
sub htmlItem
{
if ($item_nr[$list_nest] > 1) {
@@ -925,30 +938,37 @@ sub htmlItem
Print '<li value =' . $item_nr[$list_nest] .'>';
}
}
+
sub htmlDescriptionStart
{
NL; Print "<dl compact>"; NL;
}
+
sub htmlDescriptionEnd
{
NL; Print "</dd>\n</dl>"; NL;
}
+
sub htmlItemStart
{
NL; Print "<ul compact>"; NL;
}
+
sub htmlItemEnd
{
NL; Print "</li>\n</ul>"; NL;
}
+
sub htmlEnumStart
{
NL; Print "<ol compact>"; NL;
}
+
sub htmlEnumEnd
{
NL; Print "</li>\n</ol>"; NL;
}
+
sub htmlTableStart
{
my $columns = $_[0];
@@ -961,6 +981,7 @@ sub htmlTableStart
}
NL;
}
+
sub htmlTableSep
{
if ($first_column == 0) {
@@ -972,6 +993,7 @@ sub htmlTableSep
Print '<td>';
}
}
+
sub htmlTableEnd
{
NL; Print "</table>"; NL;
@@ -1008,11 +1030,13 @@ sub texiStart
Print '@c Manual page created with' ." $CMD on $gen_date>"; NL;
Print '@c NOTE: This file is generated, DO NOT EDIT.'; NL;
}
+
sub texiEnd
{
Print '@bye'; NL;
Print '@c NOTE: This file is generated, DO NOT EDIT.'; NL;
}
+
sub texiSection
{
my ($cnt, $kind, $section) = @_;
@@ -1029,6 +1053,7 @@ sub texiSection
}
interpret_line "\\$kind\{$section\}";
}
+
sub texiNameStart
{
my ($name, $chapter, $author, $tool) = @_;
@@ -1046,10 +1071,12 @@ sub texiNameStart
Print '\n@@INSERTION-POINT@@-TEXI-TOP@@'; NL;
Print '@top ' . "$name"; NL;
}
+
sub texiNameEnd
{
# nothing
}
+
sub texiParagraph
{
if (!$paragraph) {
@@ -1057,12 +1084,14 @@ sub texiParagraph
$paragraph = 1;
}
}
+
sub texiVerb
{
$arg = $_[0];
$arg =~ s/({|})/\@$1/g;
Print $arg;
}
+
sub texiItemWithArg
{
my $arg = $_[0];
@@ -1070,26 +1099,32 @@ sub texiItemWithArg
interpret_word $arg;
NL;
}
+
sub texiItem
{
Print '\n@item\n';
}
+
sub texiDescriptionStart
{
Print '\n@table @samp\n';
}
+
sub texiDescriptionEnd
{
Print '\n@end table\n';
}
+
sub texiItemStart
{
Print '\n@itemize @bullet\n';
}
+
sub texiItemEnd
{
Print '\n@end itemize\n';
}
+
sub texiCenterStart
{
$texiCenterLine = 1;
@@ -1098,6 +1133,7 @@ sub texiCenterStart
$texiMacro{'TEXIbr'} = '@*';
NL;
}
+
sub texiCenterEnd
{
$texiCenterLine = 0;
@@ -1111,10 +1147,12 @@ sub texiEnumStart
{
Print '\n@enumerate\n';
}
+
sub texiEnumEnd
{
Print '\n@end enumerate\n';
}
+
sub texiTableStart
{
my $columns = $_[0];
@@ -1126,10 +1164,12 @@ sub texiTableStart
}
Print '\n';
}
+
sub texiTableSep
{
Print '@tab ';
}
+
sub texiTableEnd
{
Print '\n@end multitable\n';
@@ -1163,11 +1203,13 @@ sub check_Macro
exists $Macro->{$_[0]} ||
die "Error in line $.: no such macro: \\$_[0]\n";
}
+
sub check_Macro1
{
(exists $Macro1a->{$_[0]} && exists $Macro1b->{$_[0]}) ||
die "$CMD: Error in line $.: no such macro: \\$_[0]\n";
}
+
sub check_Macro2
{
(exists $Macro2a->{$_[0]} && exists $Macro2b->{$_[0]} && exists $Macro2c->{$_[0]}) ||
@@ -1238,7 +1280,7 @@ sub interpret_word
} elsif ($opt_T) {
# handling of TexInfo specific stuff
if ($nesting == 0) {
- s'@'@@'g;
+ s'@'@@'g; #'
}
if ($inside_table == 1) {
if ($first_column == 1) {
@@ -1254,7 +1296,7 @@ sub interpret_word
/^$/ && do {$add_blank = 0;
last SWITCH;
};
- /\\verb\+([^+]*)\+/ && do {$s=$`;$m=$1;$r=$';
+ /\\verb\+([^+]*)\+/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro1a->{'verb'};
&{$Prefix . "Verb"} ($m);
@@ -1262,21 +1304,21 @@ sub interpret_word
interpret_word $r;
last SWITCH;
};
- /\\(".|ss)/ && do {$s=$`;$m=$1;$r=$'; #"
+ /\\(".|ss)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
check_Macro $m;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
- /\\item\s*\[([^]]*)\]/ && do {$s=$`;$m=$1;$r=$';
+ /\\item\s*\[([^]]*)\]/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
$item_nr[$list_nest] ++;
&{$Prefix . "ItemWithArg"} ($m);
interpret_word $r;
last SWITCH;
};
- /\\item\s*/ && do {$s=$`;$r=$';
+ /\\item\s*/ && do {$s=$`;$r=$'; #'
interpret_word $s;
$item_nr[$list_nest] ++;
&{$Prefix . "Item"};
@@ -1285,7 +1327,7 @@ sub interpret_word
};
# LaTeX macros with two arguments
/\\([a-zA-Z]+){([^}]*)}{([^}]*)}/
- && do {$s=$`;$m=$1;$a1=$2;$a2=$3;$r=$';
+ && do {$s=$`;$m=$1;$a1=$2;$a2=$3;$r=$'; #'
check_Macro2 $m;
interpret_word $s;
PrintM $Macro2a->{$m};
@@ -1299,7 +1341,7 @@ sub interpret_word
};
# Special Handling of Email and URL LaTeX macros with one argument
/\\(URL|Email){([^}]*)}/ && ($opt_H)
- && do {$s=$`;$m=$1;$a1=$2;$r=$';
+ && do {$s=$`;$m=$1;$a1=$2;$r=$'; #'
interpret_word $s;
PrintM $Macro2a->{$m};
interpret_word $a1;
@@ -1311,7 +1353,7 @@ sub interpret_word
last SWITCH;
};
# LaTeX macros with one argument
- /\\([a-zA-Z]+){([^}]*)}/ && do {$s=$`;$m=$1;$a1=$2;$r=$';
+ /\\([a-zA-Z]+){([^}]*)}/ && do {$s=$`;$m=$1;$a1=$2;$r=$'; #'
check_Macro1 $m;
interpret_word $s;
PrintM $Macro1a->{$m};
@@ -1322,7 +1364,7 @@ sub interpret_word
last SWITCH;
};
# Special handling of some LaTeX macros without an argument
- /\\SP\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\SP\s*/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
if ($first_word) {
PrintM $Macro->{"SPfirst"};
@@ -1333,7 +1375,7 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\(MANbr|TEXIbr|HTMLbr)\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\(MANbr|TEXIbr|HTMLbr)\s*/ && do {$s=$`;$m=$1;$r=$'; #'
# set $first_word to true
check_Macro $m;
interpret_word $s;
@@ -1344,7 +1386,7 @@ sub interpret_word
last SWITCH;
};
# LaTeX macros without an argument:
- /\\([a-zA-Z]+)\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\([a-zA-Z]+)\s*/ && do {$s=$`;$m=$1;$r=$'; #'
check_Macro $m;
interpret_word $s;
PrintM $Macro->{$m};
@@ -1352,39 +1394,39 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\({|}|\$|_|#|&|-|%|,|\.|;)/ && do {$s=$`;$m=$1;$r=$';
+ /\\({|}|\$|_|#|&|-|%|,|\.|;)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
# LaTeX Math
- /\$(<|>|<=|>=|=|<>)\$/ && do {$s=$`;$m=$1;$r=$';
+ /\$(<|>|<=|>=|=|<>)\$/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
- /\$([^\$]*)\$/ && do {$s=$`;$m=$1;$r=$';
+ /\$([^\$]*)\$/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
interpret_word $m;
interpret_word $r;
last SWITCH;
};
- /&/ && do {$s=$`;$r=$';
+ /&/ && do {$s=$`;$r=$'; #'
interpret_word $s;
&{$Prefix . "TableSep"};
$first_column = 0;
interpret_word $r;
last SWITCH;
};
- /~/ && do {$s=$`;$r=$';
+ /~/ && do {$s=$`;$r=$'; #'
interpret_word $s;
PrintM $Macro->{'~'};
interpret_word $r;
last SWITCH;
};
- /\\\\/ && do {$s=$`;$r=$';
+ /\\\\/ && do {$s=$`;$r=$'; #'
interpret_word $s;
if ($inside_table) {
PrintM $Macro->{'\\Tab'};
@@ -1400,7 +1442,7 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\$|\\ / && do {$s=$`;$r=$';
+ /\\$|\\ / && do {$s=$`;$r=$'; #'
# LaTeX explicit blank \ will be
# represented as a single \ at
# the end of the word
@@ -1409,12 +1451,12 @@ sub interpret_word
interpret_word $r;
last SWITCH;
};
- /\\/ && do {$s=$`;$r=$';
+ /\\/ && do {$s=$`;$r=$'; #'
interpret_word $s;
interpret_word "\\$r";
last SWITCH;
};
- ($opt_M == 1) && /((^\.|')+)/ && do {$s=$`;$m=$1;$r=$';
+ ($opt_M == 1) && /((^\.|')+)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
print DEST "\\&$m";
$newline = 0;
@@ -1425,7 +1467,7 @@ sub interpret_word
};
$nesting --;
Print " " if ($nesting == 0 && $add_blank);
-}
+} # interpret_word()
sub interpret_line
{
@@ -1495,7 +1537,7 @@ sub interpret_line
interpret_word $word;
}
NL;
-}
+} # interpret_line()
sub PrintM
# print only for Macro command text
@@ -1514,7 +1556,7 @@ sub PrintM
print DEST "$c";
}
}
-}
+} # PrintM()
sub Print
{
@@ -1556,7 +1598,8 @@ sub Print
}
}
$paragraph = 0;
-}
+} # Print()
+
#########################################################################
sub date2str
@@ -1574,6 +1617,7 @@ $date = date2str ($rcs_date);
$Macro->{'today'} = $date;
#########################################################################
+
my @skip; # stack of skip-flags, 1: skip, 0: don't skip
push @skip, 0; # synthetic "outer most" IF, don't skip
my $last_cond_clause = "";
@@ -1622,17 +1666,31 @@ sub handle_conditional_text
pop @skip;
}
# print "$last_cond_clause: skip = $skip[-1]\n";
-}
+} # handle_conditional_text()
############################################################################
# handle LaTeX output
-if ($opt_L) {
- while (<SRC>) {
+#########################################################################
+
+sub emit_LaTeX
+{
+ my $src = shift(@_); # the source handle to be read
+ my $inside_include = shift(@_); # true, if we reading an \input{..}
+ while (<$src>) {
if ($opt_D == 1) {
my $line = $_; chop $line;
print "--- \`$line'\n";
}
-
+ if (/^\s*\\input{([^}]*)}\s*/) {
+ # handle \input{fn}
+ my $fn = $1;
+ printf DEST "%%%%%%%%%%%%%%%%%% start of \\input{%s}\n", $fn;
+ open (my $inc, "<$fn") || die "$CMD: Can't open file \\input-file \`$fn' for reading.\n";
+ emit_LaTeX($inc, 1);
+ close ($inc);
+ printf DEST "%%%%%%%%%%%%%%%%%% end of \\input{%s}\n", $fn;
+ next;
+ }
if (/^\s*%@%\s/) {
my $skip = $skip[-1];
handle_conditional_text ("$_");
@@ -1643,13 +1701,14 @@ if ($opt_L) {
next if ($skip[-1] == 1);
print DEST $_;
}
- close (DEST);
- exit (0);
-}
+} # emit_LaTeX()
+
############################################################################
# handle non-LaTeX output
+############################################################################
+sub emit_NonLaTeX
# read sections
# Variables: $section name of the section in uppercase letters
# $chapter chapter of the man page
@@ -1659,182 +1718,217 @@ if ($opt_L) {
# $tool info about the tool set, $name is part of
# $date date
# $version version info
-$started = 0;
-while (<SRC>) {
- if ($opt_D == 1) {
- my $line = $_; chop $line;
- print "--- \`$line'\n";
- }
-
- if ((/^\s*%@%\s/) && ($inside_verb==0)) {
- my $skip = $skip[-1];
- handle_conditional_text ("$_");
- }
- next if ($skip[-1] == 1);
+{
+ my $src = shift(@_); # the source handle to be read
+ my $inside_include = shift(@_); # true, if we reading an \input{..}
- if ($inside_verb) {
- if (/^\s*\\end{verbatim}/) {
- if ($started == 1) {
- &{$Prefix . "VerbatimEnd"};
- $inside_verb = 0;
- }
- } else {
- &{$Prefix . "VerbatimLine"} ($_);
- }
- next;
+ if ($inside_include) {
+ $started = shift(@_); # given, only if inside_include is true
+ } else {
+ $started = 0;
}
- # remove {, } around Umlaute
- s/{(\\".)}/\1/g; # "
- s/{(\\ss)}/\1/g;
-
- # normalize special characters
- s/\\"a/ä/g;
- s/\\"o/ö/g;
- s/\\"u/ü/g;
- s/\\"A/Ä/g;
- s/\\"O/Ö/g;
- s/\\"U/Ü/g;
- s/\\ss/ß/g;
-
- if (/^\s*\\rcsInfo \$(.*)\$/) {
- my ($rcs_id,$rcs_file,$rcs_revision,
- $rcs_date,$rcs_time,$rcs_owner,$rcs_status,$rcs_locker) = split(/\s/,$1);
- $date = date2str ($rcs_date);
- $Macro->{'today'} = $date;
- } elsif (/^\s*\\setDate{\\rcsInfoLongDate}/) {
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setDate{\\today}/) {
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setDate{([^}]*)}/) {
- $date = $1;
- $date =~ s/~/$Macro->{'~'}/g;
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setVersion{([^}]*)}/) {
- $version = $1;
- $versin =~ s/~/$Macro->{'~'}/g;
- $Macro->{'Version'} = $version;
- } elsif (/^\s*\\begin{Name}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}/) {
- $section = "Name";
- $chapter = $1;
- $name = $2;
- $Name = uc $name;
- $author = $3;
- $tool = $4;
- $title = $5;
- $rest = $';
- $started = 1;
- $sections[0] = $section;
- $section_cnt = 0;
- &{$Prefix . "Start"} ($name, $chapter, $author, $tool, $title);
- &{$Prefix . "NameStart"} ($name, $chapter, $author, $tool, $title);
- } elsif (/^\s*\\end{Name}/) {
- &{$Prefix . "NameEnd"} ($name, $chapter, $author, $tool);
- } elsif (/^\s*\\begin{Table}(\[([^]]*)\])?{([^}]*)}/) {
- # \begin{Table}[width]{columns}
- if ($started == 1) {
- $columns = $3;
- $column = $_[0];
- $inside_table = 1;
- $first_column = 1;
- &{$Prefix . "TableStart"} ($columns, $2);
- }
- } elsif (/^\s*\\end{Table}/) {
- if ($started == 1) {
- $inside_table = 0;
- $first_column = 0;
- &{$Prefix . "TableEnd"} ($columns);
- }
- } elsif (/^\s*\\begin{Description}(\[[^]]*\])?/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'descr';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "DescriptionStart"};
- }
- } elsif (/^\s*\\end{Description}/) {
- if ($started == 1) {
- &{$Prefix . "DescriptionEnd"};
- $list_nest--;
- }
- } elsif (/^\s*\\begin{description}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'descr';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "DescriptionStart"};
- }
- } elsif (/^\s*\\end{description}/) {
- if ($started == 1) {
- &{$Prefix . "DescriptionEnd"};
- $list_nest--;
- }
- } elsif (/^\s*\\begin{center}/) {
- if ($started == 1) {
- &{$Prefix . "CenterStart"};
- }
- } elsif (/^\s*\\end{center}/) {
- if ($started == 1) {
- &{$Prefix . "CenterEnd"};
- }
- } elsif (/^\s*\\begin{enumerate}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'enum';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "EnumStart"} ;
- }
- } elsif (/^\s*\\end{enumerate}/) {
- if ($started == 1) {
- &{$Prefix . "EnumEnd"} ;
- $list_nest--;
- }
- } elsif (/^\s*\\begin{itemize}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'item';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "ItemStart"} ;
+ while (<$src>) {
+ if ($opt_D == 1) {
+ my $line = $_; chop $line;
+ print "--- \`$line'\n";
}
- } elsif (/^\s*\\end{itemize}/) {
- if ($started == 1) {
- &{$Prefix . "ItemEnd"} ;
- $list_nest--;
+ if (/^\s*\\input{([^}]*)}\s*/) {
+ # handle \input{fn}
+ my $fn = $1;
+ if ($opt_M) {
+ printf DEST ".\\\" *********************************** start of \\input{%s}\n", $fn;
+ } elsif ($opt_H) {
+ printf DEST "<!-- *********************************** start of \\input{%s} -->\n", $fn;
+ } elsif ($opt_T) {
+ printf DEST "\@c *********************************** start of \\input{%s}\n", $fn;
+ }
+ open (my $inc, "<$fn") || die "$CMD: Can't open file \\input-file \`$fn' for reading.\n";
+ emit_NonLaTeX($inc, 1, $started);
+ close ($inc);
+ if ($opt_M) {
+ printf DEST ".\\\" *********************************** end of \\input{%s}\n", $fn;
+ } elsif ($opt_H) {
+ printf DEST "<!-- *********************************** end of \\input{%s} -->\n", $fn;
+ } elsif ($opt_T) {
+ printf DEST "\@c *********************************** end of \\input{%s}\n", $fn;
+ }
+ next;
}
- } elsif (/^\s*\\begin{verbatim}/) {
- if ($started == 1) {
- &{$Prefix . "VerbatimStart"};
- $inside_verb = 1;
+ if ((/^\s*%@%\s/) && ($inside_verb==0)) {
+ my $skip = $skip[-1];
+ handle_conditional_text ("$_");
}
- } elsif (/^\s*\\(subsubsection|subsection|section){([^}]*)}/) {
- $kind = $1;
- $section = $2;
- $section_cnt ++;
- $sections[$section_cnt] = $section;
- $section_kind[$section_cnt] = $kind;
- if ($started == 1) {
- &{$Prefix . "Section"} ($section_cnt, $kind, $section);
+ next if ($skip[-1] == 1);
+
+ if ($inside_verb) {
+ if (/^\s*\\end{verbatim}/) {
+ if ($started == 1) {
+ &{$Prefix . "VerbatimEnd"};
+ $inside_verb = 0;
+ }
+ } else {
+ &{$Prefix . "VerbatimLine"} ($_);
+ }
+ next;
}
- } elsif (/^\s*\\LatexManEnd/) {
- last;
- } elsif (/^\s*((\\begin{Name|Table|Description})|(\\(sub)?section))/) {
- die "$CMD: in line $.\n " .
- "Arguments of $1 are not contained in a single " .
- "line.\n " .
- "Remember: all arguments of a macro must be on the same line.\n";
- } else {
- if ($started == 1) {
- interpret_line $_;
+
+ # remove {, } around Umlaute
+ s/{(\\".)}/\1/g; # "
+ s/{(\\ss)}/\1/g;
+
+ # normalize special characters
+ s/\\"a/ä/g;
+ s/\\"o/ö/g;
+ s/\\"u/ü/g;
+ s/\\"A/Ä/g;
+ s/\\"O/Ö/g;
+ s/\\"U/Ü/g;
+ s/\\ss/ß/g;
+
+ if (/^\s*\\rcsInfo \$(.*)\$/) {
+ my ($rcs_id,$rcs_file,$rcs_revision,
+ $rcs_date,$rcs_time,$rcs_owner,$rcs_status,$rcs_locker) = split(/\s/,$1);
+ $date = date2str ($rcs_date);
+ $Macro->{'today'} = $date;
+ } elsif (/^\s*\\setDate{\\rcsInfoLongDate}/) {
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setDate{\\today}/) {
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setDate{([^}]*)}/) {
+ $date = $1;
+ $date =~ s/~/$Macro->{'~'}/g;
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setVersion{([^}]*)}/) {
+ $version = $1;
+ $versin =~ s/~/$Macro->{'~'}/g;
+ $Macro->{'Version'} = $version;
+ } elsif (/^\s*\\begin{Name}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}/) {
+ $section = "Name";
+ $chapter = $1;
+ $name = $2;
+ $Name = uc $name;
+ $author = $3;
+ $tool = $4;
+ $title = $5;
+ $rest = $'; #'
+ $started = 1;
+ $sections[0] = $section;
+ $section_cnt = 0;
+ &{$Prefix . "Start"} ($name, $chapter, $author, $tool, $title);
+ &{$Prefix . "NameStart"} ($name, $chapter, $author, $tool, $title);
+ } elsif (/^\s*\\end{Name}/) {
+ &{$Prefix . "NameEnd"} ($name, $chapter, $author, $tool);
+ } elsif (/^\s*\\begin{Table}(\[([^]]*)\])?{([^}]*)}/) {
+ # \begin{Table}[width]{columns}
+ if ($started == 1) {
+ $columns = $3;
+ $column = $_[0];
+ $inside_table = 1;
+ $first_column = 1;
+ &{$Prefix . "TableStart"} ($columns, $2);
+ }
+ } elsif (/^\s*\\end{Table}/) {
+ if ($started == 1) {
+ $inside_table = 0;
+ $first_column = 0;
+ &{$Prefix . "TableEnd"} ($columns);
+ }
+ } elsif (/^\s*\\begin{Description}(\[[^]]*\])?/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'descr';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "DescriptionStart"};
+ }
+ } elsif (/^\s*\\end{Description}/) {
+ if ($started == 1) {
+ &{$Prefix . "DescriptionEnd"};
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{description}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'descr';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "DescriptionStart"};
+ }
+ } elsif (/^\s*\\end{description}/) {
+ if ($started == 1) {
+ &{$Prefix . "DescriptionEnd"};
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{center}/) {
+ if ($started == 1) {
+ &{$Prefix . "CenterStart"};
+ }
+ } elsif (/^\s*\\end{center}/) {
+ if ($started == 1) {
+ &{$Prefix . "CenterEnd"};
+ }
+ } elsif (/^\s*\\begin{enumerate}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'enum';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "EnumStart"} ;
+ }
+ } elsif (/^\s*\\end{enumerate}/) {
+ if ($started == 1) {
+ &{$Prefix . "EnumEnd"} ;
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{itemize}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'item';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "ItemStart"} ;
+ }
+ } elsif (/^\s*\\end{itemize}/) {
+ if ($started == 1) {
+ &{$Prefix . "ItemEnd"} ;
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{verbatim}/) {
+ if ($started == 1) {
+ &{$Prefix . "VerbatimStart"};
+ $inside_verb = 1;
+ }
+ } elsif (/^\s*\\(subsubsection|subsection|section){([^}]*)}/) {
+ $kind = $1;
+ $section = $2;
+ $section_cnt ++;
+ $sections[$section_cnt] = $section;
+ $section_kind[$section_cnt] = $kind;
+ if ($started == 1) {
+ &{$Prefix . "Section"} ($section_cnt, $kind, $section);
+ }
+ } elsif (/^\s*\\LatexManEnd/) {
+ last;
+ } elsif (/^\s*((\\begin{Name|Table|Description})|(\\(sub)?section))/) {
+ die "$CMD: in line $.\n " .
+ "Arguments of $1 are not contained in a single " .
+ "line.\n " .
+ "Remember: all arguments of a macro must be on the same line.\n";
+ } else {
+ if ($started == 1) {
+ interpret_line $_;
+ }
}
}
-}
-&{$Prefix . "End"};
+ if (!$inside_include) {
+ &{$Prefix . "End"};
+ }
+} # emit_NonLaTeX()
-close DEST;
+############################################################################
+# Postprocessing TEXI and HTML
+############################################################################
-if ($opt_H || $opt_T) {
- open (TMP, "<$tmp") || die "$CMD: Can't open file \`$tmp' for reading.\n";
- open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
+sub postProcessNonLaTeX
+{
+ open (TMP, "<$tmp") || die "$CMD: Can't open file \`$tmp' for reading.\n";
while (<TMP>) {
if (/^\@\@INSERTION-POINT\@\@-TOC\@\@$/) {
if ($opt_H) {
@@ -1902,14 +1996,52 @@ if ($opt_H || $opt_T) {
}
}
close TMP;
- close DEST;
unlink $tmp;
+} # postPrecessNonLaTeX()
+
+#########################################################################
+# Do the job
+#########################################################################
+
+if ($opt_t) {
+ # reading of translations for user macros
+ do $opt_t;
+}
+
+########################################################################
+
+open (my $SRC, "<$SrcFile") || die "$CMD: Can't open file \`$SrcFile' for reading.\n";
+if ($opt_H || $opt_T) {
+ # DestFile will be written in the postprocess
+ open (DEST, ">$tmp") || die "$CMD: Can't open file \`$tmp' for writing.\n";
+} else {
+ open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
}
+if ($opt_L) {
+ # handle LaTeX output
+ emit_LaTeX ($SRC);
+ close ($SRC);
+ close (DEST);
+} else {
+ # handle non-LaTeX
+ emit_NonLaTeX ($SRC);
+ close ($SRC);
+ close (DEST);
+
+ if ($opt_H || $opt_T) {
+ open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
+ postProcessNonLaTeX();
+ close (DEST);
+ }
+}
+
+############################################################################
+
+
#########################################################################
## Emacs specific:
## Local Variables: ***
## mode: perl ***
## End: ***
-
diff --git a/Master/texmf-dist/doc/info/latex2man.info b/Master/texmf-dist/doc/info/latex2man.info
index 20f024d7e05..af3d972c246 100644
--- a/Master/texmf-dist/doc/info/latex2man.info
+++ b/Master/texmf-dist/doc/info/latex2man.info
@@ -149,6 +149,9 @@ Files
``latex2man.tex''
The LaTeX file containing this Man-page.
+``latex2man.inc''
+ A file read with \input{..} .
+
``latex2man.sty''
The LaTeX package defining the environments and commands.
@@ -609,7 +612,7 @@ The following standard LaTeX commands are accepted:
inside a itemize, enumerate, or description environment.
`\today'
- 22 December 2010(see also the rcsinfo LaTeXpackage).
+ 13 April 2017(see also the rcsinfo LaTeXpackage).
`\ss,\"a, ...'
\ss = ss, \"a= a", \"o= o", \"u= u", \"A= A", \"O= O", \"U= U". It
@@ -624,6 +627,9 @@ The following standard LaTeX commands are accepted:
translated into the equivalent letter of the desired output format.
E.g. A" becomes &Auml; in HTML and @"A in texinfo.
+`\input{..}'
+ Read and process the given filename.
+

File: latex2man.info, Node: Conditional Text, Next: Translation of User Defined Macros, Prev: Accepted LaTeX Macros, Up: Top
@@ -984,7 +990,7 @@ File: latex2man.info, Node: Version, Next: License and Copyright, Prev: Chang
Version
=======
-Version: 1.24 of 2010/12/22.
+Version: 1.25 of 2017/04/13.

File: latex2man.info, Node: License and Copyright, Next: Author, Prev: Version, Up: Top
@@ -993,8 +999,8 @@ License and Copyright
=====================
`Copyright'
- (C)1998, Dr. Ju"rgen Vollmer, Viktoriastrasse 15, D-76133
- Karlsruhe, Germany,
+ (C)1998, Dr. Ju"rgen Vollmer, Am Rennbuckel 21, D-76185 Karlsruhe,
+ Germany,
<Juergen.Vollmer@informatik-vollmer.de>
The actual version of Latex2man may be found on my homepage
@@ -1017,8 +1023,8 @@ Author
======
Dr. Ju"rgen Vollmer
-Viktoriastrasse 15
-D-76133 Karlsruhe
+Am Rennbuckel 21
+D-76185 Karlsruhe
Email: <Juergen.Vollmer@informatik-vollmer.de>
WWW: `http://www.informatik-vollmer.de'.
@@ -1029,27 +1035,27 @@ Node: Top187
Node: Description1287
Node: Options2141
Node: Files4057
-Node: See Also4868
-Node: LaTeX commands5024
-Node: Package Options5307
-Node: Package Specific Environments5759
-Node: Accepted LaTeX Environments8547
-Node: Package Specific Macros9079
-Node: Accepted Macros from the rcsinfo Package12665
-Node: Accepted LaTeX Macros13162
-Node: Conditional Text16231
-Node: Translation of User Defined Macros18269
-Node: Verbatim Environment20383
-Node: Subsection works20709
-Node: Subsubsection works20884
-Node: Subsubsection still works21073
-Node: General Remarks21279
-Node: CSS classnames22017
-Node: Some Bug Fix Tests27698
-Node: Requirements28436
-Node: Changes28850
-Node: Version29089
-Node: License and Copyright29232
-Node: Author30026
+Node: See Also4922
+Node: LaTeX commands5078
+Node: Package Options5361
+Node: Package Specific Environments5813
+Node: Accepted LaTeX Environments8601
+Node: Package Specific Macros9133
+Node: Accepted Macros from the rcsinfo Package12719
+Node: Accepted LaTeX Macros13216
+Node: Conditional Text16338
+Node: Translation of User Defined Macros18376
+Node: Verbatim Environment20490
+Node: Subsection works20816
+Node: Subsubsection works20991
+Node: Subsubsection still works21180
+Node: General Remarks21386
+Node: CSS classnames22124
+Node: Some Bug Fix Tests27805
+Node: Requirements28543
+Node: Changes28957
+Node: Version29196
+Node: License and Copyright29339
+Node: Author30131

End Tag Table
diff --git a/Master/texmf-dist/doc/man/man1/latex2man.1 b/Master/texmf-dist/doc/man/man1/latex2man.1
index 1c1773fc588..6c3b3a43e44 100644
--- a/Master/texmf-dist/doc/man/man1/latex2man.1
+++ b/Master/texmf-dist/doc/man/man1/latex2man.1
@@ -1,5 +1,5 @@
'\" t
-.\" Manual page created with latex2man on Mi 22. Dez 13:46:36 CET 2010
+.\" Manual page created with latex2man on Do 13. Apr 21:21:18 CEST 2017
.\" NOTE: This file is generated, DO NOT EDIT.
.de Vb
.ft CW
@@ -10,7 +10,7 @@
.fi
..
-.TH "LATEX2MAN" "1" "2010/12/22" "Documentation Tools " "Documentation Tools "
+.TH "LATEX2MAN" "1" "2017/04/13" "Documentation Tools " "Documentation Tools "
.SH NAME
.PP
@@ -161,6 +161,9 @@ is printed.
latex2man.tex
The LaTeX file containing this Man\-page.
.TP
+latex2man.inc
+ A file read with \\input{..} \&.
+.TP
latex2man.sty
The LaTeX package defining the environments and
commands.
@@ -724,7 +727,7 @@ description
environment.
.TP
\\today
-22 December 2010(see also the rcsinfo
+13 April 2017(see also the rcsinfo
LaTeXpackage).
.TP
\\ss,\\"a, ...
@@ -745,6 +748,9 @@ E.g. Ä
becomes &Auml;
in HTML and @"A
in texinfo.
+.TP
+\\input{\&.\&.}
+Read and process the given filename.
.PP
.SS CONDITIONAL TEXT
.PP
@@ -1293,24 +1299,26 @@ manually.
.TP
LaTeX LaTeX2e is required.
.PP
+.\" *********************************** start of \input{latex2man.inc}
.SH CHANGES
Please check the file \fBlatex2man\-CHANGES\fP
for the list of changes and
acknowledgment to people contributing bugfixes or enhancements.
.PP
+.\" *********************************** end of \input{latex2man.inc}
.SH VERSION
.PP
-Version: 1.24 of 2010/12/22\&.
+Version: 1.25 of 2017/04/13\&.
.PP
.SH LICENSE AND COPYRIGHT
.PP
.TP
Copyright
-(C)1998, Dr. Jürgen Vollmer, Viktoriastraße 15,
-D\-76133 Karlsruhe, Germany,
+(C)1998, Dr. Jürgen Vollmer, Am Rennbuckel 21,
+D\-76185 Karlsruhe, Germany,
.br
\fBJuergen.Vollmer@informatik\-vollmer.de\fP
.PP
@@ -1337,9 +1345,9 @@ the place where you are living.
.PP
Dr. Jürgen Vollmer
.br
-Viktoriastraße 15
+Am Rennbuckel 21
.br
-D\-76133 Karlsruhe
+D\-76185 Karlsruhe
.br
Email: \fBJuergen.Vollmer@informatik\-vollmer.de\fP
.br
diff --git a/Master/texmf-dist/doc/man/man1/latex2man.man1.pdf b/Master/texmf-dist/doc/man/man1/latex2man.man1.pdf
index f302e1fd86f..8021aa7a338 100644
--- a/Master/texmf-dist/doc/man/man1/latex2man.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/latex2man.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latex2man/CHANGES b/Master/texmf-dist/doc/support/latex2man/CHANGES
index c618553f980..45a1abaca79 100644
--- a/Master/texmf-dist/doc/support/latex2man/CHANGES
+++ b/Master/texmf-dist/doc/support/latex2man/CHANGES
@@ -2,7 +2,8 @@
Change history of the latex2man package
=======================================
-$Id: CHANGES,v 1.64 2010/12/22 09:31:06 vollmer Exp $
+$Id: CHANGES,v 1.65 2017/04/13 14:34:26 vollmer Exp $
+1.25 13 Apr 2017 - Handle \input{filename} macro.
1.24 21 Dec 2010 - Thanks to "Tom Brand" <tbrand@manumit-systems.com>,
who added the CSS support to the HTML generation procedure.
1.23 11 Nov 2008 - use /usr/bin/env to locate the perl interpreter
@@ -105,4 +106,3 @@ $Id: CHANGES,v 1.64 2010/12/22 09:31:06 vollmer Exp $
1.1 14 Jan 1998 - Fixed bug in HTML generation (no blanks emited
after \hline)
1.0 11 Jan 1998 - Initial version
-
diff --git a/Master/texmf-dist/doc/support/latex2man/INSTALL b/Master/texmf-dist/doc/support/latex2man/INSTALL
index be092740e3f..b21e80feb51 100644
--- a/Master/texmf-dist/doc/support/latex2man/INSTALL
+++ b/Master/texmf-dist/doc/support/latex2man/INSTALL
@@ -28,6 +28,7 @@ That's it.
The following files should be part of this package:
latex2man/latex2man
latex2man/latex2man.tex
+ latex2man/latex2man.inc
latex2man/latex2man.cfg
latex2man/latex2man.sty
latex2man/latex2man.trans
@@ -46,5 +47,4 @@ The following files should be part of this package:
Juergen
-$Id: INSTALL,v 1.8 2010/12/22 09:32:31 vollmer Exp $
-
+$Id: INSTALL,v 1.9 2017/04/13 14:54:19 vollmer Exp $
diff --git a/Master/texmf-dist/doc/support/latex2man/Makefile b/Master/texmf-dist/doc/support/latex2man/Makefile
index 8a957ff4507..46addf65c52 100644
--- a/Master/texmf-dist/doc/support/latex2man/Makefile
+++ b/Master/texmf-dist/doc/support/latex2man/Makefile
@@ -1,7 +1,7 @@
# Project: Documentation Tools
# Descr: Latex --> MAN-page (groff -man), Makefile
# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
-# $Id: Makefile,v 1.110 2010/12/22 12:46:25 vollmer Exp $
+# $Id: Makefile,v 1.121 2017/04/13 14:47:10 vollmer Exp $
BASE = latex2man
@@ -23,8 +23,8 @@ EX = --exclude "*.o" --exclude core --exclude "*.tar.gz" --exclude "*~" \
--exclude "*.a" --exclude "*.php"
EXrcs = $(EX) --exclude "*/RCS/*" --exclude "*/RCS"
-VERSION = 1.24
-V_DATE = 2010/12/22
+VERSION = 1.25
+V_DATE = 2017/04/13
latex2man = ./latex2man
D = $
@@ -43,12 +43,13 @@ all: $(BASE).1 $(BASE).html $(BASE).texi $(BASE).info $(BASE).txt $(BASE).pdf
dvips -o $*.ps $*.dvi
%.pdf: %.tex
- rm -f /tmp/$*.tex /tmp/$*.pdf /tmp/$*.aux /tmp/$*.toc /tmp/$*.log /tmp/$*.sty
- (cp $*.tex $*.sty /tmp && \
- cd /tmp && \
- pdflatex $*.tex && \
- pdflatex $*.tex);
- mv /tmp/$*.pdf .
+ T=/tmp/$*-$$$$; mkdir $$T && \
+ ( \
+ cp $*.tex $*.sty $*.inc $$T && \
+ cd $$T && \
+ pdflatex $*.tex && \
+ pdflatex $*.tex); \
+ mv $$T/$*.pdf .
%.info: %.texi
makeinfo $*.texi
@@ -170,7 +171,7 @@ src-tar:
dist:
rm -f THIS-IS-VERSION-*
- @- co -l latex2man latex2man.tex latex2man.sty README
+ @- co -l latex2man latex2man.tex latex2man.inc latex2man.sty README
@rm -f .xxx; cp latex2man .xxx
@sed < .xxx -e 's/$VERSION = .*/$VERSION = "$(VERSION)";/' > latex2man
@rm -f .xxx; cp latex2man.tex .xxx
@@ -184,7 +185,7 @@ dist:
rm -f .xxx; cp README .xxx
@sed < .xxx -e 's/^VERSION:.*/VERSION: $(VERSION)/' > README
@rm -f .xxx
- ci -u -m"Distribution" latex2man latex2man.tex latex2man.sty README
+ ci -u -m"Distribution" latex2man latex2man.tex latex2man.inc latex2man.sty README
- $(MAKE) realclean all
@echo "VERSION $(VERSION) DATE=$(V_DATE)" > THIS-IS-VERSION-$(VERSION)
@cd ..; tar $(EXrcs) -czvf $(BASE)/$(TAR_DIST) \
@@ -224,4 +225,3 @@ diff:
@echo
for i in RCS/* ; do [ -f `basename $$i ,v` ] && rcsdiff -q $$i; done
@echo
-
diff --git a/Master/texmf-dist/doc/support/latex2man/README b/Master/texmf-dist/doc/support/latex2man/README
index 66a025d7857..83d78f640b4 100644
--- a/Master/texmf-dist/doc/support/latex2man/README
+++ b/Master/texmf-dist/doc/support/latex2man/README
@@ -1,7 +1,9 @@
latex2man
=========
-
+
+-*- coding: utf-8 -*-
+
Latex2man is a tool to translate UNIX manual pages written with LaTeX into
the troff format understood by the UNIX man(1)-command.
Alternatively HTML, TexInfo, or LaTeX code can be produced too.
@@ -15,12 +17,12 @@ Requirements:
- Latex2man requires Perl version >= 5.0004_03.
- LaTeX2e
-VERSION: 1.24
+VERSION: 1.25
Author and Copyright (c) 1998:
- Dr. Jürgen Vollmer
- Viktoriastraße 15
- D-76133 Karlsruhe
+ Dr. Jürgen Vollmer
+ Am Rennbuckel 21
+ D-76185 Karlsruhe
Email: <Juergen.Vollmer@informatik-vollmer.de>
License:
@@ -31,4 +33,4 @@ License:
If you find this software useful, please send me a postcard.
-$Id: README,v 1.63 2010/12/22 09:33:29 vollmer Exp $
+$Id: README,v 1.66 2017/04/13 19:20:00 vollmer Exp $
diff --git a/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.24 b/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.24
deleted file mode 100644
index 2835670c8a8..00000000000
--- a/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.24
+++ /dev/null
@@ -1 +0,0 @@
-VERSION 1.24 DATE=2010/12/22
diff --git a/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.25 b/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.25
new file mode 100644
index 00000000000..42e245b63be
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latex2man/THIS-IS-VERSION-1.25
@@ -0,0 +1 @@
+VERSION 1.25 DATE=2017/04/13
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man-CHANGES.html b/Master/texmf-dist/doc/support/latex2man/latex2man-CHANGES.html
index 5adcc6c1109..6036b416c61 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man-CHANGES.html
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man-CHANGES.html
@@ -7,7 +7,8 @@
Change history of the latex2man package
=======================================
-$Id: CHANGES,v 1.64 2010/12/22 09:31:06 vollmer Exp $
+$Id: CHANGES,v 1.65 2017/04/13 14:34:26 vollmer Exp $
+1.25 13 Apr 2017 - Handle \input{filename} macro.
1.24 21 Dec 2010 - Thanks to "Tom Brand" &lt;tbrand@manumit-systems.com&gt;,
who added the CSS support to the HTML generation procedure.
1.23 11 Nov 2008 - use /usr/bin/env to locate the perl interpreter
@@ -110,5 +111,4 @@ $Id: CHANGES,v 1.64 2010/12/22 09:31:06 vollmer Exp $
1.1 14 Jan 1998 - Fixed bug in HTML generation (no blanks emited
after \hline)
1.0 11 Jan 1998 - Initial version
-
</pre></body><html>
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.html b/Master/texmf-dist/doc/support/latex2man/latex2man.html
index fb979503a37..3db38c79faa 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.html
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.html
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- Manual page created with latex2man on Mi 22. Dez 13:46:36 CET 2010
+<!-- Manual page created with latex2man on Do 13. Apr 21:21:18 CEST 2017
** Author of latex2man: Juergen.Vollmer@informatik-vollmer.de
** NOTE: This file is generated, DO NOT EDIT. -->
<html>
@@ -11,8 +11,8 @@ LaTeX2man -<br>
A Documentation Tool
</h1>
<h4 class="authorhead">Dr.&nbsp;J&uuml;rgen Vollmer </h4>
-<h4 class="datehead">2010/12/22</h4>
-<h4 class="versionhead">Version 1.24</h4>
+<h4 class="datehead">2017/04/13</h4>
+<h4 class="versionhead">Version 1.25</h4>
<p>
<font class="progname">Latex2man</font>
is a tool to translate UNIX manual pages written with
@@ -200,6 +200,10 @@ is printed.
</dt>
<dd> The LaTeX file containing this Man-page.
</dd>
+<dt><font class="filename">latex2man.inc</font>
+</dt>
+<dd> A file read with <tt>\input{..}</tt> .
+</dd>
<dt><font class="filename">latex2man.sty</font>
</dt>
<dd> The LaTeX package defining the environments and
@@ -776,7 +780,7 @@ or
environment.
</dd>
<dt>\today</dt>
-<dd> 22 December 2010 (see also the <tt>rcsinfo</tt>
+<dd> 13 April 2017 (see also the <tt>rcsinfo</tt>
LaTeXpackage).
</dd>
<dt>\ss,\"a, ...</dt>
@@ -798,6 +802,9 @@ becomes <tt>&amp;Auml</tt>;
in HTML and <tt>@"A</tt>
in texinfo.
</dd>
+<dt>\input{..}</dt>
+<dd> Read and process the given filename.
+</dd>
</dl>
<p>
<h4 class="subsectionname"><a name="section_13">Conditional Text</a></h4>
@@ -1328,24 +1335,26 @@ manually.
</dd>
</dl>
<p>
+<!-- *********************************** start of \input{latex2man.inc} -->
<h2 class="sectionname"><a name="section_23">Changes</a></h2>
Please check the file <a class="urlstyle" href ="latex2man-CHANGES.html"><tt>latex2man-CHANGES.html</tt></a>
for the list of changes and
acknowledgment to people contributing bugfixes or enhancements.
+<!-- *********************************** end of \input{latex2man.inc} -->
<p>
<h2 class="sectionname"><a name="section_24">Version</a></h2>
<p>
-Version: 1.24 of 2010/12/22.
+Version: 1.25 of 2017/04/13.
<p>
<h2 class="sectionname"><a name="section_25">License and Copyright</a></h2>
<p>
<dl compact>
<dt>Copyright</dt>
-<dd> &copy; 1998, Dr.&nbsp;J&uuml;rgen Vollmer, Viktoriastra&szlig;e 15,
-D-76133 Karlsruhe, Germany,<br>
+<dd> &copy; 1998, Dr.&nbsp;J&uuml;rgen Vollmer, Am Rennbuckel 21,
+D-76185 Karlsruhe, Germany,<br>
<a class="emailstyle" href ="mailto:Juergen.Vollmer@informatik-vollmer.de">Juergen.Vollmer@informatik-vollmer.de</a>
<p>
@@ -1374,9 +1383,9 @@ the place where you are living.
<p>
Dr.&nbsp;J&uuml;rgen Vollmer <br>
-Viktoriastra&szlig;e 15 <br>
+Am Rennbuckel 21 <br>
-D-76133 Karlsruhe <br>
+D-76185 Karlsruhe <br>
Email: <a class="emailstyle" href ="mailto:Juergen.Vollmer@informatik-vollmer.de">Juergen.Vollmer@informatik-vollmer.de</a>
<br>
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.pdf b/Master/texmf-dist/doc/support/latex2man/latex2man.pdf
index 2d85ef399c3..52ef3b2e337 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.pdf
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.tex b/Master/texmf-dist/doc/support/latex2man/latex2man.tex
index 5d1c5fa19df..5dbd448756b 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.tex
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.tex
@@ -2,7 +2,7 @@
%% Project: Documentation Tools
%% Descr: Latex --> MAN-page (groff -man), LATEX documentation
%% Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
-%% $Id: latex2man.tex,v 1.191 2010/12/22 11:54:49 vollmer Exp $
+%% $Id: latex2man.tex,v 1.196 2017/04/13 14:46:35 vollmer Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Latex2man is a tool to translate UNIX manual pages written with LaTeX into a
@@ -15,7 +15,7 @@
%% and a PERL script (latex2man) doing the actual translation.
%%
%% Copyright (C) 1998, Dr. Juergen Vollmer
-%% Viktoriastrasse 15, D-76133 Karlsruhe, Germany
+%% Am Rennbuckel 21, D-76185 Karlsruhe, Germany
%% Juergen.Vollmer@informatik-vollmer.de
%% License:
%% This program can be redistributed and/or modified under the terms
@@ -53,15 +53,15 @@
%% do we have the `rcsinfo' package?
\IfFileExists{rcsinfo.sty}{
\usepackage[nofancy]{rcsinfo}
-\rcsInfo $Id: latex2man.tex,v 1.191 2010/12/22 11:54:49 vollmer Exp $
+\rcsInfo $Id: latex2man.tex,v 1.196 2017/04/13 14:46:35 vollmer Exp $
\setDate{\rcsInfoLongDate}
}{
-\setDate{2010/12/22} %%%% must be manually set, if rcsinfo is not present
+\setDate{2017/04/13} %%%% must be manually set, if rcsinfo is not present
\message{package rcsinfo not present, discard it}
}
\setVersionWord{Version:} %%% that's the default, no need to set it.
-\setVersion{1.24}
+\setVersion{1.25}
\begin{document}
@@ -151,6 +151,7 @@ Using the \Opt{-L} option, \LaTeX\ ouput can be produced, instead of
\begin{Description}\setlength{\itemsep}{0cm}
\item[\File{latex2man.tex}] The \LaTeX\ file containing this Man-page.
+\item[\File{latex2man.inc}] A file read with \verb+\input{..}+ .
\item[\File{latex2man.sty}] The \LaTeX\ package defining the environments and
commands.
\item[\File{latex2man.cfg}] The configuration file for \Prog{Latex2man}
@@ -456,6 +457,7 @@ The following standard \LaTeX\ commands are accepted:
translated into the equivalent letter of the desired output format.
E.g. \texttt{Ä} becomes \texttt{\&Auml}; in HTML and \texttt{@"A}
in texinfo.
+\item[\Bs input\{..\}] Read and process the given filename.
\end{description}
\subsection{Conditional Text}
@@ -759,19 +761,9 @@ but ignore comments following this: % this should be ignored
\item[\LaTeX] \LaTeX 2e is required.
\end{description}
-\section{Changes}
-%@% IF LATEX %@%
-{\small\verbatiminput{CHANGES}}
-%@% ELSE %@%
-%@% IF HTML %@%
-Please check the file \URL{latex2man-CHANGES.html} for the list of changes and
-acknowledgment to people contributing bugfixes or enhancements.
-%@% ELSE %@%
-Please check the file \URL{latex2man-CHANGES} for the list of changes and
-acknowledgment to people contributing bugfixes or enhancements.
-
-%@% END-IF %@%
-%@% END-IF %@%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\input{latex2man.inc}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Version}
%%%%%%%%%%%%%%%%%
@@ -782,8 +774,8 @@ Version: \Version\ of \Date.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{description}
-\item[Copyright] \copyright\ 1998, Dr.~Jürgen Vollmer, Viktoriastraße 15,
- D-76133 Karlsruhe, Germany,\\
+\item[Copyright] \copyright\ 1998, Dr.~Jürgen Vollmer, Am Rennbuckel 21,
+ D-76185 Karlsruhe, Germany,\\
\Email{Juergen.Vollmer@informatik-vollmer.de}
@@ -804,8 +796,8 @@ Version: \Version\ of \Date.
\noindent
Dr.~Jürgen Vollmer \\
-Viktoriastraße 15 \\
-D-76133 Karlsruhe \\
+Am Rennbuckel 21 \\
+D-76185 Karlsruhe \\
Email: \Email{Juergen.Vollmer@informatik-vollmer.de} \\
WWW: \URL{http://www.informatik-vollmer.de}.
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.texi b/Master/texmf-dist/doc/support/latex2man/latex2man.texi
index d299fa1907f..faa01bb6e91 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.texi
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.texi
@@ -3,7 +3,7 @@
@setfilename latex2man.info
@settitle latex2man
@c %**end of header
-@c Manual page created with latex2man on Mi 22. Dez 13:46:37 CET 2010>
+@c Manual page created with latex2man on Do 13. Apr 21:21:18 CEST 2017>
@c NOTE: This file is generated, DO NOT EDIT.
@dircategory Man-pages
@direntry
@@ -179,6 +179,8 @@ Show version information.
@table @samp
@item @file{latex2man.tex}
The LaTeX file containing this Man-page.
+@item @file{latex2man.inc}
+A file read with @t{\input@{..@}} .
@item @file{latex2man.sty}
The LaTeX package defining the environments and
commands.
@@ -644,7 +646,7 @@ or
@t{description}
environment.
@item \today
-22 December 2010(see also the @t{rcsinfo}
+13 April 2017(see also the @t{rcsinfo}
LaTeXpackage).
@item \ss,\"a, ...
\ss = @ss{}, \"a= @"a, \"o= @"o, \"u= @"u,
@@ -663,6 +665,8 @@ E.g. @t{@"A}
becomes @t{&Auml};
in HTML and @t{@@"A}
in texinfo.
+@item \input@{..@}
+Read and process the given filename.
@end table
@node Conditional Text, Translation of User Defined Macros, Accepted LaTeX Macros, Top
@@ -1063,6 +1067,7 @@ manually.
LaTeX2e is required.
@end table
+@c *********************************** start of \input{latex2man.inc}
@node Changes, Version, Requirements, Top
@section Changes
@@ -1070,11 +1075,12 @@ Please check the file @url{latex2man-CHANGES}
for the list of changes and
acknowledgment to people contributing bugfixes or enhancements.
+@c *********************************** end of \input{latex2man.inc}
@node Version, License and Copyright, Changes, Top
@section Version
-Version: 1.24 of 2010/12/22.
+Version: 1.25 of 2017/04/13.
@node License and Copyright, Author, Version, Top
@section License and Copyright
@@ -1082,8 +1088,8 @@ Version: 1.24 of 2010/12/22.
@table @samp
@item Copyright
-@copyright{}1998, Dr. J@"urgen Vollmer, Viktoriastra@ss{}e 15,
-D-76133 Karlsruhe, Germany,@*
+@copyright{}1998, Dr. J@"urgen Vollmer, Am Rennbuckel 21,
+D-76185 Karlsruhe, Germany,@*
@email{Juergen.Vollmer@@informatik-vollmer.de}
@@ -1112,9 +1118,9 @@ the place where you are living.
Dr. J@"urgen Vollmer @*
-Viktoriastra@ss{}e 15 @*
+Am Rennbuckel 21 @*
-D-76133 Karlsruhe @*
+D-76185 Karlsruhe @*
Email: @email{Juergen.Vollmer@@informatik-vollmer.de}
@*
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.trans b/Master/texmf-dist/doc/support/latex2man/latex2man.trans
index 2b77cc2fc21..a3e9ec3f8ff 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.trans
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.trans
@@ -2,8 +2,8 @@
# Project: Documentation Tools
# Descr: Latex --> MAN-page (groff -man), and HTML; example of user macro
# translations
-# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@acm.org
-# $Id: latex2man.trans,v 1.2 1998/01/03 17:06:52 vollmer Exp $
+# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
+# $Id: latex2man.trans,v 1.3 2017/04/11 18:30:56 vollmer Exp $
#################################################################################
#################################################################################
diff --git a/Master/texmf-dist/doc/support/latex2man/latex2man.txt b/Master/texmf-dist/doc/support/latex2man/latex2man.txt
index 32ed428840b..652cf610552 100644
--- a/Master/texmf-dist/doc/support/latex2man/latex2man.txt
+++ b/Master/texmf-dist/doc/support/latex2man/latex2man.txt
@@ -9,12 +9,10 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
the text may be suppressed using the conditional text feature (for
this, LaTeX generation may be used).
-
[1mSYNOPSIS[0m
latex2man [[1m-t[4m[22mtransfile[24m] [[1m-c[4m[22mCSSfile[24m] [[1m-HMTL[22m] [[1m-h[22m] [[1m-V[22m] [[1m-C[4m[22mname[24m] [[1m-a[4m[22mchar[24m]
[4minfile[24m [4moutfile[0m
-
[1mDESCRIPTION[0m
Latex2man reads the file [4minfile[24m and writes [4moutfile[24m. The input must be
a LaTeX document using the latex2man LaTeXpackage. Latex2man trans-
@@ -31,8 +29,7 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
Using the [1m-M [22moption, [4mtroff[24m(1) input is produced.
- Using the [1m-L [22moption, LaTeX ouput can be produced, instead of [4mtroff[24m(1).
-
+ Using the [1m-L [22moption, LaTeX ouput can be produced, instead of [4mtroff[24m(1).
[1mOPTIONS[0m
[1m-t[4m[22mtransfile[0m
@@ -43,22 +40,27 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
style sheets. The link to the CSS file is inserted into the gen-
eratedHTML output using the specified [4mCSSfile[24m filename.
- [1m-M [22mProduce output suitable for the [4mman[24m(1) command (default).
+ [1m-M[0m
+ Produce output suitable for the [4mman[24m(1) command (default).
- [1m-H [22mInstead of producing output suitable for the [4mman[24m(1) command,
+ [1m-H[0m
+ Instead of producing output suitable for the [4mman[24m(1) command,
HTML code is produced (despite the name of the command).
- [1m-T [22mInstead of producing output suitable for the [4mman[24m(1) command,
+ [1m-T[0m
+ Instead of producing output suitable for the [4mman[24m(1) command,
TexInfo code is produced (despite the name of the command). The
generated .texi-file may be processed with [4mmakeinfo[24m(1) (to pro-
duce an .info-file) which in turn may be installed using
[4minstall-info[24m(1). The Info tags @dircategory and @direntry are
provided.
- [1m-L [22mThe LaTeX source is written to the [4moutfile[24m. This is useful in
+ [1m-L[0m
+ The LaTeX source is written to the [4moutfile[24m. This is useful in
conjunction with the [1m-C[4m[22mname[24m option.
- [1m-C[4m[22mname[24m Output the conditional text for [4mname[24m. If more than one name
+ [1m-C[4m[22mname[0m
+ Output the conditional text for [4mname[24m. If more than one name
should be given use quotes: [1m-C[4m[22m'name1[24m [4mname2[24m [4m...'[0m
The following names are defined automatically:
@@ -70,8 +72,8 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
[1m* -L [22mdefines LATEX
-
- [1m-a[4m[22mchar[24m Is used only in conjunction with -T.
+ [1m-a[4m[22mchar[0m
+ Is used only in conjunction with -T.
Background:
TexInfo ignores all blanks before the first word on a new line.
In order to produce some additional space before that word
@@ -81,15 +83,19 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
supresses the indentation of a line.
Note: only for the first \SP of a series that [4mchar[24m is printed.
- [1m-h [22mShow a help text.
-
- [1m-V [22mShow version information.
+ [1m-h[0m
+ Show a help text.
+ [1m-V[0m
+ Show version information.
[1mFILES[0m
latex2man.tex
The LaTeX file containing this Man-page.
+ latex2man.inc
+ A file read with \input{..} .
+
latex2man.sty
The LaTeX package defining the environments and commands.
@@ -113,25 +119,20 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
A LaTeX package used to extract and use RCS version control
information in LaTeX documents.
-
[1mlatex2man.pdf[0m
The PDF version of this document.
-
[1mSEE ALSO[0m
LaTeX,TexInfo, [4mtroff[24m(1), [4mgroff[24m(1), [4mmakeinfo[24m(1).
-
[1mLaTeX COMMANDS[0m
The LaTeX package latex2man is used to write the Man-pages with
LaTeX.Since we translate into other text formats, not all LaTeX stuff
can be translated.
-
[1mPACKAGE OPTIONS[0m
The latex2man package accepts the following options:
-
fancy use the LaTeX package fancyheadings.
fancyhdr
@@ -142,7 +143,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
The default option may be specified in the file latex2man.cfg.
-
[1mPACKAGE SPECIFIC ENVIRONMENTS[0m
The following environments are provided by the package:
@@ -170,7 +170,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
will be typeset as:
-
Here am I
----------------------
A 1 A 2 A 3 1 2
@@ -207,22 +206,18 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
abc |abc
-
a |a \begin{Description}
ab |ab
abc |abc
-
a |a \begin{Description}[aa]
ab |ab
abc |abc
-
-
[1mACCEPTED LaTeX ENVIRONMENTS[0m
The following environments are accepted:
@@ -249,8 +244,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
2. b
-
-
[1mPACKAGE SPECIFIC MACROS[0m
The following commands are provided:
@@ -379,7 +372,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
Note: Due to some ``problems'' with TexInfo, the lines starting with
\SP have a leading . (dot) in the TexInfo output, see [1m-a[4m[22mchar[24m.
-
[1mACCEPTED MACROS FROM THE RCSINFO PACKAGE[0m
\rcsInfo $Id ...$
if the LaTeX package rcsinfo is used, this command is used to
@@ -389,7 +381,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
if the LaTeX package rcsinfo is used, this command is used to
typeset the date coded in the $Id ..$ string.
-
[1mACCEPTED LaTeX MACROS[0m
The following standard LaTeX commands are accepted:
@@ -496,7 +487,7 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
\item inside a itemize, enumerate, or description environment.
- \today 22 December 2010(see also the rcsinfo LaTeXpackage).
+ \today 13 April 2017(see also the rcsinfo LaTeXpackage).
\ss,\"a, ...
\ss = ß, \"a= ä, \"o= ö, \"u= ü, \"A= Ä, \"O= Ö, \"U= Ü. It is
@@ -513,6 +504,8 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
translated into the equivalent letter of the desired output format.
E.g. Ä becomes &Auml; in HTML and @"A in texinfo.
+ \input{..}
+ Read and process the given filename.
[1mCONDITIONAL TEXT[0m
latex2man preprocesses the LaTeX input to allow text to be used condi-
@@ -533,8 +526,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
``else''-part is skipped (and vice versa). The IF/ELSE/END-IF may be
nested. As boolean operators the following are allowed:
-
-
( and ) for grouping are allowed.
For example:
@@ -562,11 +553,14 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
To check the conditional text feature, when latex2man is called with
- [1m-C[4m[22mHTML[24m the lines 1a, 2b, 3b, and 4b;
+ [1m-C[4m[22mHTML[0m
+ the lines 1a, 2b, 3b, and 4b;
- [1m-C[4m[22mTEXI[24m the lines 1b, 2a, 3b, and 4b;
+ [1m-C[4m[22mTEXI[0m
+ the lines 1b, 2a, 3b, and 4b;
- [1m-C[4m[22mMAN[24m the lines 1b, 2b, 3a, and 4b;
+ [1m-C[4m[22mMAN[0m
+ the lines 1b, 2b, 3a, and 4b;
[1m-C[4m[22mLATEX[0m
the lines 1b, 2b, 3b, and 4a;
@@ -584,14 +578,12 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
4b. The LATEX conditional was not set.
-
[1mTRANSLATION OF USER DEFINED MACROS[0m
The user macro translation file (given by the [[1m-t[4m[22mtransfile[24m]) contains
Perl commands specifying the translation of LaTeX macros defined by the
user. These macros may have none, one or two arguments. The following
code is expected:
-
[1m* [22mComments start with a # up to the end of the line.
[1m* [22mFor a macro \foo with no arguments, the following code must be
@@ -608,7 +600,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
where ... is the translation.
-
[1m* [22mFor a macro \foo{..} with one argument, the following code must
be specified:
@@ -620,7 +611,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
$htmlMacro1a{'foo'} = '...';
$htmlMacro1b{'foo'} = '...';
-
Translation to TexInfo
$texiMacro1a{'foo'} = '...';
$texiMacro1b{'foo'} = '...';
@@ -628,7 +618,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
where ... is the translation. The 1a code is used before the
argument, while 1b is typeset after the argument is set.
-
[1m* [22mFor a macro \foo{..}{..} with two arguments, the following code
must be specified:
@@ -653,7 +642,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
[1m* [22mThe file latex2man.trans contains some example code.
-
[1mVERBATIM ENVIRONMENT[0m
This
{is}
@@ -664,19 +652,15 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
<this is no HTML tag> and no @* TexInfo command
-
[1mSUBSECTION WORKS[0m
This is a \subsection.
-
[1mSubsubsection works[0m
This is a \subsubsection.
-
[1mSubsubsection still works[0m
This is another \subsubsection.
-
[1mGENERAL REMARKS[0m
1. Empty lines are typeset as paragraph separators.
@@ -695,13 +679,11 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
you need GNU-make. If you don't have it, you should execute the
steps shown in the Makefile manually.
-
[1mCSS CLASSNAMES[0m
The table below shows the names of CSS classes that will be included in
the HTML tags as attributes. You can specify the CSS style properties
in the [4mCSSfile[24m for these classes:
-
[1mHTML tag Class Style applies to[0m
body the body of the HTML page
h1 titlehead the title at the top of the HTML
@@ -756,7 +738,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
td cellstyle a cell of a table specified as a
[4mTable[24m environment
-
[1mSOME BUG FIX TESTS[0m
Leading . and '
Now leading . and ' in generation troff output should work prop-
@@ -773,7 +754,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
abc ... abc . efg ' 123
-
%in verbatim
A % in a \verb and verbatim-environment was not emitted cor-
rectly. Thanks to Aleksey Nogin [1mnogin@cs.caltech.edu [22mfor the bug
@@ -786,7 +766,6 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
but ignore comments following this:
-
[1mREQUIREMENTS[0m
Perl latex2man requires Perl version >= 5.0004_03.
@@ -796,45 +775,36 @@ LATEX2MAN(1) Documentation Tools LATEX2MAN(1)
LaTeX LaTeX2e is required.
-
[1mCHANGES[0m
Please check the file [1mlatex2man-CHANGES [22mfor the list of changes and
acknowledgment to people contributing bugfixes or enhancements.
-
[1mVERSION[0m
- Version: 1.24 of 2010/12/22.
-
+ Version: 1.25 of 2017/04/13.
[1mLICENSE AND COPYRIGHT[0m
Copyright
- (C)1998, Dr. Jürgen Vollmer, Viktoriastraße 15, D-76133 Karl-
- sruhe, Germany,
+ (C)1998, Dr. Jürgen Vollmer, Am Rennbuckel 21, D-76185 Karls-
+ ruhe, Germany,
[1mJuergen.Vollmer@informatik-vollmer.de[0m
The actual version of Latex2man may be found on my homepage
[1mhttp://www.informatik-vollmer.de/software/latex2man.html[22m.
-
License
This program can be redistributed and/or modified under the
terms of the LaTeX Project Public License Distributed from CTAN
archives in directory macros/latex/base/lppl.txt; either version
1 of the License, or any later version.
-
Misc If you find this software useful, please send me a postcard from
the place where you are living.
-
[1mAUTHOR[0m
Dr. Jürgen Vollmer
- Viktoriastraße 15
- D-76133 Karlsruhe
+ Am Rennbuckel 21
+ D-76185 Karlsruhe
Email: [1mJuergen.Vollmer@informatik-vollmer.de[0m
WWW: [1mhttp://www.informatik-vollmer.de[22m.
-
-
-
-Documentation Tools 2010/12/22 LATEX2MAN(1)
+Documentation Tools 2017/04/13 LATEX2MAN(1)
diff --git a/Master/texmf-dist/scripts/latex2man/latex2man b/Master/texmf-dist/scripts/latex2man/latex2man
index 5987a8c8c0c..52e741e475c 100755
--- a/Master/texmf-dist/scripts/latex2man/latex2man
+++ b/Master/texmf-dist/scripts/latex2man/latex2man
@@ -3,10 +3,10 @@
# Descr: Latex --> MAN-page (groff -man), HTML and TexInfo;
# Language: PERL (>= 5.0)
# Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
-# $Id: latex2man,v 1.156 2010/12/22 12:44:30 vollmer Exp $
+# $Id: latex2man,v 1.163 2017/04/13 14:25:56 vollmer Exp $
#
# Copyright (C) 1998 Dr. Juergen Vollmer
-# Viktoriastrasse 15, D-76133 Karlsruhe, Germany
+# Am Rennbuckel 21, D-76185 Karlsruhe, Germany
# Juergen.Vollmer@informatik-vollmer.de
# License:
# This program can be redistributed and/or modified under the terms
@@ -26,8 +26,8 @@ $CMD=`basename $0`; chop ($CMD);
$gen_date = `date`; chomp $gen_date; # date when the output was generated
sub date2str;
-$VERSION = "1.24";
-$DATE = date2str ('$Date: 2010/12/22 12:44:30 $' =~ m|(\d+/\d+/\d+)|);
+$VERSION = "1.25";
+$DATE = date2str ('$Date: 2017/04/13 14:25:56 $' =~ m|(\d+/\d+/\d+)|);
$tmp = "/tmp/$CMD.$$";
@@ -69,13 +69,13 @@ usage: latex2man [-t transfile] [-c cssfile] [-HTML] [-C name] [-h] [-V] infile
new line. In order to produce some additional space before
that word (using \SP) some character has to be printed
before the additional space. By default this is a . (dot).
- The \`char' specifies an alternative for that first character.
+ The 'char' specifies an alternative for that first character.
Giving a blank (-a" ") supresses the indentation of a line.
Note: only for the first \SP of a series that char is printed.
-h: Help.
-V: Version.
- Copyright (C) 1998 Dr. Jürgen Vollmer, Viktoriastr. 15, D-76133 Karlsruhe
+ Copyright (C) 1998 Dr. Jürgen Vollmer, Am Rennbuckel 21, D-76185 Karlsruhe
email: Juergen.Vollmer@informatik-vollmer.de
License:
This program can be redistributed and/or modified under the terms
@@ -119,16 +119,8 @@ $cond_name{HTML} = 1 if ($opt_H);
$cond_name{TEXI} = 1 if ($opt_T);
$cond_name{LATEX} = 1 if ($opt_L);
-
$SrcFile = $ARGV[0];
$DestFile = $ARGV[1];
-open (SRC, "<$SrcFile") || die "$CMD: Can't open file \`$SrcFile' for reading.\n";
-if ($opt_H || $opt_T) {
- # DestFile will be written in the postprocess
- open (DEST, ">$tmp") || die "$CMD: Can't open file \`$tmp' for writing.\n";
-} else {
- open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
-}
########################################################################
@@ -642,13 +634,6 @@ $texiMacro2a{'setlength'} = '';
$texiMacro2c{'setlength'} = '';
########################################################################
-# reading of translations for user macros
-
-if ($opt_t) {
- do $opt_t;
-}
-
-########################################################################
# processing for MAN
sub manStart
@@ -665,10 +650,12 @@ sub manStart
Print "\" \""; interpret_word "$tool"; Print "\""; NL;
# thanks to Andrew Anderson <aja@emulab.ee.mu.oz.au>
}
+
sub manEnd
{
NL; printf DEST ".\\\" NOTE: This file is generated, DO NOT EDIT.\n";
}
+
sub manSection
{
my ($cnt, $kind, $section) = @_;
@@ -677,6 +664,7 @@ sub manSection
}
interpret_line "\\$kind\{$section\}";
}
+
sub manParagraph
{
if (!$paragraph) {
@@ -688,12 +676,14 @@ sub manParagraph
$paragraph = 1;
}
}
+
sub manVerb
{
my $arg = $_[0];
if ($arg =~ /^\./) { print DEST '\\&' };
Print $arg
}
+
sub manItemWithArg
{
my $arg = $_[0];
@@ -706,6 +696,7 @@ sub manItemWithArg
PrintM ' ';
NL;
}
+
sub manItem
{
if ($manRS == 1) {
@@ -720,12 +711,14 @@ sub manItem
}
NL;
}
+
sub manDescriptionStart
{
if ($list_nest > 1) {
Print '\n.RS\n';
}
}
+
sub manDescriptionEnd
{
if ($manRS) {
@@ -737,12 +730,14 @@ sub manDescriptionEnd
}
manParagraph;
}
+
sub manItemStart
{
if ($list_nest > 1) {
Print '\n.RS\n';
}
}
+
sub manItemEnd
{
if ($manRS) {
@@ -754,6 +749,7 @@ sub manItemEnd
}
manParagraph;
}
+
sub manEnumEnd
{
if ($manRS) {
@@ -772,22 +768,27 @@ sub manEnumStart
Print '\n.RS\n';
}
}
+
sub manCenterStart
{
PrintM '\n.ce 100\n';
}
+
sub manCenterEnd
{
PrintM '\n.ce 0\n';
}
+
sub manNameStart
{
interpret_line "\\section\{NAME\}$rest";
}
+
sub manNameEnd
{
# nothing
}
+
sub manTableStart
{
my $columns = $_[0];
@@ -802,10 +803,12 @@ sub manTableStart
Print "w($width)" if ($width);
Print '.\n';
}
+
sub manTableSep
{
Print '\nT}&T{\n';
}
+
sub manTableEnd
{
Print '\n.TE\n';
@@ -861,33 +864,40 @@ sub htmlStart
Print "<h4 align=center>Version $version</h4>"; NL;
}
}
+
sub htmlEnd
{
Print "</body>"; NL;
Print "</html>"; NL;
Print "<!-- NOTE: This file is generated, DO NOT EDIT. -->"; NL;
}
+
sub htmlSection
{
my ($cnt, $kind, $section) = @_;
interpret_line "\\$kind\{$cnt\}\{$section\}";
}
+
sub htmlCenterStart
{
Print '\n<div align=center>\n';
}
+
sub htmlCenterEnd
{
Print '\n</div>\n';
}
+
sub htmlNameStart
{
# nothing
}
+
sub htmlNameEnd
{
Print '\n@@INSERTION-POINT@@-TOC@@\n';
}
+
sub htmlParagraph
{
if (!$paragraph) {
@@ -895,6 +905,7 @@ sub htmlParagraph
$paragraph = 1;
}
}
+
sub htmlVerb
{
$arg = $_[0];
@@ -903,6 +914,7 @@ sub htmlVerb
$arg =~ s/</&lt;/g;
Print $arg;
}
+
sub htmlItemWithArg
{
my $arg = $_[0];
@@ -914,6 +926,7 @@ sub htmlItemWithArg
interpret_word $arg; Print "</dt>"; NL;
Print "<dd>";
}
+
sub htmlItem
{
if ($item_nr[$list_nest] > 1) {
@@ -925,30 +938,37 @@ sub htmlItem
Print '<li value =' . $item_nr[$list_nest] .'>';
}
}
+
sub htmlDescriptionStart
{
NL; Print "<dl compact>"; NL;
}
+
sub htmlDescriptionEnd
{
NL; Print "</dd>\n</dl>"; NL;
}
+
sub htmlItemStart
{
NL; Print "<ul compact>"; NL;
}
+
sub htmlItemEnd
{
NL; Print "</li>\n</ul>"; NL;
}
+
sub htmlEnumStart
{
NL; Print "<ol compact>"; NL;
}
+
sub htmlEnumEnd
{
NL; Print "</li>\n</ol>"; NL;
}
+
sub htmlTableStart
{
my $columns = $_[0];
@@ -961,6 +981,7 @@ sub htmlTableStart
}
NL;
}
+
sub htmlTableSep
{
if ($first_column == 0) {
@@ -972,6 +993,7 @@ sub htmlTableSep
Print '<td>';
}
}
+
sub htmlTableEnd
{
NL; Print "</table>"; NL;
@@ -1008,11 +1030,13 @@ sub texiStart
Print '@c Manual page created with' ." $CMD on $gen_date>"; NL;
Print '@c NOTE: This file is generated, DO NOT EDIT.'; NL;
}
+
sub texiEnd
{
Print '@bye'; NL;
Print '@c NOTE: This file is generated, DO NOT EDIT.'; NL;
}
+
sub texiSection
{
my ($cnt, $kind, $section) = @_;
@@ -1029,6 +1053,7 @@ sub texiSection
}
interpret_line "\\$kind\{$section\}";
}
+
sub texiNameStart
{
my ($name, $chapter, $author, $tool) = @_;
@@ -1046,10 +1071,12 @@ sub texiNameStart
Print '\n@@INSERTION-POINT@@-TEXI-TOP@@'; NL;
Print '@top ' . "$name"; NL;
}
+
sub texiNameEnd
{
# nothing
}
+
sub texiParagraph
{
if (!$paragraph) {
@@ -1057,12 +1084,14 @@ sub texiParagraph
$paragraph = 1;
}
}
+
sub texiVerb
{
$arg = $_[0];
$arg =~ s/({|})/\@$1/g;
Print $arg;
}
+
sub texiItemWithArg
{
my $arg = $_[0];
@@ -1070,26 +1099,32 @@ sub texiItemWithArg
interpret_word $arg;
NL;
}
+
sub texiItem
{
Print '\n@item\n';
}
+
sub texiDescriptionStart
{
Print '\n@table @samp\n';
}
+
sub texiDescriptionEnd
{
Print '\n@end table\n';
}
+
sub texiItemStart
{
Print '\n@itemize @bullet\n';
}
+
sub texiItemEnd
{
Print '\n@end itemize\n';
}
+
sub texiCenterStart
{
$texiCenterLine = 1;
@@ -1098,6 +1133,7 @@ sub texiCenterStart
$texiMacro{'TEXIbr'} = '@*';
NL;
}
+
sub texiCenterEnd
{
$texiCenterLine = 0;
@@ -1111,10 +1147,12 @@ sub texiEnumStart
{
Print '\n@enumerate\n';
}
+
sub texiEnumEnd
{
Print '\n@end enumerate\n';
}
+
sub texiTableStart
{
my $columns = $_[0];
@@ -1126,10 +1164,12 @@ sub texiTableStart
}
Print '\n';
}
+
sub texiTableSep
{
Print '@tab ';
}
+
sub texiTableEnd
{
Print '\n@end multitable\n';
@@ -1163,11 +1203,13 @@ sub check_Macro
exists $Macro->{$_[0]} ||
die "Error in line $.: no such macro: \\$_[0]\n";
}
+
sub check_Macro1
{
(exists $Macro1a->{$_[0]} && exists $Macro1b->{$_[0]}) ||
die "$CMD: Error in line $.: no such macro: \\$_[0]\n";
}
+
sub check_Macro2
{
(exists $Macro2a->{$_[0]} && exists $Macro2b->{$_[0]} && exists $Macro2c->{$_[0]}) ||
@@ -1238,7 +1280,7 @@ sub interpret_word
} elsif ($opt_T) {
# handling of TexInfo specific stuff
if ($nesting == 0) {
- s'@'@@'g;
+ s'@'@@'g; #'
}
if ($inside_table == 1) {
if ($first_column == 1) {
@@ -1254,7 +1296,7 @@ sub interpret_word
/^$/ && do {$add_blank = 0;
last SWITCH;
};
- /\\verb\+([^+]*)\+/ && do {$s=$`;$m=$1;$r=$';
+ /\\verb\+([^+]*)\+/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro1a->{'verb'};
&{$Prefix . "Verb"} ($m);
@@ -1262,21 +1304,21 @@ sub interpret_word
interpret_word $r;
last SWITCH;
};
- /\\(".|ss)/ && do {$s=$`;$m=$1;$r=$'; #"
+ /\\(".|ss)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
check_Macro $m;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
- /\\item\s*\[([^]]*)\]/ && do {$s=$`;$m=$1;$r=$';
+ /\\item\s*\[([^]]*)\]/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
$item_nr[$list_nest] ++;
&{$Prefix . "ItemWithArg"} ($m);
interpret_word $r;
last SWITCH;
};
- /\\item\s*/ && do {$s=$`;$r=$';
+ /\\item\s*/ && do {$s=$`;$r=$'; #'
interpret_word $s;
$item_nr[$list_nest] ++;
&{$Prefix . "Item"};
@@ -1285,7 +1327,7 @@ sub interpret_word
};
# LaTeX macros with two arguments
/\\([a-zA-Z]+){([^}]*)}{([^}]*)}/
- && do {$s=$`;$m=$1;$a1=$2;$a2=$3;$r=$';
+ && do {$s=$`;$m=$1;$a1=$2;$a2=$3;$r=$'; #'
check_Macro2 $m;
interpret_word $s;
PrintM $Macro2a->{$m};
@@ -1299,7 +1341,7 @@ sub interpret_word
};
# Special Handling of Email and URL LaTeX macros with one argument
/\\(URL|Email){([^}]*)}/ && ($opt_H)
- && do {$s=$`;$m=$1;$a1=$2;$r=$';
+ && do {$s=$`;$m=$1;$a1=$2;$r=$'; #'
interpret_word $s;
PrintM $Macro2a->{$m};
interpret_word $a1;
@@ -1311,7 +1353,7 @@ sub interpret_word
last SWITCH;
};
# LaTeX macros with one argument
- /\\([a-zA-Z]+){([^}]*)}/ && do {$s=$`;$m=$1;$a1=$2;$r=$';
+ /\\([a-zA-Z]+){([^}]*)}/ && do {$s=$`;$m=$1;$a1=$2;$r=$'; #'
check_Macro1 $m;
interpret_word $s;
PrintM $Macro1a->{$m};
@@ -1322,7 +1364,7 @@ sub interpret_word
last SWITCH;
};
# Special handling of some LaTeX macros without an argument
- /\\SP\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\SP\s*/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
if ($first_word) {
PrintM $Macro->{"SPfirst"};
@@ -1333,7 +1375,7 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\(MANbr|TEXIbr|HTMLbr)\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\(MANbr|TEXIbr|HTMLbr)\s*/ && do {$s=$`;$m=$1;$r=$'; #'
# set $first_word to true
check_Macro $m;
interpret_word $s;
@@ -1344,7 +1386,7 @@ sub interpret_word
last SWITCH;
};
# LaTeX macros without an argument:
- /\\([a-zA-Z]+)\s*/ && do {$s=$`;$m=$1;$r=$';
+ /\\([a-zA-Z]+)\s*/ && do {$s=$`;$m=$1;$r=$'; #'
check_Macro $m;
interpret_word $s;
PrintM $Macro->{$m};
@@ -1352,39 +1394,39 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\({|}|\$|_|#|&|-|%|,|\.|;)/ && do {$s=$`;$m=$1;$r=$';
+ /\\({|}|\$|_|#|&|-|%|,|\.|;)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
# LaTeX Math
- /\$(<|>|<=|>=|=|<>)\$/ && do {$s=$`;$m=$1;$r=$';
+ /\$(<|>|<=|>=|=|<>)\$/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
PrintM $Macro->{$m};
interpret_word $r;
last SWITCH;
};
- /\$([^\$]*)\$/ && do {$s=$`;$m=$1;$r=$';
+ /\$([^\$]*)\$/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
interpret_word $m;
interpret_word $r;
last SWITCH;
};
- /&/ && do {$s=$`;$r=$';
+ /&/ && do {$s=$`;$r=$'; #'
interpret_word $s;
&{$Prefix . "TableSep"};
$first_column = 0;
interpret_word $r;
last SWITCH;
};
- /~/ && do {$s=$`;$r=$';
+ /~/ && do {$s=$`;$r=$'; #'
interpret_word $s;
PrintM $Macro->{'~'};
interpret_word $r;
last SWITCH;
};
- /\\\\/ && do {$s=$`;$r=$';
+ /\\\\/ && do {$s=$`;$r=$'; #'
interpret_word $s;
if ($inside_table) {
PrintM $Macro->{'\\Tab'};
@@ -1400,7 +1442,7 @@ sub interpret_word
$add_blank = 0;
last SWITCH;
};
- /\\$|\\ / && do {$s=$`;$r=$';
+ /\\$|\\ / && do {$s=$`;$r=$'; #'
# LaTeX explicit blank \ will be
# represented as a single \ at
# the end of the word
@@ -1409,12 +1451,12 @@ sub interpret_word
interpret_word $r;
last SWITCH;
};
- /\\/ && do {$s=$`;$r=$';
+ /\\/ && do {$s=$`;$r=$'; #'
interpret_word $s;
interpret_word "\\$r";
last SWITCH;
};
- ($opt_M == 1) && /((^\.|')+)/ && do {$s=$`;$m=$1;$r=$';
+ ($opt_M == 1) && /((^\.|')+)/ && do {$s=$`;$m=$1;$r=$'; #'
interpret_word $s;
print DEST "\\&$m";
$newline = 0;
@@ -1425,7 +1467,7 @@ sub interpret_word
};
$nesting --;
Print " " if ($nesting == 0 && $add_blank);
-}
+} # interpret_word()
sub interpret_line
{
@@ -1495,7 +1537,7 @@ sub interpret_line
interpret_word $word;
}
NL;
-}
+} # interpret_line()
sub PrintM
# print only for Macro command text
@@ -1514,7 +1556,7 @@ sub PrintM
print DEST "$c";
}
}
-}
+} # PrintM()
sub Print
{
@@ -1556,7 +1598,8 @@ sub Print
}
}
$paragraph = 0;
-}
+} # Print()
+
#########################################################################
sub date2str
@@ -1574,6 +1617,7 @@ $date = date2str ($rcs_date);
$Macro->{'today'} = $date;
#########################################################################
+
my @skip; # stack of skip-flags, 1: skip, 0: don't skip
push @skip, 0; # synthetic "outer most" IF, don't skip
my $last_cond_clause = "";
@@ -1622,17 +1666,31 @@ sub handle_conditional_text
pop @skip;
}
# print "$last_cond_clause: skip = $skip[-1]\n";
-}
+} # handle_conditional_text()
############################################################################
# handle LaTeX output
-if ($opt_L) {
- while (<SRC>) {
+#########################################################################
+
+sub emit_LaTeX
+{
+ my $src = shift(@_); # the source handle to be read
+ my $inside_include = shift(@_); # true, if we reading an \input{..}
+ while (<$src>) {
if ($opt_D == 1) {
my $line = $_; chop $line;
print "--- \`$line'\n";
}
-
+ if (/^\s*\\input{([^}]*)}\s*/) {
+ # handle \input{fn}
+ my $fn = $1;
+ printf DEST "%%%%%%%%%%%%%%%%%% start of \\input{%s}\n", $fn;
+ open (my $inc, "<$fn") || die "$CMD: Can't open file \\input-file \`$fn' for reading.\n";
+ emit_LaTeX($inc, 1);
+ close ($inc);
+ printf DEST "%%%%%%%%%%%%%%%%%% end of \\input{%s}\n", $fn;
+ next;
+ }
if (/^\s*%@%\s/) {
my $skip = $skip[-1];
handle_conditional_text ("$_");
@@ -1643,13 +1701,14 @@ if ($opt_L) {
next if ($skip[-1] == 1);
print DEST $_;
}
- close (DEST);
- exit (0);
-}
+} # emit_LaTeX()
+
############################################################################
# handle non-LaTeX output
+############################################################################
+sub emit_NonLaTeX
# read sections
# Variables: $section name of the section in uppercase letters
# $chapter chapter of the man page
@@ -1659,182 +1718,217 @@ if ($opt_L) {
# $tool info about the tool set, $name is part of
# $date date
# $version version info
-$started = 0;
-while (<SRC>) {
- if ($opt_D == 1) {
- my $line = $_; chop $line;
- print "--- \`$line'\n";
- }
-
- if ((/^\s*%@%\s/) && ($inside_verb==0)) {
- my $skip = $skip[-1];
- handle_conditional_text ("$_");
- }
- next if ($skip[-1] == 1);
+{
+ my $src = shift(@_); # the source handle to be read
+ my $inside_include = shift(@_); # true, if we reading an \input{..}
- if ($inside_verb) {
- if (/^\s*\\end{verbatim}/) {
- if ($started == 1) {
- &{$Prefix . "VerbatimEnd"};
- $inside_verb = 0;
- }
- } else {
- &{$Prefix . "VerbatimLine"} ($_);
- }
- next;
+ if ($inside_include) {
+ $started = shift(@_); # given, only if inside_include is true
+ } else {
+ $started = 0;
}
- # remove {, } around Umlaute
- s/{(\\".)}/\1/g; # "
- s/{(\\ss)}/\1/g;
-
- # normalize special characters
- s/\\"a/ä/g;
- s/\\"o/ö/g;
- s/\\"u/ü/g;
- s/\\"A/Ä/g;
- s/\\"O/Ö/g;
- s/\\"U/Ü/g;
- s/\\ss/ß/g;
-
- if (/^\s*\\rcsInfo \$(.*)\$/) {
- my ($rcs_id,$rcs_file,$rcs_revision,
- $rcs_date,$rcs_time,$rcs_owner,$rcs_status,$rcs_locker) = split(/\s/,$1);
- $date = date2str ($rcs_date);
- $Macro->{'today'} = $date;
- } elsif (/^\s*\\setDate{\\rcsInfoLongDate}/) {
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setDate{\\today}/) {
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setDate{([^}]*)}/) {
- $date = $1;
- $date =~ s/~/$Macro->{'~'}/g;
- $Macro->{'Date'} = $date;
- } elsif (/^\s*\\setVersion{([^}]*)}/) {
- $version = $1;
- $versin =~ s/~/$Macro->{'~'}/g;
- $Macro->{'Version'} = $version;
- } elsif (/^\s*\\begin{Name}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}/) {
- $section = "Name";
- $chapter = $1;
- $name = $2;
- $Name = uc $name;
- $author = $3;
- $tool = $4;
- $title = $5;
- $rest = $';
- $started = 1;
- $sections[0] = $section;
- $section_cnt = 0;
- &{$Prefix . "Start"} ($name, $chapter, $author, $tool, $title);
- &{$Prefix . "NameStart"} ($name, $chapter, $author, $tool, $title);
- } elsif (/^\s*\\end{Name}/) {
- &{$Prefix . "NameEnd"} ($name, $chapter, $author, $tool);
- } elsif (/^\s*\\begin{Table}(\[([^]]*)\])?{([^}]*)}/) {
- # \begin{Table}[width]{columns}
- if ($started == 1) {
- $columns = $3;
- $column = $_[0];
- $inside_table = 1;
- $first_column = 1;
- &{$Prefix . "TableStart"} ($columns, $2);
- }
- } elsif (/^\s*\\end{Table}/) {
- if ($started == 1) {
- $inside_table = 0;
- $first_column = 0;
- &{$Prefix . "TableEnd"} ($columns);
- }
- } elsif (/^\s*\\begin{Description}(\[[^]]*\])?/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'descr';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "DescriptionStart"};
- }
- } elsif (/^\s*\\end{Description}/) {
- if ($started == 1) {
- &{$Prefix . "DescriptionEnd"};
- $list_nest--;
- }
- } elsif (/^\s*\\begin{description}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'descr';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "DescriptionStart"};
- }
- } elsif (/^\s*\\end{description}/) {
- if ($started == 1) {
- &{$Prefix . "DescriptionEnd"};
- $list_nest--;
- }
- } elsif (/^\s*\\begin{center}/) {
- if ($started == 1) {
- &{$Prefix . "CenterStart"};
- }
- } elsif (/^\s*\\end{center}/) {
- if ($started == 1) {
- &{$Prefix . "CenterEnd"};
- }
- } elsif (/^\s*\\begin{enumerate}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'enum';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "EnumStart"} ;
- }
- } elsif (/^\s*\\end{enumerate}/) {
- if ($started == 1) {
- &{$Prefix . "EnumEnd"} ;
- $list_nest--;
- }
- } elsif (/^\s*\\begin{itemize}/) {
- if ($started == 1) {
- $list_nest++;
- $cur_list[$list_nest] = 'item';
- $item_nr[$list_nest] = 0;
- &{$Prefix . "ItemStart"} ;
+ while (<$src>) {
+ if ($opt_D == 1) {
+ my $line = $_; chop $line;
+ print "--- \`$line'\n";
}
- } elsif (/^\s*\\end{itemize}/) {
- if ($started == 1) {
- &{$Prefix . "ItemEnd"} ;
- $list_nest--;
+ if (/^\s*\\input{([^}]*)}\s*/) {
+ # handle \input{fn}
+ my $fn = $1;
+ if ($opt_M) {
+ printf DEST ".\\\" *********************************** start of \\input{%s}\n", $fn;
+ } elsif ($opt_H) {
+ printf DEST "<!-- *********************************** start of \\input{%s} -->\n", $fn;
+ } elsif ($opt_T) {
+ printf DEST "\@c *********************************** start of \\input{%s}\n", $fn;
+ }
+ open (my $inc, "<$fn") || die "$CMD: Can't open file \\input-file \`$fn' for reading.\n";
+ emit_NonLaTeX($inc, 1, $started);
+ close ($inc);
+ if ($opt_M) {
+ printf DEST ".\\\" *********************************** end of \\input{%s}\n", $fn;
+ } elsif ($opt_H) {
+ printf DEST "<!-- *********************************** end of \\input{%s} -->\n", $fn;
+ } elsif ($opt_T) {
+ printf DEST "\@c *********************************** end of \\input{%s}\n", $fn;
+ }
+ next;
}
- } elsif (/^\s*\\begin{verbatim}/) {
- if ($started == 1) {
- &{$Prefix . "VerbatimStart"};
- $inside_verb = 1;
+ if ((/^\s*%@%\s/) && ($inside_verb==0)) {
+ my $skip = $skip[-1];
+ handle_conditional_text ("$_");
}
- } elsif (/^\s*\\(subsubsection|subsection|section){([^}]*)}/) {
- $kind = $1;
- $section = $2;
- $section_cnt ++;
- $sections[$section_cnt] = $section;
- $section_kind[$section_cnt] = $kind;
- if ($started == 1) {
- &{$Prefix . "Section"} ($section_cnt, $kind, $section);
+ next if ($skip[-1] == 1);
+
+ if ($inside_verb) {
+ if (/^\s*\\end{verbatim}/) {
+ if ($started == 1) {
+ &{$Prefix . "VerbatimEnd"};
+ $inside_verb = 0;
+ }
+ } else {
+ &{$Prefix . "VerbatimLine"} ($_);
+ }
+ next;
}
- } elsif (/^\s*\\LatexManEnd/) {
- last;
- } elsif (/^\s*((\\begin{Name|Table|Description})|(\\(sub)?section))/) {
- die "$CMD: in line $.\n " .
- "Arguments of $1 are not contained in a single " .
- "line.\n " .
- "Remember: all arguments of a macro must be on the same line.\n";
- } else {
- if ($started == 1) {
- interpret_line $_;
+
+ # remove {, } around Umlaute
+ s/{(\\".)}/\1/g; # "
+ s/{(\\ss)}/\1/g;
+
+ # normalize special characters
+ s/\\"a/ä/g;
+ s/\\"o/ö/g;
+ s/\\"u/ü/g;
+ s/\\"A/Ä/g;
+ s/\\"O/Ö/g;
+ s/\\"U/Ü/g;
+ s/\\ss/ß/g;
+
+ if (/^\s*\\rcsInfo \$(.*)\$/) {
+ my ($rcs_id,$rcs_file,$rcs_revision,
+ $rcs_date,$rcs_time,$rcs_owner,$rcs_status,$rcs_locker) = split(/\s/,$1);
+ $date = date2str ($rcs_date);
+ $Macro->{'today'} = $date;
+ } elsif (/^\s*\\setDate{\\rcsInfoLongDate}/) {
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setDate{\\today}/) {
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setDate{([^}]*)}/) {
+ $date = $1;
+ $date =~ s/~/$Macro->{'~'}/g;
+ $Macro->{'Date'} = $date;
+ } elsif (/^\s*\\setVersion{([^}]*)}/) {
+ $version = $1;
+ $versin =~ s/~/$Macro->{'~'}/g;
+ $Macro->{'Version'} = $version;
+ } elsif (/^\s*\\begin{Name}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}{([^}]*)}/) {
+ $section = "Name";
+ $chapter = $1;
+ $name = $2;
+ $Name = uc $name;
+ $author = $3;
+ $tool = $4;
+ $title = $5;
+ $rest = $'; #'
+ $started = 1;
+ $sections[0] = $section;
+ $section_cnt = 0;
+ &{$Prefix . "Start"} ($name, $chapter, $author, $tool, $title);
+ &{$Prefix . "NameStart"} ($name, $chapter, $author, $tool, $title);
+ } elsif (/^\s*\\end{Name}/) {
+ &{$Prefix . "NameEnd"} ($name, $chapter, $author, $tool);
+ } elsif (/^\s*\\begin{Table}(\[([^]]*)\])?{([^}]*)}/) {
+ # \begin{Table}[width]{columns}
+ if ($started == 1) {
+ $columns = $3;
+ $column = $_[0];
+ $inside_table = 1;
+ $first_column = 1;
+ &{$Prefix . "TableStart"} ($columns, $2);
+ }
+ } elsif (/^\s*\\end{Table}/) {
+ if ($started == 1) {
+ $inside_table = 0;
+ $first_column = 0;
+ &{$Prefix . "TableEnd"} ($columns);
+ }
+ } elsif (/^\s*\\begin{Description}(\[[^]]*\])?/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'descr';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "DescriptionStart"};
+ }
+ } elsif (/^\s*\\end{Description}/) {
+ if ($started == 1) {
+ &{$Prefix . "DescriptionEnd"};
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{description}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'descr';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "DescriptionStart"};
+ }
+ } elsif (/^\s*\\end{description}/) {
+ if ($started == 1) {
+ &{$Prefix . "DescriptionEnd"};
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{center}/) {
+ if ($started == 1) {
+ &{$Prefix . "CenterStart"};
+ }
+ } elsif (/^\s*\\end{center}/) {
+ if ($started == 1) {
+ &{$Prefix . "CenterEnd"};
+ }
+ } elsif (/^\s*\\begin{enumerate}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'enum';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "EnumStart"} ;
+ }
+ } elsif (/^\s*\\end{enumerate}/) {
+ if ($started == 1) {
+ &{$Prefix . "EnumEnd"} ;
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{itemize}/) {
+ if ($started == 1) {
+ $list_nest++;
+ $cur_list[$list_nest] = 'item';
+ $item_nr[$list_nest] = 0;
+ &{$Prefix . "ItemStart"} ;
+ }
+ } elsif (/^\s*\\end{itemize}/) {
+ if ($started == 1) {
+ &{$Prefix . "ItemEnd"} ;
+ $list_nest--;
+ }
+ } elsif (/^\s*\\begin{verbatim}/) {
+ if ($started == 1) {
+ &{$Prefix . "VerbatimStart"};
+ $inside_verb = 1;
+ }
+ } elsif (/^\s*\\(subsubsection|subsection|section){([^}]*)}/) {
+ $kind = $1;
+ $section = $2;
+ $section_cnt ++;
+ $sections[$section_cnt] = $section;
+ $section_kind[$section_cnt] = $kind;
+ if ($started == 1) {
+ &{$Prefix . "Section"} ($section_cnt, $kind, $section);
+ }
+ } elsif (/^\s*\\LatexManEnd/) {
+ last;
+ } elsif (/^\s*((\\begin{Name|Table|Description})|(\\(sub)?section))/) {
+ die "$CMD: in line $.\n " .
+ "Arguments of $1 are not contained in a single " .
+ "line.\n " .
+ "Remember: all arguments of a macro must be on the same line.\n";
+ } else {
+ if ($started == 1) {
+ interpret_line $_;
+ }
}
}
-}
-&{$Prefix . "End"};
+ if (!$inside_include) {
+ &{$Prefix . "End"};
+ }
+} # emit_NonLaTeX()
-close DEST;
+############################################################################
+# Postprocessing TEXI and HTML
+############################################################################
-if ($opt_H || $opt_T) {
- open (TMP, "<$tmp") || die "$CMD: Can't open file \`$tmp' for reading.\n";
- open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
+sub postProcessNonLaTeX
+{
+ open (TMP, "<$tmp") || die "$CMD: Can't open file \`$tmp' for reading.\n";
while (<TMP>) {
if (/^\@\@INSERTION-POINT\@\@-TOC\@\@$/) {
if ($opt_H) {
@@ -1902,14 +1996,52 @@ if ($opt_H || $opt_T) {
}
}
close TMP;
- close DEST;
unlink $tmp;
+} # postPrecessNonLaTeX()
+
+#########################################################################
+# Do the job
+#########################################################################
+
+if ($opt_t) {
+ # reading of translations for user macros
+ do $opt_t;
+}
+
+########################################################################
+
+open (my $SRC, "<$SrcFile") || die "$CMD: Can't open file \`$SrcFile' for reading.\n";
+if ($opt_H || $opt_T) {
+ # DestFile will be written in the postprocess
+ open (DEST, ">$tmp") || die "$CMD: Can't open file \`$tmp' for writing.\n";
+} else {
+ open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
}
+if ($opt_L) {
+ # handle LaTeX output
+ emit_LaTeX ($SRC);
+ close ($SRC);
+ close (DEST);
+} else {
+ # handle non-LaTeX
+ emit_NonLaTeX ($SRC);
+ close ($SRC);
+ close (DEST);
+
+ if ($opt_H || $opt_T) {
+ open (DEST, ">$DestFile") || die "$CMD: Can't open file \`$DestFile' for writing.\n";
+ postProcessNonLaTeX();
+ close (DEST);
+ }
+}
+
+############################################################################
+
+
#########################################################################
## Emacs specific:
## Local Variables: ***
## mode: perl ***
## End: ***
-
diff --git a/Master/texmf-dist/tex/latex/latex2man/latex2man.sty b/Master/texmf-dist/tex/latex/latex2man/latex2man.sty
index 61c2fde6545..cba69a5c6fb 100644
--- a/Master/texmf-dist/tex/latex/latex2man/latex2man.sty
+++ b/Master/texmf-dist/tex/latex/latex2man/latex2man.sty
@@ -2,8 +2,8 @@
%% Project: Documentation Tools
%% Descr: Latex --> MAN-page (groff -man), LaTeX package
%% Author: Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
-%% $Id: latex2man.sty,v 1.85 2010/12/22 09:33:29 vollmer Exp $
-%% VERSION: 1.24
+%% $Id: latex2man.sty,v 1.88 2017/04/13 14:42:01 vollmer Exp $
+%% VERSION: 1.25
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% `latex2man' package to use with LaTeX2e.
@@ -18,7 +18,7 @@
%% and a PERL script (latex2man) doing the actual translation.
%%
%% Copyright (C) 1998, Dr. Juergen Vollmer
-%% Viktoriastrasse 15, D-76133 Karlsruhe, Germany
+%% Am Rennbuckel 21, D-76185 Karlsruhe, Germany
%% Juergen.Vollmer@informatik-vollmer.de
%% License:
%% This program can be redistributed and/or modified under the terms
@@ -31,7 +31,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{latex2man}[2010/12/22 v1.24]
+\ProvidesPackage{latex2man}[2017/04/13 v1.25]
\usepackage{ifthen}
\newif\if@LM@UseFancy@