Open gardeAU opened 10 months ago
This is tricky and in fact an html
issue. The standard html
output for number items in <ol>...</ol>
is a number (appearing as a suitable numeral) followed be a period. A solution could be to use
<style>
ol {
list-style-type: none;
}
</style>
and hard code in python the desired format resulting in for example
<ol>
<li>(i) A</li>
<li>(ii) B</li>
<li>(iii) C</li>
</ol>
We should discuss how big of a subset of html
we want to use.
After a bit of digging online, I found a quite easy fix for this. In iLaTeXen.css, where ol.alpha and so on is defined, replace those parts with:
@counter-style paren-decimal { system: extends decimal; prefix: "("; suffix: ") "; }
@counter-style paren-lower-greek { system: extends lower-greek; prefix: "("; suffix: ") "; }
@counter-style paren-lower-alpha { system: extends lower-alpha; prefix: "("; suffix: ") "; }
@counter-style paren-upper-roman { system: extends upper-roman; prefix: "("; suffix: ") "; }
@counter-style paren-lower-roman { system: extends lower-roman; prefix: "("; suffix: ") "; }
ol.alpha { list-style-type: paren-lower-alpha; }
ol.greek { list-style-type: paren-lower-greek; }
ol.number { list-style-type: paren-decimal; }
ol.lowerroman { list-style-type: paren-lower-roman; }
ol.upperroman { list-style-type: paren-upper-roman; }
Very nice! Please submit pull request with updated QaDi/qadil/css/iLaTeXen,css
perhaps commenting out:
ol.alpha {
list-style-type: lower-alpha;
}
ol.greek {
list-style-type: lower-greek;
}
ol.number {
list-style-type: decimal;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
Also, one must delete the "." in self.baselabel
in Enumerate.py
to make labels appear right in \ref
.
When using \begin{enumerate}[(i)] .. \end{enumerate}, the list is given as
i. ii. iii.
I would prefer the arguably more standard style:
(i) (ii) (iii)
Could someone point me in the right direction? I have looked in Enumerate.py, and I assume it is related to the itemizetype = ' "lowerroman" ' in line 125, but I have not had any luck with modifications.