[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo/tp/Texinfo/Convert HTML.pm
From: |
Patrice Dumas |
Subject: |
texinfo/tp/Texinfo/Convert HTML.pm |
Date: |
Sun, 03 Apr 2011 11:09:09 +0000 |
CVSROOT: /sources/texinfo
Module name: texinfo
Changes by: Patrice Dumas <pertusus> 11/04/03 11:09:09
Modified files:
tp/Texinfo/Convert: HTML.pm
Log message:
Handle @math.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/HTML.pm?cvsroot=texinfo&r1=1.4&r2=1.5
Patches:
Index: HTML.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/HTML.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- HTML.pm 3 Apr 2011 10:25:17 -0000 1.4
+++ HTML.pm 3 Apr 2011 11:09:09 -0000 1.5
@@ -375,15 +375,18 @@
't' => 'tt',
'var' => 'var',
'verb' => 'tt',
+ 'math' => 'em',
};
-foreach my $command (keys(%{$default_commands_formatting{'normal'}})) {
- $style_attribute_commands{'preformatted'}->{$command} =
- $style_attribute_commands{'normal'}->{$command};
-}
-
my %style_commands_formatting;
-foreach my $command(keys(%style_commands)) {
+
+#Â this weird construct does like uniq, it avoids duplicates.
+#Â it is required since math is not in the %style_commands as it is
+#Â context command.
+my @all_style_commands = keys %{{ map { $_ => 1 } (keys(%style_commands),
+
keys(%{$style_attribute_commands{'normal'}})) }};
+
+foreach my $command(@all_style_commands) {
#Â default is no attribute.
if ($style_attribute_commands{'normal'}->{$command}) {
$style_commands_formatting{'normal'}->{$command}->{'attribute'}
@@ -409,7 +412,6 @@
# 'key', {'begin' => '<', 'end' => '>'},
# 'uref', {'function' => \&html_default_uref},
# 'url', {'function' => \&html_default_uref},
-# 'math', {'function' => \&html_default_math},
# 'indicateurl', {'begin' => '<<code>', 'end' => '</code>>'},
sub _parse_attribute($)
@@ -484,6 +486,18 @@
$default_commands_conversion{'email'} = \&expand_email;
+#sub expand_math($$$$)
+#{
+# my $self = shift;
+# my $cmdname = shift;
+# my $command = shift;
+# my $args = shift;
+#
+# return $args->[0]->{'normal'};
+#}
+
+#$default_commands_conversion{'math'} = \&expand_math;
+
sub accent_commands($$$$)
{
my $self = shift;
@@ -616,6 +630,19 @@
$default_types_conversion{'empty_line'} = \&empty_line;
$default_types_conversion{'after_description_line'} = \&empty_line;
+sub bracketed($$$$) {
+ my $self = shift;
+ my $type = shift;
+ my $command = shift;
+ my $content = shift;
+#print STDERR "$self $type $command $content\n";
+
+ return '{'.$content.'}';
+}
+
+$default_types_conversion{'bracketed'} = \&bracketed;
+
+
sub process_text($$$)
{
my $self = shift;
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/02
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/03
- texinfo/tp/Texinfo/Convert HTML.pm,
Patrice Dumas <=
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/13
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/14
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/17
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/17
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/18
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/24
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/25
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/29
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30
- texinfo/tp/Texinfo/Convert HTML.pm, Patrice Dumas, 2011/04/30