\Css{li p.indent { text-indent: 0em }}
\Css{li p:first-child{ margin-top:0em; }}
\Css{li p:last-child, li div:last-child { margin-bottom:0.5em; }}
\Css{li p\string ~ul:last-child,
li p\string ~ol:last-child{ margin-bottom:0.5em; }}
-_-_-
\ConfigureEnv{trivlist}
{}{<.try env inline par.>}{}{}
\ConfigureList{trivlist}%
{\EndP\HCode{<dl \a:LRdir class="trivlist">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="trivlist">}\bgroup \bf}
{\egroup\HCode{</dt><dd\Hnewline class="trivlist">}}
\ConfigureEnv{list}
{}{<.try env inline par.>}{}{}
\ConfigureList{list}%
{\EndP\HCode{<dl \a:LRdir class="list\expandafter\the
\csname @listdepth\endcsname">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="list">}\bgroup \bf}
{\egroup\HCode{</dt><dd\Hnewline class="list">}\par\ShowPar}
\ConfigureEnv{itemize}
{\ifvmode \IgnorePar\fi \EndP}{<.try env inline par.>}
{}{}
\ConfigureList{itemize}%
{\EndP\HCode{<ul \a:LRdir
class="\getClass{itemize}itemize\expandafter\the
\csname @itemdepth\endcsname">}%
\afterGetClass{itemize}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\ifvmode \IgnorePar\fi
\EndP\HCode{</li></ul>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="\getClass{li}itemize">}\afterGetClass{li}}
\NewConfigure{itemizeClass}{2}
\Configure{itemizeClass}{}{}
\NewConfigure{liClass}{2}
\Configure{liClass}{}{} -_-_-
\ConfigureList{enumerate}%
{\EndP\HCode{<dl \a:LRdir class="enumerate">}%
\PushMacro\end:itm
\global\let\end:itm=\empty}
{\PopMacro\end:itm \global\let\end:itm \end:itm
\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="enumerate">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="enumerate">}}
\Css{dd.enumerate {margin-left: 2em;}}
\Css{dt.enumerate {float:left;
clear:left;
margin-right:0.5em;
margin-left:0.5em;
text-align:right; }}
-_-_-
\Log:Note{for enumerated list elements with valued data,
use the command line option ‘enumerate+’}
-_-_-
\bgroup
\def\textbullet{&\#x2219;}
\def\textasteriskcentered{&\#x2217;}
\Css{ul.itemize1 {list-style-type: none;}}
\Css{ul.itemize1 li.itemize:before { display: marker;
marker-offset: 0.5em;
content: "\labelitemi\space" }}
\Css{ul.itemize2 {list-style-type: none;}}
\Css{ul.itemize2 li.itemize:before { display: marker;
marker-offset: 0.5em;
content: "\labelitemii\space" }}
\Css{ul.itemize3 {list-style-type: none;}}
\Css{ul.itemize3 li.itemize:before { display: marker;
marker-offset: 0.5em;
content: "\labelitemiii\space" }}
\egroup
-_-_-
\EndP\HCode{<ol \a:enumerate:\space
class="enumerate\expandafter\the\csname @enumdepth\endcsname"
\a:LRdir
>}<.save end:itm.>\global\let\end:itm=\empty -_-_-
\end:itm \gdef\end:itm{\EndP\Tg</li>}\DeleteMark
-_-_-
\HCode{<li class="enumerate" value="\expandafter\the\csname
c@enum\romannumeral\the\@enumdepth\endcsname"\Hnewline>}\AnchorLabel
-_-_-
{\Configure{Link}{li}{}{ class="enumerate" id=}{}%
\let\EndLink=\empty \AnchorLabel }%
-_-_-
It is better to put the LI in the third field to avoid extra space to the following
text.
\def\c:enumerate:#1{\c:enu #1<.par del.>}
\def\c:enu#1#2#3#4#5<.par del.>{%
\def\a:enumerate:{\ifcase \@enumdepth \or
#1\or #2\or #3\or #4\else\fi #5}} -_-_-
\Configure{enumerate}{{}{}{}{}}
\Css{.enumerate1 {list-style-type:decimal;}}
\Css{.enumerate2 {list-style-type:lower-alpha;}}
\Css{.enumerate3 {list-style-type:lower-roman;}}
\Css{.enumerate4 {list-style-type:upper-alpha;}}
-_-_-
\:CheckOption{html+} \if:Option
\Configure{enumerate}
{%
{style="list-style-type:decimal"}%
{style="list-style-type:lower-alpha"}%
{style="list-style-type:lower-roman"}%
{style="list-style-type:upper-alpha"}%
}
\else
\Log:Note{for stricter html code,
use the command line option ‘html+’}
\Configure{enumerate}{%
{type="\theenumi"}%
{type="\theenumii"}%
{type="\theenumiii"}%
{type="\theenumiv"}}
\fi
\Configure{enumiii}
{\HCode{<span class="roman-numeral">}}
{\HCode{</span>}}
-_-_-
\ConfigureEnv{Itemize}
{\ifvmode \IgnorePar\fi \EndP}{<.try env inline par.>}
{}{}
\ConfigureList{Itemize}%
{\EndP\HCode{<ul \a:LRdir class="itemize\expandafter\the
\csname @itemdepth\endcsname">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</li></ul>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="itemize">}} -_-_-
\ConfigureEnv{itemstep}
{\ifvmode \IgnorePar\fi
\EndP\HCode{<ul \a:LRdir class="itemstep\expandafter\the
\csname @itemdepth\endcsname">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\ifvmode \IgnorePar\fi\EndP
\HCode{</li></ul>}\ShowPar}
{}
{}
\ConfigureList{itemstep}
{}
{}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="itemize\ifnum
\c@item@step>\c@overlaysCount -hide\fi">}}
\Css{li.itemize-hide {visibility:hidden;}} -_-_-
\EndP\HCode{<ol type="1"
class="enumerate\expandafter\the\csname @enumdepth\endcsname"
\a:LRdir
>}<.save end:itm.>\global\let\end:itm=\empty -_-_-
\ConfigureList{description}%
{\EndP\HCode{<dl \a:LRdir class="description">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="description">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="description">}} -_-_-
\ConfigureEnv{description}{\IgnorePar}{}{}{}
-_-_-
\ConfigureEnv{description}{\IgnorePar}{}{}{}
-_-_-
\ConfigureEnv{description}{\IgnorePar}{}{}{}
-_-_-
Latex allows groups like the following, so we need global \end:itm
\begin{enumerate}
{\item Line 1}
{\item Line 2}
\end{enumerate}
\PopMacro\end:itm \global\let\end:itm \end:itm
-_-_-
\ConfigureEnv{itemize*}
{\ifvmode \IgnorePar\fi \EndP}{<.try env inline par.>}
{}{}
\ConfigureList{itemize*}%
{\EndP\HCode{<ul \a:LRdir class="itemize\expandafter\the
\csname @itemdepth\endcsname">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</li></ul>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</li>}\DeleteMark}
{\HCode{<li class="itemize">}}
\ConfigureEnv{enumerate*}
{}{<.try env inline par.>}{}{}
\ConfigureList{enumerate*}%
{<.enumerate I.>}
{<.enumerate II.>}
{<.enumerate III.>}
{<.enumerate IV.>}
\ConfigureList{description*}%
{\EndP\HCode{<dl \a:LRdir class="description">}%
<.save end:itm.>\global\let\end:itm=\empty}
{<.recall end:itm.>\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="description">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="description">}}
\ConfigureList{basedescript}
{\EndP\HCode{<dl \a:LRdir class="basedescript">}%
\PushMacro\end:itm \global\let\end:itm=\empty}
{\PopMacro\end:itm \global\let\end:itm \end:itm
\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="basedescript">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="basedescript">}} -_-_-
\ConfigureList{thenomenclature}%
{\EndP\HCode{<dl \a:LRdir class="thenomenclature">}%
\PushMacro\end:itm
\global\let\end:itm=\empty}
{\PopMacro\end:itm \global\let\end:itm \end:itm
\EndP\HCode{</dd></dl>}\ShowPar}
{\end:itm \global\def\end:itm{\EndP\Tg</dd>}\HCode{<dt
class="thenomenclature">}\bgroup \bf}
{\egroup\EndP\HCode{</dt><dd\Hnewline class="thenomenclature">}}
\Css{dt.thenomenclature{float:left; clear:left;}}
-_-_-
\expandafter\let\csname if:intoc\expandafter\endcsname\csname if@intoc\endcsname
\expandafter\edef\csname if@intoc\endcsname{%
\expandafter\noexpand\csname iftrue\endcsname
\let\expandafter\noexpand \csname if@intoc\endcsname
\expandafter\noexpand \csname if:intoc\endcsname
\expandafter\noexpand\csname else\endcsname}%
-_-_-
\def\:temp{thenomenclature}\ifx\:temp\@currenvir
\RecallEverypar
\fi
-_-_-