Bug 4114

Summary: sgml2latex fails for english documents, works for non english
Product: [Retired] Red Hat Linux Reporter: Hans de Goede <j.w.r.degoede>
Component: sgml-toolsAssignee: Preston Brown <pbrown>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.0CC: pbrown, stano
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-11 16:51:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans de Goede 1999-07-19 14:51:42 UTC
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.

Comment 1 stano 1999-07-22 12:50:59 UTC
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>)

Comment 2 stano 1999-07-22 13:33:59 UTC
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.

Comment 3 Preston Brown 1999-09-23 19:38:59 UTC
cristian, what do you think of this one?

Comment 4 Preston Brown 2000-02-11 16:51:59 UTC
fixed in sgml-tools 1.0.9-5 and later.

Comment 5 Bill Nottingham 2000-06-10 22:04:45 UTC
*** Bug 9955 has been marked as a duplicate of this bug. ***