!! input: raw_dep
!! output: html_dep

!set dep_dim=!itemcnt $raw_dep

!set html_dep=
!set start=0
!for j=1 to $dep_dim
 !set c=!item $j of $raw_dep
 !ifval $c!=0
  !if $c>0 and $start>0
   !set html_dep=$html_dep+
  !endif
  !ifval abs($c)=1
   !set c=!char 1 to -2 of $c
  !endif
  !set html_dep=$html_dep$c$(v_$type)<sub>$j</sub>
  !set start=1
 !endif
!next j
!if $start=0
 !set html_dep=0
!endif

