#include "Language.h"
#include "TextClass.h"
#include "Lexer.h"
-#include "Font.h"
+#include "FontInfo.h"
#include "support/Messages.h"
#include "support/debug.h"
LT_HTMLLABELFIRST,
LT_HTMLPREAMBLE,
LT_HTMLSTYLE,
- LT_HTMLFORCEDEFAULT,
+ LT_HTMLFORCECSS,
LT_INTITLE // keep this last!
};
toclevel = NOT_IN_TOC;
commanddepth = 0;
htmllabelfirst_ = false;
- htmlforcedefault_ = false;
+ htmlforcecss_ = false;
}
{ "font", LT_FONT },
{ "freespacing", LT_FREE_SPACING },
{ "htmlattr", LT_HTMLATTR },
- { "htmlforcedefault", LT_HTMLFORCEDEFAULT },
+ { "htmlforcecss", LT_HTMLFORCECSS },
{ "htmlitem", LT_HTMLITEM },
{ "htmlitemattr", LT_HTMLITEMATTR },
{ "htmllabel", LT_HTMLLABEL },
htmlstyle_ = from_utf8(lex.getLongString("EndHTMLStyle"));
break;
- case LT_HTMLFORCEDEFAULT:
- lex >> htmlforcedefault_;
+ case LT_HTMLFORCECSS:
+ lex >> htmlforcecss_;
case LT_HTMLPREAMBLE:
htmlpreamble_ = from_utf8(lex.getLongString("EndPreamble"));
docstring Layout::htmlstyle() const {
- if (!htmlstyle_.empty() && !htmlforcedefault_)
+ if (!htmlstyle_.empty() && !htmlforcecss_)
return htmlstyle_;
if (htmldefaultstyle_.empty())
makeDefaultCSS();
// sorts of margins or padding, for example. But for now we are
// going to keep it simple.
void Layout::makeDefaultCSS() const {
-#ifdef TEX2LYX
- // tex2lyx does not have FontInfo::asCSS()
- return;
-#else
// this never needs to be redone, since reloading layouts will
// wipe out what we did before.
if (!htmldefaultstyle_.empty())
htmldefaultstyle_ +=
from_ascii(htmllabeltag() + "." + defaultCSSLabelClass() + " {\n") +
labelfontCSS + from_ascii("\n}\n");
-#endif
}