mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
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:
parent
8c29d00e11
commit
8d55d452ff
@ -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 << "}";
|
||||
|
Loading…
Reference in New Issue
Block a user