[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-cvs] texi2html examples/enable_encoding.init example...
From: |
Patrice Dumas |
Subject: |
[Texi2html-cvs] texi2html examples/enable_encoding.init example... |
Date: |
Sat, 03 Jan 2009 15:29:54 +0000 |
CVSROOT: /cvsroot/texi2html
Module name: texi2html
Changes by: Patrice Dumas <pertusus> 09/01/03 15:29:54
Modified files:
examples : enable_encoding.init info.init
test : run_test.sh
test/many_input_files: tex_l2h.sh
test/misc/res/mini_ker_l2h: mini_ker_l2h_images.pl
mini_ker_l2h_labels.pl
test/singular_manual/res/singular: sing_l2h_images.pl
sing_l2h_labels.pl
Log message:
Use correct globs for *.pl files to remove latex2html version number.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/enable_encoding.init?cvsroot=texi2html&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/texi2html/examples/info.init?cvsroot=texi2html&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/run_test.sh?cvsroot=texi2html&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/many_input_files/tex_l2h.sh?cvsroot=texi2html&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/misc/res/mini_ker_l2h/mini_ker_l2h_images.pl?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/misc/res/mini_ker_l2h/mini_ker_l2h_labels.pl?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/singular_manual/res/singular/sing_l2h_images.pl?cvsroot=texi2html&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/texi2html/test/singular_manual/res/singular/sing_l2h_labels.pl?cvsroot=texi2html&r1=1.1&r2=1.2
Patches:
Index: examples/enable_encoding.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/enable_encoding.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- examples/enable_encoding.init 2 Jan 2009 17:22:33 -0000 1.4
+++ examples/enable_encoding.init 3 Jan 2009 15:29:52 -0000 1.5
@@ -130,15 +130,29 @@
if (scalar(@enable_encoding_accents_stack))
{
+ #Â in that case, we already have a result ready that corresponds with the
+ #Â formatting of a part of the stack mapped to
+ # enable_encoding_accents_stack, so it is emptied and the innermost
+ #Â $text is returned as is such that the unmodified already formatted
+ #Â innermost formatted accented text is returned.
+
#print STDERR " doing nothing, still in stack
(@enable_encoding_accents_stack), accent: $accent";
my $stack_accent = shift @enable_encoding_accents_stack;
#print STDERR " stack_accent $stack_accent\n";
return $text;
}
+ #Â in that case there is no enable_encoding_accents_stack, so we are
+ #Â at the closing of the innermost accented command. We will try to format
+ #Â all the stack in reverse(@$style_stack) that coresponds with
+ # accent commands
my @accents_stack = ();
my @styles = reverse(@$style_stack);
+ #Â accents are formatted and the intermediate results are kept, such
+ #Â that we can return the maximum of multiaccented letters that can be
+ #Â rendered with a given eight bit formatting.
+
# first put the letter in the stack
my @utf8_partial_results = { 'result' => $text,
'accents_stack' => [ @accents_stack ]};
@@ -164,6 +178,10 @@
my $enc_map =
$makeinfo_encoding_to_map{$Texi2HTML::THISDOC{'ENCODING_NAME'}};
my $eight_bit;
my $result;
+ # At this point we have the utf8 encoded results for the accent
+ #Â commands stack, with all the intermediate results.
+ #Â For each one we'll check if it is possible to encode it in the
+ #Â current eight bit output encoding table
foreach my $partial_result (@utf8_partial_results)
{
my $char = $partial_result->{'result'};
@@ -191,6 +209,9 @@
}
if (defined($result) and scalar(@{$result->{'accents_stack'}}))
{
+ #Â we got a result, return it and put in enable_encoding_accents_stack
+ #Â the stack of accent commands that were processed.
+
#print STDERR "Result: ".encode('utf8', $result->{'result'}) ." '$eight_bit'
(@{$result->{'accents_stack'}})\n" if defined($result);
@enable_encoding_accents_stack = @{$result->{'accents_stack'}};
# remove the first, it is the accent being processed
Index: examples/info.init
===================================================================
RCS file: /cvsroot/texi2html/texi2html/examples/info.init,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- examples/info.init 1 Jan 2009 22:35:13 -0000 1.8
+++ examples/info.init 3 Jan 2009 15:29:52 -0000 1.9
@@ -63,9 +63,12 @@
'slanted', 'var', 'titlefont', 'verb');
my @chevron_commands = ('key', 'indicateurl');
+my %info_default_accent_commands = ();
+
foreach my $accent_command ('tieaccent', 'dotless', keys(%unicode_accents),
keys(%accent_map))
{
- $style_map{$accent_command} = { 'function' => \&t2h_default_ascii_accent
};
+ $info_default_accent_commands{$accent_command} = 1;
+ $style_map{$accent_command} = { 'function' => \&info_default_accent };
}
foreach my $command (keys(%style_map))
@@ -179,6 +182,28 @@
$quotation = \&info_default_quotation;
$unknown = \&info_default_misc_commands;
+sub info_default_accent($$$)
+{
+ my @args = @_;
+ my $command = shift;
+ my $args = shift;
+ my $text = $args->[0];
+ my $style_stack = shift;
+ my $state = shift;
+
+ print STDERR "GGGGGGGGGGGGG (@$style_stack) $command $text\n";
+ if (scalar(@$style_stack) and
$info_default_accent_commands{$style_stack->[-1]})
+ {
+ print STDERR "1GGGGGGGGGGGG";
+ return &t2h_default_ascii_accent(@args);
+ }
+ my $result = &t2h_default_ascii_accent(@args);
+ print STDERR "2GGGGGGGGGGGG $result";
+ return '' if info_default_store_text($state,$result,'accents_commands');
+ print STDERR "3GGGGGGGGGGGG $result";
+ return $result;
+}
+
sub info_default_noop
{
return '';
@@ -673,7 +698,8 @@
my $state = shift;
my $stack = shift;
my $real_style_command = shift;
- info_default_open_command($state,$command, undef, undef, undef);
+ info_default_open_command($state,$command, undef, undef, undef)
+ unless ($info_default_accent_commands{$command});
# if ($real_style_command);
}
@@ -748,7 +774,7 @@
{
$end = $style->{'end'};
}
- unless($state->{'remove_texi'} or $special_style{$command} or ($command eq
'cmd_line'))
+ unless($state->{'remove_texi'} or $special_style{$command} or ($command eq
'cmd_line') or $info_default_accent_commands{$command})
{
return info_default_close_command($command_stack, $command, $no_close,
$no_open, $line_nr, $begin, $text, $end);
}
Index: test/run_test.sh
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/run_test.sh,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- test/run_test.sh 2 Jan 2009 17:23:06 -0000 1.8
+++ test/run_test.sh 3 Jan 2009 15:29:53 -0000 1.9
@@ -174,19 +174,20 @@
$out_dir/$dir/*_tex4ht_tex.html
fi
if [ $ret = 0 ]; then
- if [ -d "$results_dir/$dir" ]; then
sed -i -e 's/^texexpand.*/texexpand /' "$out_dir/$dir/$basename.2"
sed -i '/is no longer supported at.*line/d' "$out_dir/$dir/$basename.2"
if [ "$use_latex2html" = 'yes' ]; then
sed -i -e 's/CONTENT="LaTeX2HTML.*/CONTENT="LaTeX2HTML">/' -e \
- 's/with LaTeX2HTML.*/with LaTeX2HTML/' "$out_dir/$dir/"*"_l2h.html"
"$out_dir/$dir/"*"_l2h_labels.pl"
- for file in "$out_dir/$dir/${dir}_l2h_images.pl"
"$out_dir/$dir/${dir}_l2h_labels.pl"; do
+ 's/with LaTeX2HTML.*/with LaTeX2HTML/' "$out_dir/$dir/"*"_l2h.html"
+ #Â "*"_images.pl" files are not guaranteed to be present
+ for file in "$out_dir/$dir/"*"_images.pl" "$out_dir/$dir/"*"_labels.pl";
do
if [ -f "$file" ]; then
sed -i -e 's/^# LaTeX2HTML.*/# LaTeX2HTML/' "$file"
fi
done
- rm -f "$out_dir/$dir/"*".aux" "$out_dir/$dir/"*"_l2h_images.out"
+ rm -f "$out_dir/$dir/"*".aux" "$out_dir/$dir/"*"_images.out"
fi
+ if [ -d "$results_dir/$dir" ]; then
diff -u --exclude=CVS --exclude='*.png' --exclude='*_l2h.css' -r
"$results_dir/$dir" "$out_dir/$dir" 2>>$logfile > "$diffs_dir/$dir.diff"
dif_ret=$?
if [ $dif_ret != 0 ]; then
Index: test/many_input_files/tex_l2h.sh
===================================================================
RCS file: /cvsroot/texi2html/texi2html/test/many_input_files/tex_l2h.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- test/many_input_files/tex_l2h.sh 3 Jan 2009 11:49:39 -0000 1.3
+++ test/many_input_files/tex_l2h.sh 3 Jan 2009 15:29:53 -0000 1.4
@@ -40,7 +40,7 @@
sed -i -e 's/^texexpand.*/texexpand /' "$basename/$basename.2"
sed -i '/is no longer supported at.*line/d' "$basename/$basename.2"
sed -i -e 's/CONTENT="LaTeX2HTML.*/CONTENT="LaTeX2HTML">/' -e \
- 's/with LaTeX2HTML.*/with LaTeX2HTML/' "$basename/"*"_l2h.html"
"$basename/"*"_l2h_labels.pl"
+ 's/with LaTeX2HTML.*/with LaTeX2HTML/' "$basename/"*"_l2h.html"
sed -i -e 's/^# LaTeX2HTML.*/# LaTeX2HTML/' "$basename/"*"_l2h_images.pl"
"$basename/"*"_l2h_labels.pl"
rm -f "$basename/"*".aux" "$basename/"*"_l2h_images.out"
for dir in ${basename}; do
Index: test/misc/res/mini_ker_l2h/mini_ker_l2h_images.pl
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/test/misc/res/mini_ker_l2h/mini_ker_l2h_images.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/misc/res/mini_ker_l2h/mini_ker_l2h_images.pl 1 Sep 2008 14:48:50
-0000 1.1
+++ test/misc/res/mini_ker_l2h/mini_ker_l2h_images.pl 3 Jan 2009 15:29:53
-0000 1.2
@@ -1,4 +1,4 @@
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# Associate images original text with physical files.
Index: test/misc/res/mini_ker_l2h/mini_ker_l2h_labels.pl
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/test/misc/res/mini_ker_l2h/mini_ker_l2h_labels.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/misc/res/mini_ker_l2h/mini_ker_l2h_labels.pl 1 Sep 2008 14:48:51
-0000 1.1
+++ test/misc/res/mini_ker_l2h/mini_ker_l2h_labels.pl 3 Jan 2009 15:29:53
-0000 1.2
@@ -1,11 +1,11 @@
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# Associate labels original text with physical files.
1;
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# labels from external_latex_labels array.
Index: test/singular_manual/res/singular/sing_l2h_images.pl
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/test/singular_manual/res/singular/sing_l2h_images.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/singular_manual/res/singular/sing_l2h_images.pl 18 Aug 2008
18:08:01 -0000 1.1
+++ test/singular_manual/res/singular/sing_l2h_images.pl 3 Jan 2009
15:29:54 -0000 1.2
@@ -1,4 +1,4 @@
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# Associate images original text with physical files.
Index: test/singular_manual/res/singular/sing_l2h_labels.pl
===================================================================
RCS file:
/cvsroot/texi2html/texi2html/test/singular_manual/res/singular/sing_l2h_labels.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/singular_manual/res/singular/sing_l2h_labels.pl 18 Aug 2008
18:08:01 -0000 1.1
+++ test/singular_manual/res/singular/sing_l2h_labels.pl 3 Jan 2009
15:29:54 -0000 1.2
@@ -1,11 +1,11 @@
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# Associate labels original text with physical files.
1;
-# LaTeX2HTML 2002-2-1 (1.71)
+# LaTeX2HTML
# labels from external_latex_labels array.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texi2html-cvs] texi2html examples/enable_encoding.init example...,
Patrice Dumas <=