#--##############################################################################
# CVS version:
-# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $
+# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $
# Homepage:
$T2H_HOMEPAGE = "http://texi2html.cvshome.org";
# Copy this file and make changes to it, if you like.
# Afterwards, either, load it with command-line option -init_file <your_init_file>
#
-# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $
+# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $
######################################################################
# stuff which can also be set by command-line options
# --------------------------------------------------------------------------
# Locally modified by obachman (Display type instead of env, order by cmp)
-# $Id: texi2html,v 1.2 2004-10-14 00:10:34 blp Exp $
+# $Id: texi2html,v 1.3 2005-06-19 03:20:26 blp Exp $
# use strict;
# no strict 'refs';
"?", "?",
".", ".",
"-", "",
+ "/", "",
);
#
# texinfo styles (@foo{bar}) to HTML ones
#
%style_map = (
- 'acronym', '&do_acronym',
+ 'acronym', 'ACRONYM',
'asis', '',
'b', 'B',
'cite', 'CITE',
'deftypefn', 0,
'deftypeop', 0,
'deftypevr', 0,
+ 'deftypecv', 0,
'defcv', 0,
'defop', 0,
'deftp', 0,
'deftypefnx', 0,
'deftypeopx', 0,
'deftypevrx', 0,
+ 'deftypecvx', 0,
'defcvx', 0,
'defopx', 0,
'deftpx', 0,
#############################################################
# value substitution before macro expansion, so that
# it works in macro arguments
- s/\@value{($VARRE)}/$value{$1}/eg;
+ s/\@value\{($VARRE)}/$value{$1}/eg;
#############################################################
# macro substitution
$after = '';
}
$args =~ s|\\\\|\\|g;
- $args =~ s|\\{|{|g;
+ $args =~ s|\\\{|{|g;
$args =~ s|\\}|}|g;
if (@{$macros->{$name}->{Args}} > 1)
{
$type =~ s/^\{(.*)\}$/$1/;
print "# def ($tag): {$type} ", join(', ', @args), "\n"
if $T2H_DEBUG & $DEBUG_DEF;
+ if ($tag eq 'deftypecv') {
+ my $class = shift (@args);
+ $class =~ s/^\{(.*)\}$/$1/;
+ $type .= " of $class";
+ }
$type .= ':' if (!$T2H_DEF_TABLE); # it's nicer like this
$name = shift(@args);
$name =~ s/^\{(.*)\}$/$1/;
}
elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr'
|| $tag eq 'deftypeop' || $tag eq 'defcv'
- || $tag eq 'defop')
+ || $tag eq 'defop' || $tag eq 'deftypecv')
{
$ftype = $name;
$name = shift(@args);
}
else
{
- $_ .= "<U>$type</U> $ftype <B>$name</B>";
- $_ .= " <I>@args</I>" if @args;
+ my $sep = $ftype =~ /\*$/ ? '' : ' ';
+ $_ .= "<U>$type</U> $ftype$sep<B>$name</B>";
+ $_ .= " @args" if @args;
}
}
else
#
# xref
#
- while (/\@(x|px|info|)ref{([^{}]+)(}?)/)
+ while (/\@(x|px|info|)ref\{([^{}]+)(}?)/)
{
# note: Texinfo may accept other characters
($type, $nodes, $full) = ($1, $2, $3);
my $ret;
$level--; # here we start at 0
- if ($name =~ /^appendix/ || defined(@appendix_sec_num))
+ if ($name =~ /^appendix/ || @appendix_sec_num)
{
# appendix style
- if (defined(@appendix_sec_num))
+ if (@appendix_sec_num)
{
&incr_sec_num($level, @appendix_sec_num);
}
else
{
# normal style
- if (defined(@normal_sec_num))
+ if (@normal_sec_num)
{
&incr_sec_num($level, @normal_sec_num);
}
else
{ # no style
}
- $text = "\`$text\'" if $do_quotes;
+ $text = "<Q>$text</Q>" if $do_quotes;
}
else
{ # unknown style
{
$changed = 0;
$done = '';
- while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/)
+ while (/\@(\w+)\{([^\{\}]+)}/ || /\@(,)\{([^\{\}]+)}/)
{
$text = &apply_style($1, $2);
if ($text)