Bug 4114 - sgml2latex fails for english documents, works for non english
sgml2latex fails for english documents, works for non english
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sgml-tools (Show other bugs)
6.0
All Linux
medium Severity high
: ---
: ---
Assigned To: Preston Brown
:
: 9955 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-07-19 10:51 EDT by Hans de Goede
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-11 11:51:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 1999-07-19 10:51:42 EDT
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 08:50:59 EDT
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 09:33:59 EDT
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 15:38:59 EDT
cristian, what do you think of this one?
Comment 4 Preston Brown 2000-02-11 11:51:59 EST
fixed in sgml-tools 1.0.9-5 and later.
Comment 5 Bill Nottingham 2000-06-10 18:04:45 EDT
*** Bug 9955 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.