diff --git a/LDP/texi2db/texi2db b/LDP/texi2db/texi2db index 198ac37d..f8852213 100755 --- a/LDP/texi2db/texi2db +++ b/LDP/texi2db/texi2db @@ -296,6 +296,7 @@ $replacement = ""; # '@@' =>'@', # handled specially to simplify parsing # '@\{' =>'{', # '@\}' =>'}', +# '@,{c}' =>'¸', '@ ' =>' ', # punctuation and typographic characters '@-' =>'¯', @@ -400,7 +401,6 @@ $replacement = ""; '@O{}' =>'Ø', '@o{}' =>'ø', '@ss{}' =>'ß', - '@,{c}' =>'¸', # cedilla (yes, this is strange) '@error{}' =>'error-->', # glyphs used in examples '@equiv{}' =>'≡', @@ -947,6 +947,7 @@ TAG: while ($line =~ /\@\w+\{[^\{]*?\}/) { $tagplain =~ s/\@//; $contents = $command; $contents =~ s/.*\{(.*)\}/\1/; + &message("CMDLINE: $line") if ($verbose > 2); &message("CMD: $command, tag: $tag, tagplain: $tagplain, contents: $contents") if ($verbose > 2); # substitutions (we only want to catch @{} type tags here) @@ -1054,9 +1055,12 @@ TAG: while ($line =~ /\@\w+\{[^\{]*?\}/) { # This uses a presorted array of keys in descending order, # so we see @ss before @s, etc. # - for $key (@substitutionkeys) { + foreach $key (@substitutionkeys) { $pattern = quotemeta($key); - $line =~ s/$pattern/$substitutions{$key}/g; + if ($line =~ /$pattern/) { + &message("matched character code: $key") if ($verbose > 2); + $line =~ s/$pattern/$substitutions{$key}/g; + } } # unusual stuff to deal with @@ -1092,6 +1096,7 @@ sub markspecial { $line =~ s/\@\@/DCM_AT/g; $line =~ s/\@\{/DCM_LB/g; $line =~ s/\@\}/DCM_RB/g; + $line =~ s/\@\,{c\}/DCM_CD/g; # special handling for the @verb{} command, which contains # within it special characters which are NOT to be interpreted. @@ -1137,21 +1142,27 @@ sub markspecial { $line =~ s/DCM_VERB/\@verb/g; } + + # We do this twice in case one of these was inside a @verb statement + # $line =~ s/\@\@/DCM_AT/g; $line =~ s/\@\{/DCM_LB/g; $line =~ s/\@\}/DCM_RB/g; + $line =~ s/\@\,{c\}/DCM_CD/g; } sub unmarkspecial { $_[0] =~ s/DCM_AT/\@\@/gi; $_[0] =~ s/DCM_LB/\@\{/gi; $_[0] =~ s/DCM_RB/\@\}/gi; + $_[0] =~ s/DCM_CD/\@\{c\}/gi; } sub normalizespecial { $_[0] =~ s/DCM_AT/\@/gi; $_[0] =~ s/DCM_LB/\{/gi; $_[0] =~ s/DCM_RB/\}/gi; + $_[0] =~ s/DCM_CD/¸/gi; } sub replaceinline {