#include "MetricsInfo.h"
#include "OutputParams.h"
#include "output_xhtml.h"
+#include "texstream.h"
#include "frontends/Application.h"
#include "frontends/FontMetrics.h"
void InsetNewlineParams::write(ostream & os) const
{
- string command;
switch (kind) {
case InsetNewlineParams::NEWLINE:
os << "newline";
{
string token;
lex.setContext("InsetNewlineParams::read");
- lex >> token;
+ lex >> token;
if (token == "newline")
kind = InsetNewlineParams::NEWLINE;
else if (token == "linebreak")
}
-int InsetNewline::latex(odocstream & os, OutputParams const & rp) const
+void InsetNewline::latex(otexstream & os, OutputParams const & rp) const
{
switch (params_.kind) {
case InsetNewlineParams::NEWLINE:
- if (rp.inTableCell == OutputParams::PLAIN)
+ if (!rp.newlinecmd.empty())
+ os << "\\" << rp.newlinecmd << "\n";
+ else if (rp.inTableCell == OutputParams::PLAIN)
os << "\\newline\n";
else
os << "\\\\\n";
os << "\\\\\n";
break;
}
- return 0;
}
-int InsetNewline::plaintext(odocstream & os, OutputParams const &) const
+int InsetNewline::plaintext(odocstringstream & os,
+ OutputParams const &, size_t) const
{
os << '\n';
return PLAINTEXT_NEWLINE;
}
-docstring InsetNewline::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring InsetNewline::xhtml(XMLStream & xs, OutputParams const &) const
{
- xs << html::CompTag("br");
- xs.cr();
+ xs << xml::CR() << xml::CompTag("br") << xml::CR();
return docstring();
}
yp[0] = int(y - 0.875 * asc * 0.75);
yp[1] = int(y - 0.500 * asc * 0.75);
yp[2] = int(y - 0.125 * asc * 0.75);
-
+
if (pi.ltr_pos) {
xp[0] = int(x + 2 * wid * 0.813);
xp[1] = int(x + 2 * wid);
}
-docstring InsetNewline::contextMenuName() const
+string InsetNewline::contextMenuName() const
{
- return from_ascii("context-newline");
+ return "context-newline";
}