commit 3f9e644c254f044686ac6ae37914e3a8d9e82f47
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Dec 14 09:13:17 2013 +0100
Do not load the tipa package when fontspec is used
This was until now only cared of by the IPA inset, not by unicodesymbols.
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index 8ddd345..d291f66 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -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();
diff --git a/src/insets/InsetIPA.cpp b/src/insets/InsetIPA.cpp
index a43cef1..6fe0a90 100644
--- a/src/insets/InsetIPA.cpp
+++ b/src/insets/InsetIPA.cpp
@@ -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);
}
diff --git a/src/insets/InsetIPAMacro.cpp b/src/insets/InsetIPAMacro.cpp
index f8888ce..38cf145 100644
--- a/src/insets/InsetIPAMacro.cpp
+++ b/src/insets/InsetIPAMacro.cpp
@@ -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;