The code in lyx-devel won't compile. It appears to be missing the changes in
string types for at least the lyxinset files/classes.

Given that, the following patch is against 1.0.4. It takes the notes in the
text and inserts them as comments in the LaTeX output. I'd really like to
have the equivalent changes done in reLyX, but unfortunately my Perl just
isn't up to doing it.

Karl.

--- src/insetinfo.C     1999/06/15 10:54:37     1.3
+++ src/insetinfo.C     1999/10/09 16:45:57
@@ -127,15 +127,30 @@
 }
       
 
-int InsetInfo::Latex(FILE *, signed char /*fragile*/)
+int InsetInfo::Latex(FILE *file, signed char /*fragile*/)
 {
-       return 0;
+       LString temp = contents, temp2;
+       fprintf(file, "%%\n%%");
+       while (!temp.empty()) { // each newline needs a % character in front
+            temp.split(temp2, '\n');
+            fprintf(file, "\n%% %s", temp2.c_str());
+       }
+       fprintf(file, "\n%%\n");
+       return contents.countChar('\n')+3;
 }
 
 
-int InsetInfo::Latex(LString &, signed char /*fragile*/)
+int InsetInfo::Latex(LString &out, signed char /*fragile*/)
 {
-       return 0;
+       LString temp = contents, temp2;
+       out += "%\n%";
+       while (!temp.empty()) { // each newline needs a % character in front
+            temp.split(temp2, '\n');
+            out += "\n% ";
+            out += temp2;
+       }
+       out += "\n%\n";
+       return contents.countChar('\n')+3;
 }
 

Reply via email to