From: Juergen Spitzmueller Date: Sat, 14 Dec 2013 08:13:17 +0000 (+0100) Subject: Do not load the tipa package when fontspec is used X-Git-Tag: 2.1.0rc1~337 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=3f9e644c254f044686ac6ae37914e3a8d9e82f47;p=features.git 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 8ddd345bb6..d291f668da 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 a43cef12da..6fe0a90fc7 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 f8888ce96e..38cf14583b 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;