inset->Read(this, lex);
par->InsertInset(pos, inset, font);
++pos;
- } else if (tmptok == "GRAPHICS") {
+ } else if (tmptok == "Graphics") {
Inset * inset = new InsetGraphics;
- //inset->Read(this, lex);
+ inset->Read(this, lex);
par->InsertInset(pos, inset, font);
+ ++pos;
} else if (tmptok == "LatexCommand") {
InsetCommand inscmd;
inscmd.Read(this, lex);
Inset * inset = 0;
if (inscmd.getCmdName() == "cite") {
- inset = new InsetCitation(inscmd.getContents(), inscmd.getOptions());
+ inset = new InsetCitation(inscmd.params());
} else if (inscmd.getCmdName() == "bibitem") {
lex.printError("Wrong place for bibitem");
inset = inscmd.Clone();
inset = new InsetLabel(inscmd.getCommand());
} else if (inscmd.getCmdName() == "url"
|| inscmd.getCmdName() == "htmlurl") {
- inset = new InsetUrl(inscmd.getCommand());
+ inset = new InsetUrl(inscmd.params());
} else if (inscmd.getCmdName() == "ref"
|| inscmd.getCmdName() == "pageref"
|| inscmd.getCmdName() == "vref"
inscmd.Read(this, lex);
Inset * inset = 0;
if (inscmd.getCmdName() == "cite") {
- inset = new InsetCitation(inscmd.getContents(),
- inscmd.getOptions());
+ inset = new InsetCitation(inscmd.params());
} else if (inscmd.getCmdName() == "bibitem") {
lex.printError("Wrong place for bibitem");
inset = inscmd.Clone();
inset = new InsetLabel(inscmd.getCommand());
} else if (inscmd.getCmdName() == "url"
|| inscmd.getCmdName() == "htmlurl") {
- inset = new InsetUrl(inscmd.getCommand());
+ inset = new InsetUrl(inscmd.params());
} else if (inscmd.getCmdName() == "ref"
|| inscmd.getCmdName() == "pageref"
|| inscmd.getCmdName() == "vref"
users->owner()->getMiniBuffer()->Set(_("Running Literate..."));
// Remove all error insets
- bool a = users->removeAutoInsets();
+ bool removedErrorInsets = users->removeAutoInsets();
// generate the Literate file if necessary
makeLaTeXFile(lit_name, org_path, false);
// if we removed error insets before we ran LaTeX or if we inserted
// error insets after we ran LaTeX this must be run:
- if (a || (res & Literate::ERRORS)){
+ if (removedErrorInsets || (res & Literate::ERRORS)){
users->redraw();
users->fitCursor();
//users->updateScrollbar();
users->owner()->getMiniBuffer()->Set(_("Building Program..."));
// Remove all error insets
- bool a = users->removeAutoInsets();
+ bool removedErrorInsets = users->removeAutoInsets();
// generate the LaTeX file if necessary
- if (!isNwClean() || a) {
+ if (!isNwClean() || removedErrorInsets) {
makeLaTeXFile(lit_name, org_path, false);
markNwDirty();
}
// if we removed error insets before we ran Literate/Build or
// if we inserted error insets after we ran Literate/Build this
// must be run:
- if (a || (res & Literate::ERRORS)){
+ if (removedErrorInsets || (res & Literate::ERRORS)){
users->redraw();
users->fitCursor();
//users->updateScrollbar();