LyX file-format changes
-----------------------
+2003-07-28 José Matos <jamatos@lyx.org>
+
+ * \the_end is replaced with \end_document
+
2003-07-28 José Matos <jamatos@lyx.org>
* \layout is replaced with \begin_layout
2003-07-28 José Matos <jamatos@lyx.org>
- * lyx2lyx (parse_options): support gziped files.
- * parser_tools.py (set_format): output correct version.
+ * lyx2lyx/lyxconvert_224.py (end_document):
+ replace \the_end with \end_document.
+
+2003-07-28 José Matos <jamatos@lyx.org>
+
+ * lyx2lyx/lyx2lyx (parse_options): support gziped files.
+ * lyx2lyx/parser_tools.py (set_format): output correct version.
2003-07-28 José Matos <jamatos@fep.up.pt>
lines[i]= replace(lines[i], '\\layout', '\\begin_layout')
i = i + 1
+def end_document(lines):
+ i = find_token(lines, "\\the_end", 0)
+ if i == -1:
+ lines.append("\\end_document")
+ return
+ lines[i] = "\\end_document"
+
def convert(header, body):
add_end_layout(body)
layout2begin_layout(body)
+ end_document(body)
if __name__ == "__main__":
pass
+2003-07-28 José Matos <jamatos@lyx.org>
+
+ * buffer.C (readBody, do_writeFile):
+ * paragraph.C(readParagraph): \end_document replaces \the_end.
2003-07-29 André Pönitz <poenitz@gmx.net>
// changed to be public and have one parameter
// if par = 0 normal behavior
// else insert behavior
-// Returns false if "\the_end" is not read (Asger)
+// Returns false if "\end_document" is not read (Asger)
bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
{
Paragraph::depth_type depth = 0;
lyxerr[Debug::PARSER] << "Handling token: `"
<< token << '\'' << endl;
- if (token == "\\the_end") {
+ if (token == "\\end_document") {
the_end_read = true;
continue;
}
pit->write(this, ofs, params, depth);
// Write marker that shows file is complete
- ofs << "\n\\the_end" << endl;
+ ofs << "\n\\end_document" << endl;
// Shouldn't really be needed....
//ofs.close();
+2003-07-28 José Matos <jamatos@lyx.org>
+
+ * insetext.C (read): \end_document replaces \the_end.
+
2003-07-28 José Matos <jamatos@fep.up.pt>
* insetert.C (write): \layout -> \begin_layout.
break;
}
- if (token == "\\the_end") {
- lex.printError("\\the_end read in inset! Error in document!");
+ if (token == "\\end_document") {
+ lex.printError("\\end_document read in inset! Error in document!");
return;
}
lyxerr[Debug::PARSER] << "Handling paragraph token: `"
<< token << '\'' << endl;
- if (token == "\\begin_layout" || token == "\\the_end"
+ if (token == "\\begin_layout" || token == "\\end_document"
|| token == "\\end_inset" || token == "\\begin_deeper"
|| token == "\\end_deeper") {
lex.pushToken(token);