Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 4114 - sgml2latex fails for english documents, works for non english
Summary: sgml2latex fails for english documents, works for non english
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sgml-tools
Version: 6.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Preston Brown
QA Contact:
URL:
Whiteboard:
: 9955 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-19 14:51 UTC by Hans de Goede
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-02-11 16:51:19 UTC


Attachments (Terms of Use)

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. ***


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