mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
\end_document replaces \the_end.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7430 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
05e7faf4df
commit
29df5f4f83
@ -1,6 +1,10 @@
|
||||
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
|
||||
|
@ -1,7 +1,12 @@
|
||||
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>
|
||||
|
||||
|
@ -78,9 +78,17 @@ def layout2begin_layout(lines):
|
||||
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
|
||||
|
@ -1,3 +1,7 @@
|
||||
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>
|
||||
|
||||
|
@ -295,7 +295,7 @@ int Buffer::readHeader(LyXLex & lex)
|
||||
// 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;
|
||||
@ -329,7 +329,7 @@ bool Buffer::readBody(LyXLex & lex, ParagraphList::iterator pit)
|
||||
lyxerr[Debug::PARSER] << "Handling token: `"
|
||||
<< token << '\'' << endl;
|
||||
|
||||
if (token == "\\the_end") {
|
||||
if (token == "\\end_document") {
|
||||
the_end_read = true;
|
||||
continue;
|
||||
}
|
||||
@ -698,7 +698,7 @@ bool Buffer::do_writeFile(ostream & ofs) const
|
||||
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();
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
@ -252,8 +252,8 @@ void InsetText::read(Buffer const * buf, LyXLex & lex)
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -988,7 +988,7 @@ int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex)
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user