John McCabe-Dansted
Sun, 07 Feb 2010 09:11:25 -0800
On Sun, Feb 7, 2010 at 5:24 PM, Jürgen Spitzmüller <sp...@lyx.org> wrote: > John McCabe-Dansted wrote: >> This bug was caused by r22241 no longer outputting the parent macros >> in child files, but still counting them towards line numbers. > > Are you sure parent macros are not output in children? Wouldn't this be a bug?
Well, I was sure, but it turns out I got the old and new versions mixed up. It is just a missing "d->texrow.newline();". The attached patch adds this back in. I've tested this patch against branch and trunk. Shall we apply this to trunk now? The other way to fix this of course is to remove the "\n" from the end of the macro, but that may make the resulting TeX harder to read. -- John C. McCabe-Dansted http://www.lyx.org/trac/ticket/6502
Index: Buffer.cpp
===================================================================
--- Buffer.cpp (revision 33347)
+++ Buffer.cpp (working copy)
@@ -1341,8 +1341,10 @@
// output the parent macros
MacroSet::iterator it = parentMacros.begin();
MacroSet::iterator end = parentMacros.end();
- for (; it != end; ++it)
+ for (; it != end; ++it) {
(*it)->write(os, true);
+ d->texrow.newline();
+ }
} // output_preamble
d->texrow.start(paragraphs().begin()->id(), 0);