]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpecialChar.cpp
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetSpecialChar.cpp
index 0750187c650f1177f05f05e7997af9f045b2ae6c..469e82c1c6712bbcb69cb0adaac560add98b9336 100644 (file)
@@ -19,6 +19,7 @@
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
+#include "output_xhtml.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -32,7 +33,7 @@ namespace lyx {
 
 
 InsetSpecialChar::InsetSpecialChar(Kind k)
-       : kind_(k)
+       : Inset(0), kind_(k)
 {}
 
 
@@ -291,6 +292,32 @@ int InsetSpecialChar::docbook(odocstream & os, OutputParams const &) const
 }
 
 
+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() << "&hellip;";
+               break;
+       case MENU_SEPARATOR:
+               xs << XHTMLStream::NextRaw() << "&rArr;";
+               break;
+       case SLASH:
+               xs << XHTMLStream::NextRaw() << "&frasl;";
+               break;
+       case NOBREAKDASH:
+               xs << '-';
+               break;
+       }
+       return docstring();
+}
+
+
 void InsetSpecialChar::tocString(odocstream & os) const
 {
        plaintext(os, OutputParams(0));