]> git.lyx.org Git - lyx.git/commitdiff
Do not load the tipa package when fontspec is used
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 14 Dec 2013 08:13:17 +0000 (09:13 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 14 Dec 2013 08:13:17 +0000 (09:13 +0100)
This was until now only cared of by the IPA inset, not by unicodesymbols.

src/LaTeXFeatures.cpp
src/insets/InsetIPA.cpp
src/insets/InsetIPAMacro.cpp

index 8ddd345bb68a04ab79378fb45aadd6ee0d5e6dec..d291f668da239afd8cb7dc7f52bfbe5cb11b7bae 100644 (file)
@@ -709,9 +709,6 @@ char const * simplefeatures[] = {
        "fancybox",
        "calc",
        "units",
-       "tipa",
-       "tipx",
-       "tone",
        "framed",
        "soul",
        "textcomp",
@@ -859,6 +856,16 @@ string const LaTeXFeatures::getPackages() const
        // The rest of these packages are somewhat more complicated
        // than those above.
 
+       // The tipa package and its extenstions (tipx, tone) must not
+       // be loaded with non-TeX font, since fontspec includes the
+       // respective macros
+       if (mustProvide("tipa") && !params_.useNonTeXFonts)
+               packages << "\\usepackage{tipa}\n";
+       if (mustProvide("tipx") && !params_.useNonTeXFonts)
+               packages << "\\usepackage{tipx}\n";
+       if (mustProvide("tone") && !params_.useNonTeXFonts)
+               packages << "\\usepackage{tone}\n";
+
        // if fontspec or newtxmath is used, AMS packages have to be loaded
        // before fontspec (in BufferParams)
        string const amsPackages = loadAMSPackages();
index a43cef12da4771cd7e0248ed0cdc7a55aed9327f..6fe0a90fc7a841034b9d520e35fa214df5783f9c 100644 (file)
@@ -207,10 +207,9 @@ bool InsetIPA::notifyCursorLeaves(Cursor const & old, Cursor & cur)
 
 void InsetIPA::validate(LaTeXFeatures & features) const
 {
-       if (!buffer_->params().useNonTeXFonts) {
-               features.require("tipa");
-               features.require("tipx");
-       }
+       features.require("tipa");
+       features.require("tipx");
+
        InsetText::validate(features);
 }
 
index f8888ce96e7b4cd021128de71826fa65cec67d69..38cf14583b3c40010f287eca2dfb8df8287ad66b 100644 (file)
@@ -354,8 +354,7 @@ void InsetIPADeco::string2params(string const & in, InsetIPADecoParams & params)
 
 void InsetIPADeco::validate(LaTeXFeatures & features) const
 {
-       if (!buffer_->params().useNonTeXFonts)
-               features.require("tipa");
+       features.require("tipa");
        InsetText::validate(features);
 }
 
@@ -610,8 +609,7 @@ void InsetIPAChar::validate(LaTeXFeatures & features) const
        case TONE_HIGH_RISING:
        case TONE_LOW_RISING:
        case TONE_HIGH_RISING_FALLING:
-               if (!buffer_->params().useNonTeXFonts)
-                       features.require("tone");
+               features.require("tone");
                break;
        default:
                break;