Hi folks,

The latest CVS looks like it does not output the final newline
for \end{itemize}.

This results in problems with Literate scraps that follow an itemizes list
in their documentation chunk.

A real example (from my code):

    \begin{itemize}
    \item A King move (which makes castling from that point impossible).
    \item A rook move (which precludes castling on that side of the board).
    \end{itemize}<<Generate castling availability>>=
    # We assume castling availability first
    my ($black_queenside, $black_kingside,
        $white_kingside, $white_queenside) = (1, 1, 1, 1);
    <<Get list of moves into private array>>
    <<Look for the king and rook moves>>
    [...]

Which fails to process with noweb, etc.

As of a few days ago, this was correctly generated as:

    \begin{itemize}
    \item A King move (which makes castling from that point impossible).
    \item A rook move (which precludes castling on that side of the board).
    \end{itemize}
    <<Generate castling availability>>=
    # We assume castling availability first
    my ($black_queenside, $black_kingside,
        $white_kingside, $white_queenside) = (1, 1, 1, 1);
    <<Get list of moves into private array>>
    <<Look for the king and rook moves>>
    [...]

I traced this to src/paragraph.C and the handling of list environments.

The patch is attached. Please apply.

                        ---Kayvan
-- 
Kayvan A. Sylvan                   | Proud husband of      | Father to my kids:
Sylvan Associates, Inc.            | Laura Isabella Sylvan | Katherine Yelena
http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.104
diff -u -r1.104 ChangeLog
--- src/ChangeLog       2001/03/17 02:06:20     1.104
+++ src/ChangeLog       2001/03/19 08:25:42
@@ -1,3 +1,9 @@
+2001-03-19  Kayvan A. Sylvan <[EMAIL PROTECTED]>
+
+       * paragraph.C (TeXEnvironment): Added \n to \end{environment}
+       LaTeX output. This is necessary for Literate document
+       processing.
+
 2001-03-17  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
        * tabular.C (l_getline): use string::erase, small whitespace change.
Index: src/paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.128
diff -u -r1.128 paragraph.C
--- src/paragraph.C     2001/03/16 00:09:53     1.128
+++ src/paragraph.C     2001/03/19 08:25:49
@@ -3424,7 +3424,8 @@
                );
  
        if (style.isEnvironment()) {
-               os << "\\end{" << style.latexname() << '}';
+               os << "\\end{" << style.latexname() << "}\n";
+
 #ifndef NEW_INSETS
                // maybe this should go after the minipage closes?
                if (foot_this_level) {

Reply via email to