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 @LINUXDOC_DTD@ 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
<qwertz> +
% 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\[@CLASSOPTIONS@\]{@ARTICLE@}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@LINUXDOC_DTD@-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@CHARSET@\]{inputenc}\n"
......@@ -26,7 +50,7 @@
<report> + "\\documentclass\[@CLASSOPTIONS@\]{@REPORT@}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@LINUXDOC_DTD@-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@CHARSET@\]{inputenc}\n"
......@@ -45,7 +69,7 @@
<book> + "\\documentclass\[@CLASSOPTIONS@\]{@BOOK@}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@LINUXDOC_DTD@-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@CHARSET@\]{inputenc}\n"
......@@ -65,7 +89,7 @@
<notes> + "\\documentclass\[@CLASSOPTIONS@\]{@ARTICLE@}\n"
"\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n"
"\\usepackage{@LINUXDOC_DTD@-sgml}\n"
"\\usepackage{qwertz}\n"
"\\usepackage{url}\n"
"\\usepackage\[@CHARSET@\]{inputenc}\n"
......@@ -76,13 +100,13 @@
"\\usepackage{epsfig}\n"
"\\usepackage{[OPTS]}\n"
"\\def\\title#1{\n"
"\\begin{center}\n"
"\\bf\n"
"\\begin{center}\n"
"\\bf\n"
"#1\n"
"\\end{center}\n"
"\\bigskip\n"
"\\bigskip\n"
"}\n"
"\\begin{document}%end-preamble\n"
"\\begin{document}%end-preamble\n"
</notes> + "\\end{document}" +
......@@ -91,7 +115,7 @@
</dina4>
% Manual Pages are expected to be formatted using nroff (or groff), unless
% they are included as sections of other qwertz documents.
% they are included as sections of other qwertz documents.
<manpage>
</manpage>
......@@ -100,17 +124,17 @@
</titlepag> + "\n\n\\begin{document}\n"
"\\maketitle\n" +
<title> + "\\title{"
<title> + "\\title{"
</title> "}" +
<subtitle> "\\\\\n"
"{\\large "
</subtitle> "}" +
<author> + "\\author{"
<author> + "\\author{"
</author> "}" +
<name>
<name>
</name>
% <and> "\\and " +
......@@ -128,14 +152,14 @@
<date> + "\\date{"
</date> "}" +
<newline> "\\\\ "
<newline> "\\\\ "
</newline>
<label> "\\label{[ID]}"
</label>
</label>
<header> + "\\markboth"
</header>
</header>
<lhead> "{"
</lhead> "}"
......@@ -150,7 +174,7 @@
</comment> "}"
% Hacked by mdw to use linuxdoc-sgml \abstract{...}
<abstract> + "\\abstract{"
<abstract> + "\\abstract{"
</abstract> "}" +
<appendix> + "\n \\appendix \n" +
......@@ -178,15 +202,15 @@
</sect2>
<sect3> + "\n\\paragraph"
</sect3>
</sect3>
<sect4> + "\n\\subparagraph"
</sect4>
<heading> "{"
</heading> "}\n\n"
</heading> "}\n\n"
<p>
<p>
</p> "\n\n"
<itemize> + "\\begin{itemize}" +
......@@ -284,16 +308,16 @@
"\\fi{}\n"
</htmlurl>
<x>
<x>
</x>
<mc>
<mc>
</mc>
<biblio> + "\\bibliographystyle{[STYLE]}\n"
"\\bibliography{[FILES]}\n"
"\\addbibtoc{}" +
</biblio>
</biblio>
% <macro> + "\\macro{[ID]}{\\qw[ID]}"
% </macro>
......@@ -343,19 +367,19 @@
<thtag> "\["
</thtag> "\]" +
% mathematics
% mathematics
<f> "$"
</f> "$"
<dm> + "\\\["
<dm> + "\\\["
</dm> "\\\]" +
<eq> + "\\begin{equation}" +
</eq> + "\\end{equation}\n" +
<fr> "\\frac"
</fr>
</fr>
<nu> "{"
</nu> "}"
......@@ -363,7 +387,7 @@
<de> "{"
</de> "}"
<lim>
<lim>
</lim>
<op>
......@@ -385,7 +409,7 @@
</in>
<sum> "\\sum"
</sum>
</sum>
<root> "\\sqrt\[[n]\]{"
</root> "}"
......@@ -437,15 +461,15 @@
"\\else\n"
"\\centerline{\\epsfig{file=[FILE],height=[HEIGHT],angle=[ANGLE]}}"
"\\fi\n" +
</eps>
</eps>
<img> + "\\ifpdf\n"
"\\centerline{\\epsfig{file=[SRC]}}"
"\\fi\n" +
</img>
</img>
<ph> + "\\vspace{[VSPACE]}\n\\par" +
</ph>
</ph>
<caption> + "\\caption{"
</caption> "}" +
......@@ -472,18 +496,18 @@
% slides
<slides> + "\\documentclass\[qwertz,dina4,xlatin1,[OPTS]\]{article}\n"
"\\input{epsf.tex}\n"
"\\input{epsf.tex}\n"
"\\def\\title#1{\n"
"\\begin{center}\n"
"\\bf\\LARGE\n"
"\\begin{center}\n"
"\\bf\\LARGE\n"
"#1\n"
"\\end{center}\n"
"\\bigskip\n"
"\\bigskip\n"
"}\n"
"\\begin{document}" +
</slides> + "\\end{document}" +
<slide>
<slide>
</slide> + "\\newpage" +
% letters
......@@ -500,13 +524,13 @@
"\\addtolength{\\evensidemargin}{-4.0mm} \n"
"\\setlength{\\unitlength}{ 1.0mm } \n"
% initial values for optional elements in the
% initial values for optional elements in the
% letter head
"\\def\\semail{} \n"
"\\def\\remail{} \n"
"\\def\\sphone{} \n"
"\\def\\rphone{} \n"
"\\def\\rphone{} \n"
"\\def\\sref{} \n"
"\\def\\rref{} \n"
"\\def\\rdate{} \n"
......@@ -529,7 +553,7 @@
"\\newif\\iffax\n"
"\\faxfalse\n"
"\\def\\letterhead{\n"
"\\begin{picture}(178,54) \n"
"\\put(0,50){\\agb GESELLSCHAFT F\\\"{U}R MATHEMATIK UND \n"
......@@ -590,7 +614,7 @@
<telefax> + "\\documentstyle\[[OPTS],qwertz,dina4,xlatin1\]{article}\n"
"\\def\\faxlength{[LENGTH]}\n"
% initial values for optional elements in the
% initial values for optional elements in the
% letter head
"\\def\\semail{} \n"
......@@ -618,7 +642,7 @@
"\\newif\\iffax\n"
"\\faxtrue\n"
"\\def\\letterhead{\n"
"\\newfont{\\gmd}{gmdlogo}\n"
"\\setlength{\\parindent}{0pt}\n"
......@@ -738,20 +762,20 @@
"\\parbox\[t\]{\\textwidth} "
"{"
</closing> + "}\\vspace{2cm}\n\\par\n"
"\\sname \n"
"\\ifcc{\\vspace{0.5cm}\n\\par\n"
"\\sname \n"
"\\ifcc{\\vspace{0.5cm}\n\\par\n"
"cc:\\ \\ \\parbox\[t\]{14cm}{\n"
"\\cc}\\fi\n" +
<cc> + "\\cctrue\n"
"\\def\\cc{"
</cc> "}" +
<encl> + "\\vspace{0.5cm}\n\\par\n"
<encl> + "\\vspace{0.5cm}\n\\par\n"
"encl:\\ \\ \\parbox\[t\]{14cm}{"
</encl> "}\n\n" +
<ps> + "\\vspace{0.5cm}\n\\par" +
<ps> + "\\vspace{0.5cm}\n\\par" +
</ps>
......
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