LT_HTMLITEMATTR,
LT_HTMLLABEL,
LT_HTMLLABELATTR,
+ LT_HTMLLABELFIRST,
LT_HTMLPREAMBLE,
LT_HTMLSTYLE,
LT_INTITLE // keep this last!
{ "htmlitemattr", LT_HTMLITEMATTR },
{ "htmllabel", LT_HTMLLABEL },
{ "htmllabelattr", LT_HTMLLABELATTR },
+ { "htmllabelfirst", LT_HTMLLABELFIRST },
{ "htmlpremable", LT_HTMLPREAMBLE },
{ "htmlstyle", LT_HTMLSTYLE },
{ "htmltag", LT_HTMLTAG },
lex >> htmllabelattr_;
break;
+ case LT_HTMLLABELFIRST:
+ lex >> htmllabelfirst_;
+ break;
+
case LT_HTMLSTYLE:
htmlstyle_ = from_utf8(lex.getLongString("EndHTMLStyle"));
break;
std::string const & htmllabel() const { return htmllabel_; }
///
std::string const & htmllabelattr() const { return htmllabelattr_; }
+ ///
+ bool htmllabelfirst() const { return htmllabelfirst_; }
///
docstring const & htmlstyle() const { return htmlstyle_; }
///
std::string htmllabel_;
/// Attributes for the label.
std::string htmllabelattr_;
+ /// Whether to put the label before the item, or within the item.
+ /// I.e., do we have (true):
+ /// <label>...</label><item>...</item>
+ /// or instead (false):
+ /// <item><label>...</label>...</item>
+ /// The latter is the default.
+ bool htmllabelfirst_;
/// CSS information needed by this layout.
docstring htmlstyle_;
/// Any other info for the HTML header.
Layout const & lay = par->layout();
if (!lay.counter.empty())
buf.params().documentClass().counters().step(lay.counter);
+ // FIXME We should see if there's a label to be output and
+ // do something with it.
if (par != pbegin)
os << '\n';
bool const opened = openTag(os, lay);
return pend;
}
-
+
ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
odocstream & os,
OutputParams const & runparams,
ParagraphList const & paragraphs,
ParagraphList::const_iterator const & pbegin,
- ParagraphList::const_iterator const & pend) {
-
+ ParagraphList::const_iterator const & pend)
+{
ParagraphList::const_iterator par = pbegin;
Layout const & bstyle = par->layout();
depth_type const origdepth = pbegin->params().depth();
case LATEX_ENVIRONMENT:
case LATEX_LIST_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT: {
- // FIXME Factor this out.
// There are two possiblities in this case.
// One is that we are still in the environment in which we
// started---which we will be if the depth is the same.
par->simpleLyXHTMLOnePar(buf, os, runparams,
outerFont(distance(paragraphs.begin(), par), paragraphs), sep);
++par;
- // We may not want to close the tag yet, in particular,
- if (item_tag_opened
- // if we're not at the end...
- && par != pend
+ if (item_tag_opened) {
+ // We may not want to close the tag yet, in particular,
+ // if we're not at the end...
+ if (par != pend
// and are doing items...
- && style.latextype == LATEX_ITEM_ENVIRONMENT
- // and if the depth has changed...
- && par->params().depth() != origdepth) {
- // then we'll save this layout for later, and close it when
- // we get another item.
+ && style.latextype == LATEX_ITEM_ENVIRONMENT
+ // and if the depth has changed...
+ && par->params().depth() != origdepth) {
+ // then we'll save this layout for later, and close it when
+ // we get another item.
lastlay = &cstyle;
- } else {
- closeItemTag(os, cstyle); // FIXME
+ } else {
+ closeItemTag(os, cstyle);
+ }
os << '\n';
}
- }
+ }
// The other possibility is that the depth has increased, in which
// case we need to recurse.
else {