# Pod::Text -- Convert POD data to formatted ASCII text.
-# $Id: Text.pm,v 2.5 2000/09/03 09:23:29 eagle Exp $
+# $Id: Text.pm,v 2.7 2000/11/19 04:47:50 eagle Exp $
#
# Copyright 1999, 2000 by Russ Allbery <rra@stanford.edu>
#
# Perl core and too many things could munge CVS magic revision strings.
# This number should ideally be the same as the CVS revision in podlators,
# however.
-$VERSION = 2.05;
+$VERSION = 2.07;
############################################################################
'quot' => '"', # double quote
'sol' => '/', # solidus (forward slash)
'verbar' => '|', # vertical bar
-
+
"Aacute" => "\xC1", # capital A, acute accent
"aacute" => "\xE1", # small a, acute accent
"Acirc" => "\xC2", # capital A, circumflex accent
"eth" => "\xF0", # small eth, Icelandic
"Euml" => "\xCB", # capital E, dieresis or umlaut mark
"euml" => "\xEB", # small e, dieresis or umlaut mark
- "Iacute" => "\xCD", # capital I, acute accent
- "iacute" => "\xED", # small i, acute accent
+ "Iacute" => "\xCC", # capital I, acute accent
+ "iacute" => "\xEC", # small i, acute accent
"Icirc" => "\xCE", # capital I, circumflex accent
"icirc" => "\xEE", # small i, circumflex accent
"Igrave" => "\xCD", # capital I, grave accent
"Yacute" => "\xDD", # capital Y, acute accent
"yacute" => "\xFD", # small y, acute accent
"yuml" => "\xFF", # small y, dieresis or umlaut mark
-
+
"laquo" => "\xAB", # left pointing double angle quotation mark
"lchevron" => "\xAB", # synonym (backwards compatibility)
"raquo" => "\xBB", # right pointing double angle quotation mark
$$self{width} = 76 unless defined $$self{width};
# Figure out what quotes we'll be using for C<> text.
- $$self{quotes} ||= "'";
+ $$self{quotes} ||= '"';
if ($$self{quotes} eq 'none') {
$$self{LQUOTE} = $$self{RQUOTE} = '';
} elsif (length ($$self{quotes}) == 1) {
$self->$command (@_);
} else {
my ($text, $line, $paragraph) = @_;
- my ($file, $line) = $paragraph->file_line;
+ my $file;
+ ($file, $line) = $paragraph->file_line;
$text =~ s/\n+\z//;
$text = " $text" if ($text =~ /^\S/);
warn qq($file:$line: Unknown command paragraph "=$command$text"\n);
>
(
,?\s+(and\s+)? # Allow lots of them, conjuncted.
- L<
+ L<
/
(
[:\w]+
}
}
+# Third level heading.
+sub cmd_head3 {
+ my $self = shift;
+ local $_ = shift;
+ s/\s+$//;
+ $_ = $self->interpolate ($_, shift);
+ if ($$self{alt}) {
+ $self->output ("\n= $_ =\n\n");
+ } else {
+ $self->output (' ' x ($$self{indent} * 2 / 3 + 0.5) . $_ . "\n\n");
+ }
+}
+
+# Third level heading.
+sub cmd_head4 {
+ my $self = shift;
+ local $_ = shift;
+ s/\s+$//;
+ $_ = $self->interpolate ($_, shift);
+ if ($$self{alt}) {
+ $self->output ("\n- $_ -\n\n");
+ } else {
+ $self->output (' ' x ($$self{indent} * 3 / 4 + 0.5) . $_ . "\n\n");
+ }
+}
+
# Start a list.
sub cmd_over {
my $self = shift;
my $self = shift;
$$self{EXCLUDE} = 0;
$$self{VERBATIM} = 0;
-}
+}
# One paragraph for a particular translator. Ignore it unless it's intended
# for text, in which case we treat it as a verbatim text block.