mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Add i, ii, iii, iv suffixes to CSS class as well in the case of itemizations
This commit is contained in:
parent
23a997bbf6
commit
5ac560cfa1
@ -1825,9 +1825,9 @@ string const & Layout::htmlattr() const
|
||||
|
||||
string const & Layout::htmlclass() const
|
||||
{
|
||||
// If it's an enumeration, then we recalculate the class each time through
|
||||
// unless it has been given explicitly. So we do nothing here.
|
||||
if (htmlclass_.empty() && labeltype != LABEL_ENUMERATE)
|
||||
// If it's an enumeration or itemize list, then we recalculate the class each
|
||||
// time through (unless it has been given explicitly). So we do nothing here.
|
||||
if (htmlclass_.empty() && labeltype != LABEL_ENUMERATE && labeltype != LABEL_ITEMIZE)
|
||||
htmlclass_ = defaultCSSClass();
|
||||
return htmlclass_;
|
||||
}
|
||||
|
@ -408,16 +408,19 @@ ParagraphList::const_iterator makeEnvironment(Buffer const & buf,
|
||||
depth_type const origdepth = pbegin->params().depth();
|
||||
|
||||
// open tag for this environment
|
||||
if (bstyle.labeltype == LABEL_ENUMERATE && bstyle.htmlclass().empty()) {
|
||||
if ((bstyle.labeltype == LABEL_ENUMERATE || bstyle.labeltype == LABEL_ITEMIZE)
|
||||
&& bstyle.htmlclass().empty()) {
|
||||
// In this case, we have to calculate the CSS class ourselves, each time
|
||||
// through
|
||||
// FIXME We assume in these cases that the standard enumeration counter
|
||||
// is being used. (We also do not deal with 'resume' counters, though I'm
|
||||
// not sure that can be done at all.)
|
||||
// FIXME We assume in these cases that the standard counters are being used.
|
||||
// (We also do not deal with 'resume' counters, though I'm not sure that can
|
||||
// be done at all in HTML.)
|
||||
|
||||
// Code borrowed from Buffer::Impl::setLabel
|
||||
// Code adapated from Buffer::Impl::setLabel
|
||||
docstring enumcounter = bstyle.counter.empty() ?
|
||||
from_ascii("enum") : bstyle.counter;
|
||||
(bstyle.labeltype == LABEL_ENUMERATE ?
|
||||
from_ascii("lyxenum") : from_ascii("lyxitem") ) :
|
||||
bstyle.counter;
|
||||
switch (par->itemdepth) {
|
||||
case 2:
|
||||
enumcounter += 'i';
|
||||
|
Loading…
Reference in New Issue
Block a user