]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
better latin3&4 support
[lyx.git] / src / paragraph.C
index 6aabdd620bb1b1659e73c495e30bdfdfaf0f0aed..9ecffaf0e9ef1273fa961d11e9855f23f8506195 100644 (file)
@@ -381,10 +381,18 @@ void Paragraph::validate(LaTeXFeatures & features) const
        }
 
        // then the insets
+       LyXLayout const & layout =
+                textclasslist.Style(bparams.textclass,
+                                    getLayout());
+
        for (InsetList::const_iterator cit = insetlist.begin();
             cit != insetlist.end(); ++cit) {
-               if (cit->inset)
+               if (cit->inset) {
                        cit->inset->validate(features);
+                       if (layout.needprotect &&
+                           cit->inset->lyxCode() == Inset::FOOT_CODE)
+                               features.NeedLyXFootnoteCode = true;
+               }
        }
 }
 
@@ -1606,9 +1614,9 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
                }
 #else
 #ifdef WITH_WARNINGS
-#warning For now we ALWAYS have to close the foreign font settings if they are
-#warning there as we start another \selectlanguage with the next paragraph if
-#warning we are in need of this. This should be fixed sometime (Jug)
+//#warning For now we ALWAYS have to close the foreign font settings if they are
+//#warning there as we start another \selectlanguage with the next paragraph if
+//#warning we are in need of this. This should be fixed sometime (Jug)
 #endif
                running_font.latexWriteEndChanges(os, basefont,  basefont);
 #endif
@@ -1930,18 +1938,23 @@ string const Paragraph::asString(Buffer const * buffer, bool label)
 
 
 string const Paragraph::asString(Buffer const * buffer, 
-                           Paragraph::size_type beg,
-                           Paragraph::size_type end)
+                                Paragraph::size_type beg,
+                                Paragraph::size_type end,
+                                bool label)
 {
        ostringstream ost;
 
-       if (beg == 0 && !params().labelString().empty())
+       if (beg == 0 && label && !params().labelString().empty())
                ost << params().labelString() << ' ';
 
        for (Paragraph::size_type i = beg; i < end; ++i) {
                value_type const c = getUChar(buffer->params, i);
                if (IsPrintable(c))
                        ost << c;
+               else if (c == META_NEWLINE)
+                       ost << '\n';
+               else if (c == META_HFILL)
+                       ost << '\t'; 
                else if (c == META_INSET) {
                        getInset(i)->ascii(buffer, ost);
                }