commit b613be1dd890e395c593da2f25b04eb39cb8b808
Author: Scott Kostyshak <[email protected]>
Date:   Thu Nov 24 21:47:45 2016 -0500

    Warn if child has diff non-Tex font settings
    
    It is easy to come across problems when the settings are not the
    same.
    
    This is consistent with our current warning about different document
    classes.
    
    For discussion and a motivating MWE, see:
    
https://www.mail-archive.com/search?l=mid&q=20161121024539.kn6rsqotaw4n2efk%40klay
---
 src/insets/InsetInclude.cpp |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp
index 6a11b1d..7a35edd 100644
--- a/src/insets/InsetInclude.cpp
+++ b/src/insets/InsetInclude.cpp
@@ -657,6 +657,18 @@ void InsetInclude::latex(otexstream & os, OutputParams 
const & runparams) const
                                Alert::warning(_("Different textclasses"), 
text, true);
                        }
 
+                       string const child_tf = tmp->params().useNonTeXFonts ? 
"true" : "false";
+                       string const master_tf = 
masterBuffer->params().useNonTeXFonts ? "true" : "false";
+                       if (tmp->params().useNonTeXFonts != 
masterBuffer->params().useNonTeXFonts) {
+                               docstring text = bformat(_("Included file 
`%1$s'\n"
+                                       "has use-non-TeX-fonts set to `%2$s'\n"
+                                       "while parent file has 
use-non-TeX-fonts set to `%3$s'."),
+                                       included_file.displayName(),
+                                       from_utf8(child_tf),
+                                       from_utf8(master_tf));
+                               Alert::warning(_("Different use-non-TeX-fonts 
settings"), text, true);
+                       }
+
                        // Make sure modules used in child are all included in 
master
                        // FIXME It might be worth loading the children's 
modules into the master
                        // over in BufferParams rather than doing this check.

Reply via email to