With all tetex packages and sgmltools installed the following doesn't work: sgml2latex <a valid sgml file> I've tried both my own sgml files and a number of the howtos from howtos sgml. The error I get is: ! Package babel Error: You haven't specified a language option. I can fix this by doing: sgml2latex -l german <any sgml file> But then my contents is a Inhaltverzeichnisse. Doing sgml2latex -l en doesn't help since that is the default and doesn't make sgml2latex pass a language to tetex.
The problem is that the tex output for non-english languages contains \documentclass[letterpaper,german]{article} but for english one the language is missing \documentclass[letterpaper]{article} A simple fix: --- /usr/lib/sgml-tools/dist/fmt_latex2e.pl.orig Mon Mar 22 05:29:40 1999 +++ /usr/lib/sgml-tools/dist/fmt_latex2e.pl Thu Jul 22 14:46:24 1999 @@ -169,7 +169,7 @@ $latex2e->{makeindex}) { my $langlit = ISO2English ($global->{language}); - $langlit = ($langlit eq 'english') ? "" : ",$langlit"; + $langlit = ",$langlit"; my $replace = $global->{papersize} . 'paper' . $langlit; open OUTFILE, ">$filename.tex"; while (<$infile>)
The abovementioned fix should be really: --- fmt_latex2e.pl.orig Mon Mar 22 05:29:40 1999 +++ fmt_latex2e.pl Thu Jul 22 15:29:22 1999 @@ -162,14 +162,10 @@ # Set the correct \documentclass options. The if statement is just # a small optimization. # - if ($global->{language} ne "en" || - $global->{papersize} ne "a4" || - $latex2e->{pagenumber} != 1 || - $global->{pass} ne "" || - $latex2e->{makeindex}) + if (1) { my $langlit = ISO2English ($global->{language}); - $langlit = ($langlit eq 'english') ? "" : ",$langlit"; + $langlit = ",$langlit"; my $replace = $global->{papersize} . 'paper' . $langlit; open OUTFILE, ">$filename.tex"; while (<$infile>) Otherwise it does not function for a4 paper size.
cristian, what do you think of this one?
fixed in sgml-tools 1.0.9-5 and later.
*** Bug 9955 has been marked as a duplicate of this bug. ***