]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
* src/LyXRC.{cpp,h}:
[lyx.git] / src / output_latex.cpp
index a5c0d02df7b84b8e3cc40c269f3dea89d0c0a5e4..52348c44cd0648a24770833a8c1ae48cfd6dd4e0 100644 (file)
@@ -16,6 +16,7 @@
 #include "BufferParams.h"
 #include "debug.h"
 #include "Encoding.h"
+#include "InsetList.h"
 #include "Language.h"
 #include "Layout.h"
 #include "LyXRC.h"
@@ -223,8 +224,8 @@ int latexOptArgInsets(Buffer const & buf, Paragraph const & par,
 {
        int lines = 0;
 
-       InsetList::const_iterator it = par.insetlist.begin();
-       InsetList::const_iterator end = par.insetlist.end();
+       InsetList::const_iterator it = par.insetList().begin();
+       InsetList::const_iterator end = par.insetList().end();
        for (; it != end && number > 0 ; ++it) {
                if (it->inset->lyxCode() == OPTARG_CODE) {
                        InsetOptArg * ins =
@@ -252,6 +253,22 @@ TeXOnePar(Buffer const & buf,
        BufferParams const & bparams = buf.params();
        LayoutPtr style;
 
+       if (runparams_in.verbatim) {
+               int const dist = std::distance(paragraphs.begin(), pit);
+               Font const outerfont = outerFont(dist, paragraphs);
+
+               // No newline if only one paragraph in this lyxtext
+               if (dist > 0) {
+                       os << '\n';
+                       texrow.newline();
+               }
+
+               /*bool need_par = */ pit->latex(buf, bparams, outerfont,
+                       os, texrow, runparams_in);
+
+               return ++pit;
+       }
+
        // In an inset with unlimited length (all in one row),
        // force layout to default
        if (!pit->forceDefaultParagraphs())
@@ -440,7 +457,7 @@ TeXOnePar(Buffer const & buf,
 
        // FIXME UNICODE
        os << from_utf8(everypar);
-       bool need_par = pit->simpleTeXOnePar(buf, bparams, outerfont,
+       bool need_par = pit->latex(buf, bparams, outerfont,
                                             os, texrow, runparams);
 
        // Make sure that \\par is done with the font of the last
@@ -460,7 +477,7 @@ TeXOnePar(Buffer const & buf,
 
        bool is_command = style->isCommand();
 
-       if (style->resfont.size() != font.size()
+       if (style->resfont.size() != font.fontInfo().size()
            && boost::next(pit) != paragraphs.end()
            && !is_command) {
                if (!need_par)