#include "InsetSpecialChar.h"
#include "Dimension.h"
+#include "Font.h"
#include "LaTeXFeatures.h"
#include "Lexer.h"
#include "MetricsInfo.h"
+#include "output_xhtml.h"
#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
InsetSpecialChar::InsetSpecialChar(Kind k)
- : kind_(k)
+ : Inset(0), kind_(k)
{}
os << "\\ldots{}";
break;
case MENU_SEPARATOR:
- os << "\\lyxarrow{}";
+ if (rp.local_font->isRightToLeft())
+ os << "\\lyxarrow*{}";
+ else
+ os << "\\lyxarrow{}";
break;
case SLASH:
os << "\\slash{}";
}
+docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const
+{
+ switch (kind_) {
+ case HYPHENATION:
+ case LIGATURE_BREAK:
+ break;
+ case END_OF_SENTENCE:
+ xs << '.';
+ break;
+ case LDOTS:
+ xs << XHTMLStream::NextRaw() << "…";
+ break;
+ case MENU_SEPARATOR:
+ xs << XHTMLStream::NextRaw() << "⇒";
+ break;
+ case SLASH:
+ xs << XHTMLStream::NextRaw() << "⁄";
+ break;
+ case NOBREAKDASH:
+ xs << '-';
+ break;
+ }
+ return docstring();
+}
+
+
void InsetSpecialChar::tocString(odocstream & os) const
{
plaintext(os, OutputParams(0));
}
-bool InsetSpecialChar::isChar() const
-{
- return true;
-}
-
-
bool InsetSpecialChar::isLetter() const
{
return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK;