208 |
$VERBOSE = ''; |
$VERBOSE = ''; |
209 |
|
|
210 |
# -lang |
# -lang |
211 |
# FIXME this has changed |
# use &$I('my string') if you want to have translations of 'my string' |
212 |
# For page titles use $Texi2HTML::I18n::WORDS->{$T2H_LANG}->{...} as title. |
# and provide the translations in $LANGUAGES->{$LANG} with 'my string' |
213 |
# To add a new language, supply list of titles (see $Texi2HTML::I18n::WORDS). |
# as key. |
214 |
# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02 |
# To add a new language use ISO 639 language codes (see e.g. perl module |
215 |
# for definitions). |
# Locale-Codes-1.02 for definitions). Supply translations in the |
216 |
|
# $LANGUAGES hash and put it in a file with $LANG as name in an i18n |
217 |
|
# directory. |
218 |
# Default's to 'en' if not set or no @documentlanguage is specified. |
# Default's to 'en' if not set or no @documentlanguage is specified. |
219 |
$LANG = 'en'; |
$LANG = 'en'; |
220 |
|
|
942 |
$description = $longtitle if (!defined($description)); |
$description = $longtitle if (!defined($description)); |
943 |
$description = "<meta name=\"description\" content=\"$description\">" if |
$description = "<meta name=\"description\" content=\"$description\">" if |
944 |
($description ne ''); |
($description ne ''); |
|
$description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'})); |
|
945 |
my $encoding = ''; |
my $encoding = ''; |
946 |
$encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne '')); |
$encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne '')); |
947 |
print $fh <<EOT; |
print $fh <<EOT; |
1438 |
$Texi2HTML::TITLEPAGE = $result . $Texi2HTML::TITLEPAGE; |
$Texi2HTML::TITLEPAGE = $result . $Texi2HTML::TITLEPAGE; |
1439 |
} |
} |
1440 |
|
|
1441 |
# i18n |
# FIXME Honor DOCUMENT_DESCRIPTION? |
1442 |
sub T2H_DEFAULT_print_redirection_page($) |
sub T2H_DEFAULT_print_redirection_page($) |
1443 |
{ |
{ |
1444 |
my $fh = shift; |
my $fh = shift; |
1445 |
my $longtitle = "$Texi2HTML::THISDOC{'title_simple_format'}"; |
my $longtitle = "$Texi2HTML::THISDOC{'title_simple_format'}"; |
1446 |
$longtitle .= ": $Texi2HTML::SIMPLE_TEXT{'This'}" if exists $Texi2HTML::SIMPLE_TEXT{'This'}; |
$longtitle .= ": $Texi2HTML::SIMPLE_TEXT{'This'}" if exists $Texi2HTML::SIMPLE_TEXT{'This'}; |
1447 |
my $description = $longtitle; |
my $description = $longtitle; |
1448 |
$description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'})); |
my $encoding = ''; |
1449 |
|
$encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne '')); |
1450 |
my $href = &$anchor('', $Texi2HTML::HREF{'This'}, $Texi2HTML::NAME{'This'}); |
my $href = &$anchor('', $Texi2HTML::HREF{'This'}, $Texi2HTML::NAME{'This'}); |
1451 |
|
my $string = &$I('The node you are looking for is at %{href}.', |
1452 |
|
{ 'href' => $href }); |
1453 |
print $fh <<EOT; |
print $fh <<EOT; |
1454 |
$DOCTYPE |
$DOCTYPE |
1455 |
<html> |
<html> |
1465 |
<meta name="resource-type" content="document"> |
<meta name="resource-type" content="document"> |
1466 |
<meta name="distribution" content="global"> |
<meta name="distribution" content="global"> |
1467 |
<meta name="Generator" content="$Texi2HTML::THISDOC{program}"> |
<meta name="Generator" content="$Texi2HTML::THISDOC{program}"> |
1468 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
$encoding |
1469 |
<meta http-equiv="Refresh" content="0; url=$Texi2HTML::HREF{'This'}"> |
$CSS_LINES |
1470 |
|
<meta http-equiv="Refresh" content="2; url=$Texi2HTML::HREF{'This'}"> |
1471 |
$EXTRA_HEAD |
$EXTRA_HEAD |
1472 |
</head> |
</head> |
1473 |
|
|
1474 |
<body $BODYTEXT> |
<body $BODYTEXT> |
1475 |
$AFTER_BODY_OPEN |
$AFTER_BODY_OPEN |
1476 |
<p>The node you are looking for is at $href.</p> |
<p>$string</p> |
1477 |
</body> |
</body> |
1478 |
EOT |
EOT |
1479 |
} |
} |
1611 |
'dots' => '<small class="dots">...</small>', |
'dots' => '<small class="dots">...</small>', |
1612 |
'enddots' => '<small class="enddots">....</small>', |
'enddots' => '<small class="enddots">....</small>', |
1613 |
'equiv' => '==', |
'equiv' => '==', |
1614 |
# i18n |
# FIXME i18n |
1615 |
'error' => 'error-->', |
'error' => 'error-->', |
1616 |
'expansion' => '==>', |
'expansion' => '==>', |
1617 |
'minus' => '-', |
'minus' => '-', |
1675 |
'dots' => '...', |
'dots' => '...', |
1676 |
'enddots' => '....', |
'enddots' => '....', |
1677 |
'equiv' => '==', |
'equiv' => '==', |
1678 |
# i18n |
# FIXME i18n |
1679 |
'error' => 'error-->', |
'error' => 'error-->', |
1680 |
'expansion' => '==>', |
'expansion' => '==>', |
1681 |
'minus' => '-', |
'minus' => '-', |
2352 |
return '<small>' . uc($_[0]) . '</small>'; |
return '<small>' . uc($_[0]) . '</small>'; |
2353 |
} |
} |
2354 |
|
|
2355 |
|
# now unused, upcasing is done in normal_text |
2356 |
sub t2h_default_sc($$$) |
sub t2h_default_sc($$$) |
2357 |
{ |
{ |
2358 |
shift; |
shift; |
2377 |
return uc($_[0]); |
return uc($_[0]); |
2378 |
} |
} |
2379 |
|
|
2380 |
|
# now unused, upcasing is done in normal_text |
2381 |
sub t2h_default_sc_pre($$$) |
sub t2h_default_sc_pre($$$) |
2382 |
{ |
{ |
2383 |
shift; |
shift; |
2391 |
return ''; |
return ''; |
2392 |
} |
} |
2393 |
|
|
2394 |
|
# Avoid adding h1 if the text is empty |
2395 |
sub t2h_default_titlefont($$$) |
sub t2h_default_titlefont($$$) |
2396 |
{ |
{ |
2397 |
shift; |
shift; |
2400 |
return ''; |
return ''; |
2401 |
} |
} |
2402 |
|
|
2403 |
# According to the texinfo manual this shouldn't lead to a link |
# At some point in time (before 4.7?) according to the texinfo |
2404 |
# but rather be formatted like text. If we did like makeinfo do |
# manual, url shouldn't lead to a link but rather be formatted |
2405 |
# it would be |
# like text. It is now what indicateurl do, url is the same that |
2406 |
|
# uref with one arg. If we did like makeinfo did it would have been |
2407 |
#sub url($$) |
#sub url($$) |
2408 |
#{ |
#{ |
2409 |
# return '<<code>' . $_[0] . '</code>>'; |
# return '<<code>' . $_[0] . '</code>>'; |
2410 |
#} |
#} |
2411 |
|
# |
2412 |
|
# This is unused, t2h_default_uref is used instead |
2413 |
sub t2h_default_url ($$) |
sub t2h_default_url ($$) |
2414 |
{ |
{ |
2415 |
shift; |
shift; |
2719 |
'deftp', [ 't', 'category', 'name', 'arg' ], |
'deftp', [ 't', 'category', 'name', 'arg' ], |
2720 |
# basic x commands |
# basic x commands |
2721 |
# shortcuts |
# shortcuts |
2722 |
# i18n |
# FIXME i18n |
2723 |
'defun', 'deffn Function', |
'defun', 'deffn Function', |
2724 |
'defmac', 'deffn Macro', |
'defmac', 'deffn Macro', |
2725 |
'defspec', 'deffn {Special Form}', |
'defspec', 'deffn {Special Form}', |