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 @@ ...@@ -4,7 +4,11 @@
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# LaTeX-specific driver stuff # LaTeX-specific driver stuff
# #
# Copyright 1994-1996, Matt Welsh
# Copyright 1996, Cees de Groot # 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 2000, Juan Jose Amor (Support for PDF files)
# Copyright 2006-2009, Agustin Martin # Copyright 2006-2009, Agustin Martin
# ------------------------------------------------------------------ # ------------------------------------------------------------------
...@@ -362,6 +366,11 @@ $latex2e->{postASP} = sub ...@@ -362,6 +366,11 @@ $latex2e->{postASP} = sub
s/\@CLASSOPTIONS\@/$classoptions/; s/\@CLASSOPTIONS\@/$classoptions/;
$_ = $_ . "\\makeindex\n" if ($latex2e->{makeindex}); $_ = $_ . "\\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 # Set correct babel options
elsif (/^\\usepackage\[\@BABELOPTIONS\@\]{babel}/) { elsif (/^\\usepackage\[\@BABELOPTIONS\@\]{babel}/) {
if ( $babeloptions ) { if ( $babeloptions ) {
......
% linuxdoc{,tr} to latex replacement file
% linuxdoc to latex replacement file %
% This file contains the replacements for both linuxdoc and linuxdoctr DTDs
% Support for PDF files added by Juan Jose Amor, January 2000 %
% Copyright 1994-1996, Matt Welsh
<qwertz> + % 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> + </qwertz> +
<article> + "\\documentclass\[@[email protected]\]{@[email protected]}\n" <article> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n" "\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n" "\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n" "\\usepackage{qwertz}\n"
"\\usepackage{url}\n" "\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n" "\\usepackage\[@[email protected]\]{inputenc}\n"
...@@ -26,7 +50,7 @@ ...@@ -26,7 +50,7 @@
<report> + "\\documentclass\[@[email protected]\]{@[email protected]}\n" <report> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n" "\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n" "\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n" "\\usepackage{qwertz}\n"
"\\usepackage{url}\n" "\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n" "\\usepackage\[@[email protected]\]{inputenc}\n"
...@@ -45,7 +69,7 @@ ...@@ -45,7 +69,7 @@
<book> + "\\documentclass\[@[email protected]\]{@[email protected]}\n" <book> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n" "\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n" "\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n" "\\usepackage{qwertz}\n"
"\\usepackage{url}\n" "\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n" "\\usepackage\[@[email protected]\]{inputenc}\n"
...@@ -65,7 +89,7 @@ ...@@ -65,7 +89,7 @@
<notes> + "\\documentclass\[@[email protected]\]{@[email protected]}\n" <notes> + "\\documentclass\[@[email protected]\]{@[email protected]}\n"
"\\usepackage{ifpdf}\n" "\\usepackage{ifpdf}\n"
"\\usepackage{linuxdoc-sgml}\n" "\\usepackage{@[email protected]-sgml}\n"
"\\usepackage{qwertz}\n" "\\usepackage{qwertz}\n"
"\\usepackage{url}\n" "\\usepackage{url}\n"
"\\usepackage\[@[email protected]\]{inputenc}\n" "\\usepackage\[@[email protected]\]{inputenc}\n"
...@@ -76,13 +100,13 @@ ...@@ -76,13 +100,13 @@
"\\usepackage{epsfig}\n" "\\usepackage{epsfig}\n"
"\\usepackage{[OPTS]}\n" "\\usepackage{[OPTS]}\n"
"\\def\\title#1{\n" "\\def\\title#1{\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\bf\n" "\\bf\n"
"#1\n" "#1\n"
"\\end{center}\n" "\\end{center}\n"
"\\bigskip\n" "\\bigskip\n"
"}\n" "}\n"
"\\begin{document}%end-preamble\n" "\\begin{document}%end-preamble\n"
</notes> + "\\end{document}" + </notes> + "\\end{document}" +
...@@ -91,7 +115,7 @@ ...@@ -91,7 +115,7 @@
</dina4> </dina4>
% Manual Pages are expected to be formatted using nroff (or groff), unless % 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>
</manpage> </manpage>
...@@ -100,17 +124,17 @@ ...@@ -100,17 +124,17 @@
</titlepag> + "\n\n\\begin{document}\n" </titlepag> + "\n\n\\begin{document}\n"
"\\maketitle\n" + "\\maketitle\n" +
<title> + "\\title{" <title> + "\\title{"
</title> "}" + </title> "}" +
<subtitle> "\\\\\n" <subtitle> "\\\\\n"
"{\\large " "{\\large "
</subtitle> "}" + </subtitle> "}" +
<author> + "\\author{" <author> + "\\author{"
</author> "}" + </author> "}" +
<name> <name>
</name> </name>
% <and> "\\and " + % <and> "\\and " +
...@@ -128,14 +152,14 @@ ...@@ -128,14 +152,14 @@
<date> + "\\date{" <date> + "\\date{"
</date> "}" + </date> "}" +
<newline> "\\\\ " <newline> "\\\\ "
</newline> </newline>
<label> "\\label{[ID]}" <label> "\\label{[ID]}"
</label> </label>
<header> + "\\markboth" <header> + "\\markboth"
</header> </header>
<lhead> "{" <lhead> "{"
</lhead> "}" </lhead> "}"
...@@ -150,7 +174,7 @@ ...@@ -150,7 +174,7 @@
</comment> "}" </comment> "}"
% Hacked by mdw to use linuxdoc-sgml \abstract{...} % Hacked by mdw to use linuxdoc-sgml \abstract{...}
<abstract> + "\\abstract{" <abstract> + "\\abstract{"
</abstract> "}" + </abstract> "}" +
<appendix> + "\n \\appendix \n" + <appendix> + "\n \\appendix \n" +
...@@ -178,15 +202,15 @@ ...@@ -178,15 +202,15 @@
</sect2> </sect2>
<sect3> + "\n\\paragraph" <sect3> + "\n\\paragraph"
</sect3> </sect3>
<sect4> + "\n\\subparagraph" <sect4> + "\n\\subparagraph"
</sect4> </sect4>
<heading> "{" <heading> "{"
</heading> "}\n\n" </heading> "}\n\n"
<p> <p>
</p> "\n\n" </p> "\n\n"
<itemize> + "\\begin{itemize}" + <itemize> + "\\begin{itemize}" +
...@@ -284,16 +308,16 @@ ...@@ -284,16 +308,16 @@
"\\fi{}\n" "\\fi{}\n"
</htmlurl> </htmlurl>
<x> <x>
</x> </x>
<mc> <mc>
</mc> </mc>
<biblio> + "\\bibliographystyle{[STYLE]}\n" <biblio> + "\\bibliographystyle{[STYLE]}\n"
"\\bibliography{[FILES]}\n" "\\bibliography{[FILES]}\n"
"\\addbibtoc{}" + "\\addbibtoc{}" +
</biblio> </biblio>
% <macro> + "\\macro{[ID]}{\\qw[ID]}" % <macro> + "\\macro{[ID]}{\\qw[ID]}"
% </macro> % </macro>
...@@ -343,19 +367,19 @@ ...@@ -343,19 +367,19 @@
<thtag> "\[" <thtag> "\["
</thtag> "\]" + </thtag> "\]" +
% mathematics % mathematics
<f> "$" <f> "$"
</f> "$" </f> "$"
<dm> + "\\\[" <dm> + "\\\["
</dm> "\\\]" + </dm> "\\\]" +
<eq> + "\\begin{equation}" + <eq> + "\\begin{equation}" +
</eq> + "\\end{equation}\n" + </eq> + "\\end{equation}\n" +
<fr> "\\frac" <fr> "\\frac"
</fr> </fr>
<nu> "{" <nu> "{"
</nu> "}" </nu> "}"
...@@ -363,7 +387,7 @@ ...@@ -363,7 +387,7 @@
<de> "{" <de> "{"
</de> "}" </de> "}"
<lim> <lim>
</lim> </lim>
<op> <op>
...@@ -385,7 +409,7 @@ ...@@ -385,7 +409,7 @@
</in> </in>
<sum> "\\sum" <sum> "\\sum"
</sum> </sum>
<root> "\\sqrt\[[n]\]{" <root> "\\sqrt\[[n]\]{"
</root> "}" </root> "}"
...@@ -437,15 +461,15 @@ ...@@ -437,15 +461,15 @@
"\\else\n" "\\else\n"
"\\centerline{\\epsfig{file=[FILE],height=[HEIGHT],angle=[ANGLE]}}" "\\centerline{\\epsfig{file=[FILE],height=[HEIGHT],angle=[ANGLE]}}"
"\\fi\n" + "\\fi\n" +
</eps> </eps>
<img> + "\\ifpdf\n" <img> + "\\ifpdf\n"
"\\centerline{\\epsfig{file=[SRC]}}" "\\centerline{\\epsfig{file=[SRC]}}"
"\\fi\n" + "\\fi\n" +
</img> </img>
<ph> + "\\vspace{[VSPACE]}\n\\par" + <ph> + "\\vspace{[VSPACE]}\n\\par" +
</ph> </ph>
<caption> + "\\caption{" <caption> + "\\caption{"
</caption> "}" + </caption> "}" +
...@@ -472,18 +496,18 @@ ...@@ -472,18 +496,18 @@
% slides % slides
<slides> + "\\documentclass\[qwertz,dina4,xlatin1,[OPTS]\]{article}\n" <slides> + "\\documentclass\[qwertz,dina4,xlatin1,[OPTS]\]{article}\n"
"\\input{epsf.tex}\n" "\\input{epsf.tex}\n"
"\\def\\title#1{\n" "\\def\\title#1{\n"
"\\begin{center}\n" "\\begin{center}\n"
"\\bf\\LARGE\n" "\\bf\\LARGE\n"
"#1\n" "#1\n"
"\\end{center}\n" "\\end{center}\n"
"\\bigskip\n" "\\bigskip\n"
"}\n" "}\n"
"\\begin{document}" + "\\begin{document}" +
</slides> + "\\end{document}" + </slides> + "\\end{document}" +
<slide> <slide>
</slide> + "\\newpage" + </slide> + "\\newpage" +
% letters % letters
...@@ -500,13 +524,13 @@ ...@@ -500,13 +524,13 @@
"\\addtolength{\\evensidemargin}{-4.0mm} \n" "\\addtolength{\\evensidemargin}{-4.0mm} \n"
"\\setlength{\\unitlength}{ 1.0mm } \n" "\\setlength{\\unitlength}{ 1.0mm } \n"
% initial values for optional elements in the % initial values for optional elements in the
% letter head % letter head
"\\def\\semail{} \n" "\\def\\semail{} \n"
"\\def\\remail{} \n" "\\def\\remail{} \n"
"\\def\\sphone{} \n" "\\def\\sphone{} \n"
"\\def\\rphone{} \n" "\\def\\rphone{} \n"
"\\def\\sref{} \n" "\\def\\sref{} \n"
"\\def\\rref{} \n" "\\def\\rref{} \n"
"\\def\\rdate{} \n" "\\def\\rdate{} \n"
...@@ -529,7 +553,7 @@ ...@@ -529,7 +553,7 @@
"\\newif\\iffax\n" "\\newif\\iffax\n"
"\\faxfalse\n" "\\faxfalse\n"
"\\def\\letterhead{\n" "\\def\\letterhead{\n"
"\\begin{picture}(178,54) \n" "\\begin{picture}(178,54) \n"
"\\put(0,50){\\agb GESELLSCHAFT F\\\"{U}R MATHEMATIK UND \n" "\\put(0,50){\\agb GESELLSCHAFT F\\\"{U}R MATHEMATIK UND \n"
...@@ -590,7 +614,7 @@ ...@@ -590,7 +614,7 @@
<telefax> + "\\documentstyle\[[OPTS],qwertz,dina4,xlatin1\]{article}\n" <telefax> + "\\documentstyle\[[OPTS],qwertz,dina4,xlatin1\]{article}\n"
"\\def\\faxlength{[LENGTH]}\n" "\\def\\faxlength{[LENGTH]}\n"
% initial values for optional elements in the % initial values for optional elements in the
% letter head % letter head
"\\def\\semail{} \n" "\\def\\semail{} \n"
...@@ -618,7 +642,7 @@ ...@@ -618,7 +642,7 @@
"\\newif\\iffax\n" "\\newif\\iffax\n"
"\\faxtrue\n" "\\faxtrue\n"
"\\def\\letterhead{\n" "\\def\\letterhead{\n"
"\\newfont{\\gmd}{gmdlogo}\n" "\\newfont{\\gmd}{gmdlogo}\n"
"\\setlength{\\parindent}{0pt}\n" "\\setlength{\\parindent}{0pt}\n"
...@@ -738,20 +762,20 @@ ...@@ -738,20 +762,20 @@
"\\parbox\[t\]{\\textwidth} " "\\parbox\[t\]{\\textwidth} "
"{" "{"
</closing> + "}\\vspace{2cm}\n\\par\n" </closing> + "}\\vspace{2cm}\n\\par\n"
"\\sname \n" "\\sname \n"
"\\ifcc{\\vspace{0.5cm}\n\\par\n" "\\ifcc{\\vspace{0.5cm}\n\\par\n"
"cc:\\ \\ \\parbox\[t\]{14cm}{\n" "cc:\\ \\ \\parbox\[t\]{14cm}{\n"
"\\cc}\\fi\n" + "\\cc}\\fi\n" +
<cc> + "\\cctrue\n" <cc> + "\\cctrue\n"
"\\def\\cc{" "\\def\\cc{"
</cc> "}" + </cc> "}" +
<encl> + "\\vspace{0.5cm}\n\\par\n" <encl> + "\\vspace{0.5cm}\n\\par\n"
"encl:\\ \\ \\parbox\[t\]{14cm}{" "encl:\\ \\ \\parbox\[t\]{14cm}{"
</encl> "}\n\n" + </encl> "}\n\n" +
<ps> + "\\vspace{0.5cm}\n\\par" + <ps> + "\\vspace{0.5cm}\n\\par" +
</ps> </ps>
......
This diff is collapsed.
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# Copyright 1996, Cees de Groot. # Copyright 1996, Cees de Groot.
# Copyright 2000, Taketoshi Sano # Copyright 2000, Taketoshi Sano
# Copyright 2006-2008, Agustin Martin # Copyright 2006-2009, Agustin Martin
# -------------------------------------------------------------------------------- # --------------------------------------------------------------------------------
package LinuxDocTools; package LinuxDocTools;
...@@ -589,6 +589,8 @@ sub process_file { ...@@ -589,6 +589,8 @@ sub process_file {
$dtd = $dtd2; $dtd = $dtd2;
} }
$global->{'dtd'} = $dtd;
# Search order: # Search order:
# - datadir/site/<dtd>/<format> # - datadir/site/<dtd>/<format>
# - datadir/dist/<dtd>/<format> # - datadir/dist/<dtd>/<format>
...@@ -618,7 +620,7 @@ sub process_file { ...@@ -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") { if ($dtd eq "linuxdoctr") {
$mapping = "$main::DataDir/mappings/$global->{format}/tr-mapping"; $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