[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, experimental, updated. debian/0.9.50-10-g3b6c937

Agustin Martin Domingo agmartin at debian.org
Sun Jun 15 23:35:41 UTC 2008


The following commit has been merged in the experimental branch:
commit a558515cc4ec8f0f01763e1825160f5b9cf2030d
Author: Agustin Martin Domingo <agmartin at debian.org>
Date:   Fri Jun 13 20:51:55 2008 +0200

    Better tscreen support using LyX-Code.
    
    * Use Lyx-Code more extensively. Do not use begin/end_deeper
    * Do not work if there are things like <tt/../ (which should not
      be there) in non-verbatim tscren sections. Have to think a
      bit more about this.

diff --git a/lib/dist/fmt_lyx.pl b/lib/dist/fmt_lyx.pl
index 7ca7c76..2254cf0 100644
--- a/lib/dist/fmt_lyx.pl
+++ b/lib/dist/fmt_lyx.pl
@@ -172,11 +172,8 @@ $lyx->{postASP} = sub {
     } # tscreen
     elsif( /^\@tscreen\@/ ) {
       $tscreen = 1;
-      $lyxout .= "\\begin_deeper\n";
-      $lyxout .= "\\layout Standard\n"
-      } elsif ( /^\@\/tscreen\@/ ) {
+    } elsif ( /^\@\/tscreen\@/ ) {
       $tscreen = 0;
-      $lyxout .= "\\end_deeper\n";
       $lyxout .= "\\layout Standard\n";
     } # Verbatim
     elsif( /^\@verb\@/ ) {
@@ -186,6 +183,8 @@ $lyx->{postASP} = sub {
     } else {
       $inheading = 0 if ( /^\\layout Standard/ );
       $intt      = 0 if ( /^\\family default.*$/ );
+      $inheading = 1 if ( /^\\layout (Part|Chapter|.*section|.*paragraph)/ );
+      $intt      = 1 if ( /^\\family typewriter.*$/ );
 
       # For LyX file clarity
       s/\\backslash/\n\\backslash\n/g unless ( $verbatim or $inheading or $intt);
@@ -193,15 +192,15 @@ $lyx->{postASP} = sub {
 
       if ( $intag ) {
 	s/\s+/\n\\protected_separator\n/g unless m/^\\(family|series|shape)/;
-      } elsif ( $verbatim ) {
-	$_ = "\\layout LyX-Code\n$_";
+      } elsif ( $tscreen ) {
+	# If verbatim, lines are not split when things like <tt/../ appears.
+	$_ = "\\layout LyX-Code\n$_" unless ( $intt
+					      or m/^\\(family|layout|series|shape)/
+					      or m/^[$nbsp\s]*$/ );
       } elsif ( $inheading) {
 	s/\s+/ /g;
       }
 
-      $inheading = 1 if ( /^\\layout (Part|Chapter|.*section|.*paragraph)/ );
-      $intt      = 1 if ( /^\\family typewriter.*$/ );
-
       $lyxout .= "$_\n";
     }
   }

-- 
linuxdoc-tools package for Debian.



More information about the debian-xml-sgml-commit mailing list