Skip to content
Snippets Groups Projects
Verified Commit ec3966e8 authored by mirabilos's avatar mirabilos Committed by mirabilos
Browse files

support two-argument form of .It

.It [&lang] itemid [itemlabel]
where itemlabel defaults to itemid
parent bac7138e
No related branches found
No related tags found
No related merge requests found
......@@ -43,18 +43,9 @@ bn=$1
if (( dl )); then
ul=dl
function htm_li {
local itemkey=${|tohtm "$1";}
print -nru4 -- "<dt>${itemkey:-}</dt><dd$xmllang${1:+ id=\"$itemkey\"}>"
xnl=
}
li=dd
else
ul=ul
function htm_li {
print -nru4 -- "<li$xmllang${1:+ id=\"${|tohtm "$1";}\"}>"
xnl=
}
li=li
fi
......@@ -272,14 +263,23 @@ while IFS= read -r line; do
(It)
endit
getlang
htm_li "$line"
if [[ -z $line ]]; then
getcw
if [[ -z $cw ]]; then
[[ $li = li ]] || print -nru4 -- "<dt>✹</dt>"
print -nru4 -- "<$li$xmllang>"
print -ru5 -- '\item[\TwelweStar\hfill]'"$ltxlang{%"
elif [[ -z $line ]]; then
[[ $li = li ]] || print -nru4 -- "<dt>${|tohtm "$cw";}</dt>"
print -nru4 -- "<$li$xmllang id=\"${|tohtm "$cw";}\">"
print -ru5 -- "\\bibitem{${|totex "$cw";}}$ltxlang{%"
else
print -ru5 -- '\bibitem{'"${|totex "$line";}}$ltxlang{%"
[[ $li = li ]] || print -nru4 -- "<dt>${|tohtm "$line";}</dt>"
print -nru4 -- "<$li$xmllang id=\"${|tohtm "$cw";}\">"
print -ru5 -- "\\bibitem[${|totex "$line";}]{${|totex "$cw";}}$ltxlang{%"
fi
init=1
xnl=
tnl=' '
init=1
;;
(a)
getcw
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment