Package: linuxdoc-tools
Version: 0.9.21-0.2
Severity: normal
Patch:

Hi,

I see that linuxdoc-tools is active again, even if is through NMU.

Time to let you know about a problem with indent levels when sgml2lyx is
used. Sometimes current @/tag@ code makes list start command being skipped,
so indent level is not made deeper. However list end command is parsed, so
indent level is made smaller. When some of these happen indent level is so
negative that an error occur,

$ sgml2lyx simple-test.sgml

  Modification of non-creatable array value attempted, subscript -1 at 
  /usr/share/linuxdoc-tools/dist/fmt_lyx.pl line 127, <GEN10> line 53.

I am ataching a simple example that shows this behavior, "simple-test.sgml".
I am also attaching the sgmlsasp output. When putting some print commands to
know when indent level changes and what is done in @/tag@, I get

$ sgml2lyx simple-test.sgml
Processing file simple-test.sgml
+31:@descrip@:-1->0
 Skipped: \layout Standard
 Skipped:  @itemize@
-40:@/itemize@:0->-1
 Skipped: \layout Standard
 Skipped:  @itemize@
-51:@/itemize@:-1->-2
+53:@itemize@:-2->Modification of non-creatable array value attempted,
subscript -1 at /usr/share/linuxdoc-tools/dist/fmt_lyx.pl line 127, <GEN10>
line 53.

Since @itemize@ are skipped, indent level is not properly started leading to
the error. +31:@descrip@:-1->0 means that indent level is raised from '-1'
to '0' in descrip tag in line 31.

Attached simple patch seems to work well in this and in larger files. just
avoid extra line skip.

Cheers,

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14.7
Locale: LANG=es_ES, LC_CTYPE=es_ES (charmap=ISO-8859-1)

Versions of packages linuxdoc-tools depends on:
ii  gawk                      1:3.1.5-2      GNU awk, a pattern scanning and pr
ii  libc6                     2.3.6-3        GNU C Library: Shared libraries an
ii  mawk                      1.3.3-11       a pattern scanning and text proces
ii  perl                      5.8.8-3        Larry Wall's Practical Extraction 
ii  sgml-base                 1.26           SGML infrastructure and SGML catal
ii  sgml-data                 2.0.3          common SGML and XML data
ii  sp                        1.3.4-1.2.1-47 James Clark's SGML parsing tools

linuxdoc-tools recommends no packages.

-- no debconf information

-- 
=====================================================================
Agustin Martin Domingo, Dpto. de Fisica, ETS Arquitectura Madrid,
(U. Politecnica de Madrid)  tel: +34 91-336-6536, Fax: +34 91-336-6554,
email:[EMAIL PROTECTED], http://www.aq.upm.es/~agmartin
<!doctype linuxdoc system>
<article>
<title>Test tex for linuxdoc-tools</title>
<author>AMD

<sect>Showing the problem
<p>
<descrip>
<tag/a/
<itemize>
<item>
</itemize>
<tag/b/
<itemize>
<item>
</itemize>
<itemize>
<item>
</itemize>
</descrip>
 </article>








#This file was created by LinuxDoc-SGML
 #(conversion : Frank Pavageau and Jose' Matos)
 \lyxformat 2.15
 \textclass linuxdoc
 \language default
 \inputencoding default
 \fontscheme default
 \papersize Default
 \paperfontsize default
 \spacing single
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
 \defskip medskip
 \quotes_language default
 \quotes_times 2
 \paperorientation portrait
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
 
 \layout Title
 \added_space_top vfill \added_space_bottom vfill
 Test tex for linuxdoc-tools
 \layout Author
 AMD 
 \layout Section
 Showing the problem 
 \layout Standard
  
 @descrip@
 @tag@
 a
 @/tag@
 \layout Standard
 @itemize@
 @item@
  
 
 @/itemize@
  
 
 @tag@
 b
 @/tag@
 \layout Standard
 @itemize@
 @item@
  
 
 @/itemize@
  
 @itemize@
 @item@
  
 
 @/itemize@
  
 
 @/descrip@
  
 
 \the_end
diff -Nru /tmp/kckfvWZStG/linuxdoc-tools-0.9.21/lib/dist/fmt_lyx.pl 
/tmp/U60e7FuCpn/linuxdoc-tools-0.9.21/lib/dist/fmt_lyx.pl
--- /tmp/kckfvWZStG/linuxdoc-tools-0.9.21/lib/dist/fmt_lyx.pl   2001-05-24 
17:57:40.000000000 +0200
+++ /tmp/U60e7FuCpn/linuxdoc-tools-0.9.21/lib/dist/fmt_lyx.pl   2006-03-14 
17:53:19.000000000 +0100
@@ -165,7 +165,7 @@
         {
          $tag=0;
          $_=<$infile>;
-         $_=" ".<$infile>;
+         #$_=" ".<$infile>;
           redo;
         }
 

Reply via email to