)
{
bool the_end_read = false;
+#ifdef NO_LATEX
+ static string inset_ert_contents;
+#endif
#ifndef NO_PEXTRA_REALLY
// This is super temporary but is needed to get the compability
// mode for minipages work correctly together with new tabulars.
par->insertInset(pos, inset, font);
++pos;
} else if (token == "\\layout") {
+#ifdef NO_LATEX
+ // Do the insetert.
+ if (!inset_ert_contents.empty()) {
+ Inset * inset = new InsetERT(inset_ert_contents);
+ par->insertInset(pos, inset, font);
+ ++pos;
+ inset_ert_contents.erase();
+ }
+#endif
lex.EatLine();
string const layoutname = lex.GetString();
pair<bool, LyXTextClass::LayoutList::size_type> pp
} else if (token == "\\size") {
lex.next();
font.setLyXSize(lex.GetString());
+#ifndef NO_LATEX
+#ifdef WITH_WARNINGS
+#warning compatability hack needed
+#endif
} else if (token == "\\latex") {
lex.next();
string const tok = lex.GetString();
else
lex.printError("Unknown LaTeX font flag "
"`$$Token'");
+#else
+ } else if (token == "\\latex") {
+ lex.next();
+ string const tok = lex.GetString();
+ if (tok == "no_latex") {
+ ; // nothing
+ } else if (tok == "latex") {
+ ; // nothing
+ } else if (tok == "default") {
+ ; // nothing
+ } else {
+ lex.printError("Unknown LaTeX font flag "
+ "`$$Token'");
+ }
+#endif
} else if (token == "\\lang") {
lex.next();
string const tok = lex.GetString();
} else {
lyxerr << "Should this ever happen?" << endl;
}
-
+
+#ifndef NO_LATEX
LyXFont const font1 = LyXFont(LyXFont::ALL_INHERIT, params.language);
+#endif
for (Paragraph::size_type i = 0; i < par->size(); ++i) {
if (!i && !noparbreak) {
if (linelen > 0)
currlinelen += (ltype_depth-depth)*2;
}
}
+#ifndef NO_LATEX
LyXFont const font2 = par->getFontSettings(params, i);
if (font1.latex() != font2.latex()) {
if (font2.latex() == LyXFont::OFF)
} else {
islatex = 0;
}
+#endif
char c = par->getUChar(params, i);
if (islatex)
} else if (c != '\0')
buffer << c;
else if (c == '\0')
- lyxerr.debug() << "writeAsciiFile: NULL char in structure." << endl;
+ lyxerr[Debug::INFO] << "writeAsciiFile: NULL char in structure." << endl;
++currlinelen;
break;
}
texrow.newline();
texrow.newline();
}
- lyxerr.debug() << "lyx header finished" << endl;
+ lyxerr[Debug::INFO] << "lyx header finished" << endl;
// There are a few differences between nice LaTeX and usual files:
// usual is \batchmode and has a
// special input@path to allow the including of figures
ofs << "\\begin{document}\n";
texrow.newline();
} // only_body
- lyxerr.debug() << "preamble finished, now the body." << endl;
+ lyxerr[Debug::INFO] << "preamble finished, now the body." << endl;
if (!lyxrc.language_auto_begin) {
ofs << subst(lyxrc.language_command_begin, "$$lang",
lyxerr << "File was not closed properly." << endl;
}
- lyxerr.debug() << "Finished making latex file." << endl;
+ lyxerr[Debug::INFO] << "Finished making latex file." << endl;
}
string const & latexname) const
{
if (!latexname.empty() && latexname != "!-- --")
- os << string(depth, ' ') << "<" << latexname << ">\n";
+ os << "<!-- " << depth << " -->" << "<" << latexname << ">";
+ //os << string(depth, ' ') << "<" << latexname << ">\n";
}
string const & latexname) const
{
if (!latexname.empty() && latexname != "!-- --")
- os << string(depth, ' ') << "</" << latexname << ">\n";
+ os << "<!-- " << depth << " -->" << "</" << latexname << ">\n";
+ //os << string(depth, ' ') << "</" << latexname << ">\n";
}
continue;
}
- if (font.latex() == LyXFont::ON || style.latexparam() == "CDATA") {
+ if (
+#ifndef NO_LATEX
+ font.latex() == LyXFont::ON ||
+#endif
+ style.latexparam() == "CDATA") {
// "TeX"-Mode on == > SGML-Mode on.
if (c != '\0')
os << c;
LyXFont font_old = style.labeltype == LABEL_MANUAL ? style.labelfont : style.font;
int char_line_count = depth;
- if (!style.free_spacing)
- os << string(depth,' ');
+ //if (!style.free_spacing)
+ // os << string(depth,' ');
// parsing main loop
for (Paragraph::size_type i = 0;
else
os << tmp_out;
}
+#ifndef NO_LATEX
} else if (font.latex() == LyXFont::ON) {
// "TeX"-Mode on ==> SGML-Mode on.
if (c != '\0')
os << c;
++char_line_count;
+#endif
} else {
string sgml_string;
if (par->linuxDocConvertChar(c, sgml_string)
// <term> not closed...
os << "</term>";
}
- os << '\n';
+ if(style.free_spacing) os << '\n';
}
}
}
}
- lyxerr.debug() << "Includeonly(" << lst << ')' << endl;
+ lyxerr[Debug::INFO] << "Includeonly(" << lst << ')' << endl;
return lst;
}