+
+ if((ISSET(a1, GR_ATTR(numbered)) || ISSET(a2, GR_ATTR(numbered)))
+ && index>=0){
+
+ DEColourGroup *cg;
+ GrStyleSpec tmp;
+
+ gr_stylespec_init(&tmp);
+ gr_stylespec_append(&tmp, a2);
+ gr_stylespec_set(&tmp, GR_ATTR(tabnumber));
+
+ cg=debrush_get_colour_group2(brush, a1, &tmp);
+
+ gr_stylespec_unalloc(&tmp);
+
+ if(cg!=NULL){
+ char *s=NULL;
+
+ libtu_asprintf(&s, "[%d]", index+1);
+
+ if(s!=NULL){
+ int l=strlen(s);
+ uint w=debrush_get_text_width(brush, s, l);
+ if(w < g->w-bdw->right-bdw->left){
+ int ty=get_ty(g, bdw, fnte);
+ int tx=(d->textalign==DEALIGN_RIGHT
+ ? g->x+bdw->left
+ : g->x+g->w-bdw->right-w);
+ debrush_do_draw_string(brush, tx, ty, s, l, TRUE, cg);
+ }
+ free(s);
+ }
+ }
+ }
+
+ if(ISSET(a2, GR_ATTR(tagged)) || ISSET(a1, GR_ATTR(tagged))){