[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.172,1.173"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Tue Jul 18 19:25:37 UTC 2006
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv6436/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
Keep the \\f font modifiers with the inline macros' arguments (E<...>).
Closes: #378622
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.172
retrieving revision 1.173
diff -u -d -r1.172 -r1.173
--- Man.pm 17 Jul 2006 21:06:29 -0000 1.172
+++ Man.pm 18 Jul 2006 19:25:34 -0000 1.173
@@ -1445,6 +1445,16 @@
my $last_font=$regular_font;
foreach my $elem (@array1) {
+ # Do not touch the fonts in the inline macros
+ # These inline macros may have their argument in bold or italic,
+ # we can't know.
+ if ($str =~ m/E<\.[^>]/s) {
+ # We can't use \\f here, otherwise the font simplifier regexp
+ # will use the fonts of the inline macros.
+ $str .= "PO4A-FAKE-FONT".$elem;
+ next;
+ }
+
# Replace \fP by the exact font (because some font modifiers will
# be removed or added, which will break groff's font stack)
$elem =~ s/^(P|\[\]|\[P\])/$previous_font/s;
@@ -1547,6 +1557,7 @@
}
}
$str =~ s/\(CW</CW</sg;
+ $str =~ s/PO4A-FAKE-FONT/\\f/sg;
print STDERR "'$str'\n" if ($debug{'fonts'});
return $str;
More information about the Po4a-commits
mailing list