diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index e7b2c78564..8ee06ea01f 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -3162,7 +3162,8 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf, if (style.pass_thru || runparams.pass_thru) xs << c; - else if (c == '-') { + else if (c == '-' && !runparams.inIPA && + font.fontInfo().family() != TYPEWRITER_FAMILY) { docstring str; int j = i + 1; if (j < size() && d->text_[j] == '-') { diff --git a/src/insets/InsetIPA.cpp b/src/insets/InsetIPA.cpp index 33ede5515f..2f756f28bc 100644 --- a/src/insets/InsetIPA.cpp +++ b/src/insets/InsetIPA.cpp @@ -231,6 +231,14 @@ void InsetIPA::latex(otexstream & os, OutputParams const & runparams_in) const } +docstring InsetIPA::xhtml(XHTMLStream & xs, OutputParams const & runparams_in) const +{ + OutputParams runparams(runparams_in); + runparams.inIPA = true; + return InsetText::xhtml(xs, runparams); +} + + bool InsetIPA::insetAllowed(InsetCode code) const { switch (code) { diff --git a/src/insets/InsetIPA.h b/src/insets/InsetIPA.h index 4688696b99..f100c663f9 100644 --- a/src/insets/InsetIPA.h +++ b/src/insets/InsetIPA.h @@ -72,6 +72,8 @@ public: /// void latex(otexstream &, OutputParams const &) const; /// + docstring xhtml(XHTMLStream & xs, OutputParams const &) const; + /// void validate(LaTeXFeatures & features) const; /// bool allowSpellCheck() const { return false; }