InsetIPA: fixes with non-tex-fonts.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40874 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2012-03-06 10:39:01 +00:00
parent 8c29d00e11
commit 8d55d452ff

View File

@ -187,6 +187,8 @@ bool InsetIPA::notifyCursorLeaves(Cursor const & old, Cursor & cur)
void InsetIPA::validate(LaTeXFeatures & features) const
{
if (buffer_->params().useNonTeXFonts)
return;
features.require("tipa");
features.require("tipx");
}
@ -195,12 +197,14 @@ void InsetIPA::validate(LaTeXFeatures & features) const
void InsetIPA::latex(otexstream & os, OutputParams const & runparams) const
{
bool const multipar = (text().paragraphs().size() > 1);
if (multipar)
// fontspec knows \textipa, but not the IPA environment
bool const nontexfonts = buffer_->params().useNonTeXFonts;
if (multipar && !nontexfonts)
os << "\\begin{IPA}\n";
else
os << "\\textipa{";
InsetText::latex(os, runparams);
if (multipar)
if (multipar && !nontexfonts)
os << "\n\\end{IPA}";
else
os << "}";