info: Add minimal support for tr variant.

parent d81aef26
% linuxdoc to texinfo replacement file
% linuxdoc{,tr} to texinfo replacement file
%
% This file contains the replacements for both linuxdoc and linuxdoctr DTDs
% Heavily based on qwertz one
%
% Copyright 1994-1996, Matt Welsh
% Copyright 1996, Cees de Groot
% Copyright 1999-2000, Taketoshi Sano
% Copyright 2008-2009 Agustin Martin
% ------------------------------------------------------------------
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% linuxdoc specific things (currently nothing)
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% linuxdoctr specific things
% ------------------------------------------------------------------------
<trans> + "@ldt_translator "
</trans>
<tdate> + "@ldt_tdate "
</tdate>
% ------------------------------------------------------------------------
% Everything common to linuxdoc and linuxdoctr DTDs
% ------------------------------------------------------------------------
<qwertz> +
</qwertz> +
......
......@@ -184,6 +184,10 @@ sub info_parse_raw_file {
$docdata{'author'} = $_;
} elsif (s/^\@subtitle\s+//){
$docdata{'subtitle'} = $_;
} elsif (s/^\@ldt_translator\s+//){
$docdata{'translator'} = $_;
} elsif (s/^\@ldt_tdate\s+//){
$docdata{'tdate'} = $_;
} else {
push @inputtext, $_;
}
......@@ -270,11 +274,22 @@ sub info_write_preprocessed_file {
}
} elsif (s/^\@TOP//){
$texinfo .= "\@node top\n"
. "\@top " . $docdata->{'title'} . "\n"
. "\@example\n"
. $docdata->{'author'} . "\n"
. $docdata->{'subtitle'} . "\n"
. "\@end example\n";
. "\@top " . $docdata->{'title'} . "\n\n"
. "\@example\n";
$texinfo .= $docdata->{'author'} . "\n"
if ( defined $docdata->{'author'} );
$texinfo .= $docdata->{'subtitle'} . "\n"
if ( defined $docdata->{'subtitle'} );
$texinfo .= $docdata->{'translator'} . "\n"
if ( defined $docdata->{'translator'} );
$texinfo .= $docdata->{'tdate'} . "\n"
if ( defined $docdata->{'tdate'} );
$texinfo .= "\@end example\n";
} else {
$texinfo .= "$_\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment