make labels and references for figures