Here's the patch again (minus conflicts caused by latest fixes in bind/*.bind). Please apply. ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
Index: lib/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/ChangeLog,v retrieving revision 1.69 diff -u -r1.69 ChangeLog --- lib/ChangeLog 2001/07/13 08:49:44 1.69 +++ lib/ChangeLog 2001/07/13 14:20:16 @@ -2,6 +2,10 @@ * bind/*.bind: do the same correctly for all files :) +2001-07-12 Kayvan A. Sylvan <[EMAIL PROTECTED]> + + * layouts/literate-scrap.inc: Added PassThru tag + 2001-07-12 Juergen Vigna <[EMAIL PROTECTED]> * bind/cua.bind: moved C-l from mode-tex to ert-insert Index: lib/layouts/literate-scrap.inc =================================================================== RCS file: /cvs/lyx/lyx-devel/lib/layouts/literate-scrap.inc,v retrieving revision 1.2 diff -u -r1.2 literate-scrap.inc --- lib/layouts/literate-scrap.inc 2000/03/09 03:36:45 1.2 +++ lib/layouts/literate-scrap.inc 2001/07/13 14:20:16 @@ -22,13 +22,14 @@ Align Left AlignPossible Block,Left FreeSpacing 1 + PassThru 1 LabelType Static LabelFont Color magenta EndFont TextFont - Latex Latex + Color latex Family Typewriter EndFont Index: src/ChangeLog =================================================================== RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v retrieving revision 1.229 diff -u -r1.229 ChangeLog --- src/ChangeLog 2001/07/13 11:50:37 1.229 +++ src/ChangeLog 2001/07/13 14:20:16 @@ -11,6 +11,21 @@ * sp_form.[Ch]: removed * spellchecker.[Ch]: removed +2001-07-12 Kayvan A. Sylvan <[EMAIL PROTECTED]> + + * paragraph_pimpl.C (simpleTeXBlanks): Simply return if pass_thru + is set. + (simpleTeXSpecialChars): Simply print the input character without + any special translation if pass_thru is set. + + * layout.h: Adde bool pass_thru to layout class for being able to + implement pass through of a paragraph for Literate Programming. + + * layout.C: add LT_PASS_THRU to LayoutTags enum. + * layout.C (LyXLayout): set pass_thru to flase in constructor. + * layout.C (Read): add "passthru" to list of layout tags and add + code to set the pass_thru boolean when it is read. + 2001-07-12 Lars Gullik Bjønnes <[EMAIL PROTECTED]> * trans_decl.h: remove allowed from KmodInfo Index: src/layout.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/layout.C,v retrieving revision 1.36 diff -u -r1.36 layout.C --- src/layout.C 2001/06/04 23:57:28 1.36 +++ src/layout.C 2001/07/13 14:20:17 @@ -70,6 +70,7 @@ //LT_FIRST_COUNTER, LT_FONT, LT_FREE_SPACING, + LT_PASS_THRU, //LT_HEADINGS, LT_ITEMSEP, LT_KEEPEMPTY, @@ -133,6 +134,7 @@ fill_bottom = false; newline_allowed = true; free_spacing = false; + pass_thru = false; } @@ -174,6 +176,7 @@ { "parindent", LT_PARINDENT }, { "parsep", LT_PARSEP }, { "parskip", LT_PARSKIP }, + { "passthru", LT_PASS_THRU }, { "preamble", LT_PREAMBLE }, { "rightmargin", LT_RIGHTMARGIN }, { "spacing", LT_SPACING }, @@ -390,6 +393,11 @@ case LT_FREE_SPACING: // Allow for free spacing. if (lexrc.next()) free_spacing = lexrc.GetInteger(); + break; + + case LT_PASS_THRU: // Allow for pass thru. + if (lexrc.next()) + pass_thru = lexrc.GetInteger(); break; case LT_SPACING: // setspace.sty Index: src/layout.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/layout.h,v retrieving revision 1.31 diff -u -r1.31 layout.h --- src/layout.h 2001/05/30 13:53:29 1.31 +++ src/layout.h 2001/07/13 14:20:17 @@ -321,6 +321,10 @@ /// bool free_spacing; + + /// + bool pass_thru; + /** true when the fragile commands in the paragraph need to be \protect'ed. */ bool needprotect; Index: src/paragraph_pimpl.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/paragraph_pimpl.C,v retrieving revision 1.10 diff -u -r1.10 paragraph_pimpl.C --- src/paragraph_pimpl.C 2001/07/12 11:11:09 1.10 +++ src/paragraph_pimpl.C 2001/07/13 14:20:17 @@ -208,6 +208,7 @@ int & column, LyXFont const & font, LyXLayout const & style) { + if (style.pass_thru) return; if (column > tex_code_break_column && i && getChar(i - 1) != ' ' @@ -266,6 +267,10 @@ int & column, Paragraph::value_type const c) { + if (style.pass_thru) { + if (c != '\0') os << c; + return; + } // Two major modes: LaTeX or plain // Handle here those cases common to both modes // and then split to handle the two modes separately.