Merge tr mapping file in main one for latex2e backend.

 * latex2e/{mapping,tr-mapping}
   - Include tr-mapping functionality into mapping.
   - Remove no longer needed latex2e/tr-mapping.
 * perl5lib/LinuxDocTools.pm:
   - Do not use tr-mapping for latex2e backend.
   - Set $global{'dtd'} to current DTD.
 * fmt_latex2e.pl: Replace @[email protected] by actual DTD.
 * Update Copyright notices.
parent e807e86b
......@@ -4,7 +4,11 @@
# ------------------------------------------------------------------
# LaTeX-specific driver stuff
#
# Copyright 1994-1996, Matt Welsh
# Copyright 1996, Cees de Groot
# Copyright 1999-2002, Taketoshi Sano
# Copyright 1999, Kazuyuki Okamoto (euc-jp support in sgml2txt, sgml2html, and sgml2latex)
# Copyright 1999, Tetsu ONO (euc-jp support in sgml2txt, sgml2html, and sgml2latex)
# Copyright 2000, Juan Jose Amor (Support for PDF files)
# Copyright 2006-2009, Agustin Martin
# ------------------------------------------------------------------
......@@ -362,6 +366,11 @@ $latex2e->{postASP} = sub
s/\@CLASSOPTIONS\@/$classoptions/;
$_ = $_ . "\\makeindex\n" if ($latex2e->{makeindex});
}
# Set correct DTD name
elsif (/^\\usepackage{\@LINUXDOC_DTD\@-sgml}/) {
my $dtd = $global->{"dtd"};
s/\@LINUXDOC_DTD\@/$dtd/;
}
# Set correct babel options
elsif (/^\\usepackage\[\@BABELOPTIONS\@\]{babel}/) {
if ( $babeloptions ) {
......
% linuxdoc to latex replacement file
% Support for PDF files added by Juan Jose Amor, January 2000
% linuxdoc{,tr} to latex replacement file
%
% This file contains the replacements for both linuxdoc and linuxdoctr DTDs
%
% Copyright 1994-1996, Matt Welsh
% Copyright 1996-1998, Cees de Groot
% Copyright 1999-2002, Taketoshi Sano
% Copyright 2000, Juan Jose Amor (Support for PDF files)
% Copyright 2006-2009, Agustin Martin
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% linuxdoc specific things (currently nothing)
% ------------------------------------------------------------------------
% ------------------------------------------------------------------------
% linuxdoctr specific things
% ------------------------------------------------------------------------
<trans> + "\\trans{"
</trans> "}" +
<tdate> + "\\tdate{"
</tdate> "}" +
% ------------------------------------------------------------------------
% Everything common to linuxdoc and linuxdoctr DTDs
% ------------------------------------------------------------------------
<qwertz> +
</qwertz> +
<article> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n"
......@@ -26,7 +50,7 @@
<report> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n"
......@@ -45,7 +69,7 @@
<book> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n"
......@@ -65,7 +89,7 @@
<notes> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n"
......
This diff is collapsed.
......@@ -7,7 +7,7 @@
#
# Copyright 1996, Cees de Groot.
# Copyright 2000, Taketoshi Sano
# Copyright 2006-2008, Agustin Martin
# Copyright 2006-2009, Agustin Martin
# --------------------------------------------------------------------------------
package LinuxDocTools;
......@@ -589,6 +589,8 @@ sub process_file {
$dtd = $dtd2;
}
$global->{'dtd'} = $dtd;
# Search order:
# - datadir/site/<dtd>/<format>
# - datadir/dist/<dtd>/<format>
......@@ -618,7 +620,7 @@ sub process_file {
}
}
if ($global->{format} eq "groff" or $global->{format} eq "latex2e"){
if ($global->{format} eq "groff"){
if ($dtd eq "linuxdoctr") {
$mapping = "$main::DataDir/mappings/$global->{format}/tr-mapping";
}
......
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