Georg Baum wrote:

> Sorry, wrong patch (contained some unrelated test stuff), use this
> instead.

Some preliminary questions:

* 'swallow_newlines' is used to clean-up the output, right? Ie, the 
input has already been parsed and the output data generated, but 
swallow_newlines is used to 'prettify' this output? 

* Is the '// note the space' still needed? I thought that the point of 
all this was to remove the need to modify the input data in this 
arbitrary manner?
@@ -110,8 +112,7 @@
                        os << t.character();

                else if (t.cat() == catNewline) {
-                       //if (p.next_token().cat() == catNewline) {
-                       //      p.get_token();
+                       //if (t.cs.size() > 1) {
                        //      handle_par(os);
                        //} else {
                                os << "\n "; // note the space

Index: src/tex2lyx/math.C

* Is the CatCode comment for the 'Consecutive newlines' correct 
(catSpace, not carNewline)?

Index: src/tex2lyx/texparser.h
+/*!
+ * Actual parser class
+ *
+ * The parser parses every character of the inputstream into a token
+ * and classifies the token.
+ * The following transformations are done:
+ * - Consecutive spaces are combined into one single token with 
CatCode catSpace
+ * - Consecutive newlines are combined into one single token with 
CatCode catSpace
+ * - Comments and %\n combinations are parsed into one token with 
CatCode catComment
+ */

Regards,
-- 
Angus

Reply via email to