]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNewline.cpp
requires is a keyword in C++2a
[lyx.git] / src / insets / InsetNewline.cpp
index 411da120eb60120df773d8f9771209d2d57d0c1e..b20886c8301fc57cd833054e8095960bdc180193 100644 (file)
@@ -56,7 +56,7 @@ void InsetNewlineParams::read(Lexer & lex)
 {
        string token;
        lex.setContext("InsetNewlineParams::read");
-       lex >> token;   
+       lex >> token;
        if (token == "newline")
                kind = InsetNewlineParams::NEWLINE;
        else if (token == "linebreak")
@@ -146,7 +146,9 @@ 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";
@@ -245,7 +247,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const
                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);