#include "BufferView.h"
#include "ParagraphParameters.h"
#include "iterators.h"
+#include "lyxtextclasslist.h"
#include "mathed/formulamacro.h"
#include "mathed/formula.h"
#endif
lex.eatLine();
string const layoutname = lex.getString();
+ //lyxerr << "Looking for layout '"
+ // << layoutname << "'!" << endl;
+
pair<bool, layout_type> pp
= textclasslist.NumberOfLayout(params.textclass, layoutname);
+ //lyxerr << "Result: " << pp.first << "/" << pp.second << endl;
+
#ifndef NO_COMPABILITY
if (compare_no_case(layoutname, "latex") == 0) {
ert_comp.active = true;
} else {
// layout not found
// use default layout "Standard" (0)
+ //lyxerr << "Layout '" << layoutname
+ // << "' was not found!" << endl;
+
par->layout = 0;
++unknown_layouts;
string const s = _("Layout had to be changed from\n")
par->params().startOfAppendix(true);
} else if (token == "\\paragraph_separation") {
int tmpret = lex.findToken(string_paragraph_separation);
- if (tmpret == -1) ++tmpret;
+ if (tmpret == -1)
+ ++tmpret;
if (tmpret != LYX_LAYOUT_DEFAULT)
params.paragraph_separation =
static_cast<BufferParams::PARSEP>(tmpret);
} else if (token == "\\defskip") {
lex.nextToken();
params.defskip = VSpace(lex.getString());
+#ifndef NO_COMPABILITY
} else if (token == "\\epsfig") { // obsolete
// Indeed it is obsolete, but we HAVE to be backwards
// compatible until 0.14, because otherwise all figures
// in existing documents are irretrivably lost. (Asger)
params.readGraphicsDriver(lex);
+#endif
} else if (token == "\\quotes_language") {
int tmpret = lex.findToken(string_quotes_language);
- if (tmpret == -1) ++tmpret;
+ if (tmpret == -1)
+ ++tmpret;
if (tmpret != LYX_LAYOUT_DEFAULT) {
InsetQuotes::quote_language tmpl =
InsetQuotes::EnglishQ;
params.use_numerical_citations = lex.getInteger();
} else if (token == "\\paperorientation") {
int tmpret = lex.findToken(string_orientation);
- if (tmpret == -1) ++tmpret;
+ if (tmpret == -1)
+ ++tmpret;
if (tmpret != LYX_LAYOUT_DEFAULT)
params.orientation = static_cast<BufferParams::PAPER_ORIENTATION>(tmpret);
} else if (token == "\\paperwidth") {
string const Buffer::asciiParagraph(Paragraph const * par,
- unsigned int linelen) const
+ unsigned int linelen,
+ bool noparbreak) const
{
ostringstream buffer;
ostringstream word;
Paragraph::depth_type ltype_depth = 0;
string::size_type currlinelen = 0;
bool ref_printed = false;
-
- int noparbreak = 0;
// if (!par->previous()) {
#if 0
// begins or ends a deeper area ?
if (inset) {
if (linelen > 0)
buffer << word.str();
- if (inset->ascii(this, buffer)) {
+ if (inset->ascii(this, buffer, linelen)) {
// to be sure it breaks paragraph
currlinelen += linelen;
}
{
Paragraph * par = paragraph;
while (par) {
- ofs << asciiParagraph(par, linelen);
+ ofs << asciiParagraph(par, linelen, par->previous() == 0);
par = par->next();
}
ofs << "\n";
}
+
bool use_babel;
+
void Buffer::makeLaTeXFile(string const & fname,
string const & original_path,
bool nice, bool only_body)