]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Embedding: saving inzip name to .lyx file so that embedded files can always be found...
[lyx.git] / src / Paragraph.cpp
index 61fe11117bf5f64e1b75cf7c0d05729cce1dbb6b..498c5c1c2c1eda23071bf0a826c66b300e612a86 100644 (file)
@@ -999,6 +999,13 @@ void Paragraph::Private::validate(LaTeXFeatures & features,
 
        // then the layouts
        features.useLayout(layout.name());
+       if (!layout.requires().empty()) {
+               vector<string> req = layout.requires();
+               for (vector<string>::const_iterator it = req.begin();
+                    it != req.end(); ++it) {
+                       features.require(*it);
+               }
+       }
 
        // then the fonts
        fontlist_.validate(features);
@@ -2024,10 +2031,17 @@ bool Paragraph::latex(Buffer const & buf,
                                d->latexSpecialChar(os, rp, running_font, runningChange,
                                        *style, i, column);
                        } catch (EncodingException & e) {
-                               // add location information and throw again.
-                               e.par_id = id();
-                               e.pos = i;
-                               throw(e);
+                               if (runparams.dryrun) {
+                                       os << "<" << _("LyX Warning: ")
+                                          << _("uncodable character") << " '";
+                                       os.put(c);
+                                       os << "'>";
+                               } else {
+                                       // add location information and throw again.
+                                       e.par_id = id();
+                                       e.pos = i;
+                                       throw(e);
+                               }
                        }
                }