\input texinfo @c -*-texinfo-*-
@c %**start of header
+@ifhtml
+@documentencoding UTF-8
+@end ifhtml
@setfilename gettext.info
@settitle GNU @code{gettext} utilities
@finalout
and maintainers.
@example
+@ifhtml
+@group
+Original C Sources ───> Preparation ───> Marked C Sources ───╮
+ │
+ ╭─────────<─── GNU gettext Library │
+╭─── make <───┤ │
+│ ╰─────────<────────────────────┬───────────────╯
+│ │
+│ ╭─────<─── PACKAGE.pot <─── xgettext <───╯ ╭───<─── PO Compendium
+│ │ │ ↑
+│ │ ╰───╮ │
+│ ╰───╮ ├───> PO editor ───╮
+│ ├────> msgmerge ──────> LANG.po ────>────────╯ │
+│ ╭───╯ │
+│ │ │
+│ ╰─────────────<───────────────╮ │
+│ ├─── New LANG.po <────────────────────╯
+│ ╭─── LANG.gmo <─── msgfmt <───╯
+│ │
+│ ╰───> install ───> /.../LANG/PACKAGE.mo ───╮
+│ ├───> "Hello world!"
+╰───────> install ───> /.../bin/PROGRAM ───────╯
+@end group
+@end ifhtml
+@ifnothtml
@group
Original C Sources ---> Preparation ---> Marked C Sources ---.
|
| +---> "Hello world!"
`-------> install ---> /.../bin/PROGRAM -------'
@end group
+@end ifnothtml
@end example
@cindex marking translatable strings
@end smallexample
But this does not solve the problem. It helps languages where the
-plural form of a noun is not simply constructed by adding an `s' but
-that is all. Once again people fell into the trap of believing the
+plural form of a noun is not simply constructed by adding an
+@ifhtml
+‘s’
+@end ifhtml
+@ifnothtml
+`s'
+@end ifnothtml
+but that is all. Once again people fell into the trap of believing the
rules their language is using are universal. But the handling of plural
forms differs widely between the language families. For example,
Rafal Maszkowski @code{<rzm@@mat.uni.torun.pl>} reports:
languages which have many irregularities. German, for instance, is a
drastic case. Though English and German are part of the same language
family (Germanic), the almost regular forming of plural noun forms
-(appending an `s') is hardly found in German.
+(appending an
+@ifhtml
+‘s’)
+@end ifhtml
+@ifnothtml
+`s')
+@end ifnothtml
+is hardly found in German.
@item
The number of plural forms differ. This is somewhat surprising for
# #
#-##############################################################################
-# @(#)texi2html 1.52a 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
+# @(#)texi2html 1.52b 01/05/98 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
# 1.52a: Use acute accent instead of apostrophe. Add support for ISO-8859-1
# characters with cedilla, circumflex etc.
+# 1.52b: Add option -expandtex. Expand @ifhtml by default, not @ifinfo.
+# Use Unicode quotation marks instead of grave and acute accents.
+# Emit charset=UTF-8 declaration.
# The man page for this program is included at the end of this file and can be
# viewed using the command 'nroff -man texi2html'.
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
$ERROR = "***"; # prefix for errors and warnings
-$THISPROG = "texi2html 1.52a"; # program name and version
+$THISPROG = "texi2html 1.52b"; # program name and version
$HOMEPAGE = "http://wwwinfo.cern.ch/dis/texi2html/"; # program home page
$TODAY = &pretty_date; # like "20 September 1993"
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
$doctype = '';
$check = 0;
$expandinfo = 0;
+$expandtex = 0;
$use_glossary = 0;
$invisible_mark = '';
$use_iso = 0;
This is $THISPROG
To convert a Texinfo file to HMTL: $0 [options] file
where options can be:
- -expandinfo : use \@ifinfo sections, not \@iftex
+ -expandinfo : use \@ifinfo sections, not \@ifhtml
+ -expandtex : use \@iftex sections, not \@ifhtml
-glossary : handle a glossary
-invisible name: use 'name' as an invisible anchor
-Dname : define name like with \@set
if (/^-d(ebug)?(\d+)?$/) { $debug = $2 || shift(@ARGV); next; }
if (/^-doctype$/) { $doctype = shift(@ARGV); next; }
if (/^-c(heck)?$/) { $check = 1; next; }
- if (/^-e(xpandinfo)?$/) { $expandinfo = 1; next; }
+ if (/^-expandi(nfo)?$/) { $expandinfo = 1; next; }
+ if (/^-expandt(ex)?$/) { $expandtex = 1; next; }
if (/^-g(lossary)?$/) { $use_glossary = 1; next; }
if (/^-i(nvisible)?$/) { $invisible_mark = shift(@ARGV); next; }
if (/^-iso$/) { $use_iso = 1; next; }
if ($expandinfo) {
$to_skip{'ifinfo'}++;
$to_skip{'end ifinfo'}++;
-} else {
+ $to_skip{'ifnottex'}++;
+ $to_skip{'end ifnottex'}++;
+ $to_skip{'ifnothtml'}++;
+ $to_skip{'end ifnothtml'}++;
+} elsif ($expandtex) {
+ $to_skip{'ifnotinfo'}++;
+ $to_skip{'end ifnotinfo'}++;
$to_skip{'iftex'}++;
$to_skip{'end iftex'}++;
+ $to_skip{'ifnothtml'}++;
+ $to_skip{'end ifnothtml'}++;
+} else {
+ $to_skip{'ifnotinfo'}++;
+ $to_skip{'end ifnotinfo'}++;
+ $to_skip{'ifnottex'}++;
+ $to_skip{'end ifnottex'}++;
+ $to_skip{'ifhtml'}++;
+ $to_skip{'end ifhtml'}++;
}
$invisible_mark = '<IMG SRC="invisible.xbm">' if $invisible_mark eq 'xbm';
die $usage unless @ARGV == 1;
# variables
#
$value{'html'} = 1; # predefine html (the output format)
-$value{'texi2html'} = '1.52a'; # predefine texi2html (the translator)
+$value{'texi2html'} = '1.52b'; # predefine texi2html (the translator)
# _foo: internal to track @foo
foreach ('_author', '_title', '_subtitle',
'_settitle', '_setfilename') {
s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/;
# non-@ substitutions cf. texinfmt.el
unless ($in_pre) {
- s/``/\"/g;
- s/''/\"/g;
+ s/``/“/g;
+ s/''/”/g;
s/([\w ])---([\w ])/$1--$2/g;
}
#
# skip lines
&skip_until($tag), next if $tag eq 'ignore';
if ($expandinfo) {
+ &skip_until($tag), next if $tag eq 'ifnotinfo';
&skip_until($tag), next if $tag eq 'iftex';
+ &skip_until($tag), next if $tag eq 'ifhtml';
+ } elsif ($expandtex) {
+ &skip_until($tag), next if $tag eq 'ifinfo';
+ &skip_until($tag), next if $tag eq 'ifnottex';
+ &skip_until($tag), next if $tag eq 'ifhtml';
} else {
&skip_until($tag), next if $tag eq 'ifinfo';
+ &skip_until($tag), next if $tag eq 'iftex';
+ &skip_until($tag), next if $tag eq 'ifnothtml';
}
&skip_until($tag), next if $tag eq 'tex';
# handle special tables
if (@args == 5) { # reference to another manual
$sec = $args[2] || $node;
$man = $args[4] || $args[3];
- $_ = "${before}${type}section `$sec' in \@cite{$man}$after";
+ $_ = "${before}${type}section ‘$sec’ in \@cite{$man}$after";
} elsif ($type =~ /Info/) { # inforef
warn "$ERROR Wrong number of arguments: $_" unless @args == 3;
($nn, $_, $in) = @args;
- $_ = "${before}${type} file `$in', node `$nn'$after";
+ $_ = "${before}${type} file ‘$in’, node ‘$nn’$after";
} elsif ($sec) {
$href = $node2href{$node};
$_ = "${before}${type}section " . &anchor('', $href, $sec) . $after;
if (defined($style)) { # known style
if ($style =~ /^\"/) { # add quotes
$style = $';
- $text = "\`$text\´";
+ $text = "\‘$text\’";
}
if ($style =~ /^\&/) { # custom
$style = $';
<HTML>
<HEAD>
$header
+<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
<TITLE>$_</TITLE>
</HEAD>
<BODY>
print FILE <<EOT;
This document was generated on $TODAY using the
<A HREF=\"$HOMEPAGE\">texi2html</A>
-translator version 1.52a.</P>
+translator version 1.52b.</P>
EOT
&print_footer;
}
.I texi2html
are closer to TeX than to Info, that's why
.I texi2html
-converts @iftex sections and not @ifinfo ones by default. You can reverse
-this with the \-expandinfo option.
+converts @ifhtml sections and not @ifinfo or @iftex ones by default. You can
+change this with the \-expandinfo or \-expandtex options.
.SH OPTIONS
.TP 12
.B \-check
to find the Texinfo commands that have been left in the HTML file.
.TP
.B \-expandinfo
-Expand @ifinfo sections, not @iftex ones.
+Expand @ifinfo sections, not @ifhtml ones.
+.TP
+.B \-expandtex
+Expand @iftex sections, not @ifhtml ones.
.TP
.B \-glossary
Use the section named 'Glossary' to build a list of terms and put links in the HTML
.B @end ifhtml
This indicates the end of an HTML section.
.SH VERSION
-This is \fItexi2html\fP version 1.52a, 01/05/98.
+This is \fItexi2html\fP version 1.52b, 01/05/98.
.PP
The latest version of \fItexi2html\fP can be found in WWW, cf. URL
http://wwwinfo.cern.ch/dis/texi2html/
World Wide Web (WWW).
.SH BUGS
This program does not understand all Texinfo commands (yet).
-.PP
-TeX specific commands (normally enclosed in @iftex) will be
-passed unmodified.
.ex