#include "language.h"
#include "exporter.h"
#include "Lsstream.h"
-#include "converter.h"
+#include "format.h"
#include "BufferView.h"
#include "ParagraphParameters.h"
#include "iterators.h"
}
// set initial author
- authorlist.record(Author(lyxrc.user_name, lyxrc.user_email));
+ authorlist.record(Author(lyxrc.user_name, lyxrc.user_email));
}
// but this code is too b0rken to admit of a better solution yet
Change current_change;
};
-
+
bool
Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par,
istringstream ss(lex.getString());
Author a;
ss >> a;
- int aid(authorlist.record(a));
+ int aid(authorlist.record(a));
lyxerr << "aid is " << aid << endl;
lyxerr << "listed aid is " << author_ids.size() << endl;
author_ids.push_back(authorlist.record(a));
inset = new InsetParent(inscmd, *this);
}
} else {
- bool alreadyread = false;
if (tmptok == "Quotes") {
inset = new InsetQuotes;
} else if (tmptok == "External") {
inset = new InsetFormulaMacro;
} else if (tmptok == "Formula") {
inset = new InsetFormula;
- } else if (tmptok == "Figure") { // Backward compatibility
-// inset = new InsetFig(100, 100, *this);
- inset = new InsetGraphics;
} else if (tmptok == "Graphics") {
inset = new InsetGraphics;
- } else if (tmptok == "Info") {// backwards compatibility
- inset = new InsetNote(this,
- lex.getLongString("\\end_inset"),
- true);
- alreadyread = true;
} else if (tmptok == "Note") {
inset = new InsetNote(params);
} else if (tmptok == "Include") {
inset = new InsetFloatList;
}
- if (inset && !alreadyread) inset->read(this, lex);
+ if (inset)
+ inset->read(this, lex);
}
if (inset) {
ofs << "\\author " << it->second << "\n";
}
}
-
+
Paragraph::depth_type depth = 0;
// this will write out all the paragraphs
texrow.newline();
}
- latexParagraphs(os, &*(paragraphs.begin()), 0, texrow);
+ latexParagraphs(os, paragraphs.begin(), paragraphs.end(), texrow);
// add this just in case after all the paragraphs
os << endl;
//
// LaTeX all paragraphs from par to endpar, if endpar == 0 then to the end
//
-void Buffer::latexParagraphs(ostream & ofs, Paragraph * par,
- Paragraph * endpar, TexRow & texrow,
+void Buffer::latexParagraphs(ostream & ofs,
+ ParagraphList::iterator par,
+ ParagraphList::iterator endpar,
+ TexRow & texrow,
bool moving_arg) const
{
bool was_title = false;
if (layout->isEnvironment() ||
!par->params().leftIndent().zero())
{
- par = par->TeXEnvironment(this, params, ofs, texrow);
+ par = TeXEnvironment(this, params, par, ofs, texrow);
} else {
- par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+ par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
}
} else {
- par = par->TeXOnePar(this, params, ofs, texrow, moving_arg);
+ par = TeXOnePar(this, params, par, ofs, texrow, moving_arg);
}
}
// It might be that we only have a title in this document
features.require("dvipost");
features.require("color");
}
-
+
// AMS Style is at document level
if (params.use_amsmath || tclass.provides(LyXTextClass::amsmath))
features.require("amsmath");
{
if (id < 0)
return 0;
-
+
// why should we allow < 0 ??
//lyx::Assert(id >= 0);