#include "language.h"
#include "exporter.h"
#include "Lsstream.h"
-#include "converter.h"
+#include "format.h"
#include "BufferView.h"
#include "ParagraphParameters.h"
#include "iterators.h"
#include "insets/insetnote.h"
#include "insets/insetquotes.h"
#include "insets/insetlatexaccent.h"
-#include "insets/insetbib.h"
+#include "insets/insetbibitem.h"
+#include "insets/insetbibtex.h"
#include "insets/insetcite.h"
#include "insets/insetexternal.h"
#include "insets/insetindex.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));
++pos;
} else if (token == "\\bibitem") { // ale970302
InsetCommandParams p("bibitem", "dummy");
- InsetBibKey * inset = new InsetBibKey(p);
+ InsetBibitem * inset = new InsetBibitem(p);
inset->read(this, lex);
par->insertInset(pos, inset, font, current_change);
++pos;
inset = new InsetCitation(inscmd);
} else if (cmdName == "bibitem") {
lex.printError("Wrong place for bibitem");
- inset = new InsetBibKey(inscmd);
+ inset = new InsetBibitem(inscmd);
} else if (cmdName == "BibTeX") {
inset = new InsetBibtex(inscmd);
} else if (cmdName == "index") {
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");
static_cast<InsetBibtex &>(*it).fillWithBibKeys(this, keys);
else if (it->lyxCode() == Inset::INCLUDE_CODE)
static_cast<InsetInclude &>(*it).fillWithBibKeys(keys);
- else if (it->lyxCode() == Inset::BIBKEY_CODE) {
- InsetBibKey & bib = static_cast<InsetBibKey &>(*it);
+ else if (it->lyxCode() == Inset::BIBITEM_CODE) {
+ InsetBibitem & bib = static_cast<InsetBibitem &>(*it);
string const key = bib.getContents();
string const opt = bib.getOptions();
string const ref; // = pit->asString(this, false);
{
if (id < 0)
return 0;
-
+
// why should we allow < 0 ??
//lyx::Assert(id >= 0);