                 published: now
               if file.graphic.labels.length > 0
                 filerev.title = "Figure " +
-                  ("``#{label}''" for label in file.graphic.labels).join " / "
+                  (formatLabel label for label in file.graphic.labels).join " / "
               if file.graphic.subcaption
                 filerev.body = file.graphic.subcaption
               filemsg = _.clone filerev

        delete revision.creator
        await Meteor.call 'messageImport', group, null, message, [revision], defer error, message._id

        attach = _.unique attach  ## upload \ref'd figures only once each
        for figure in attach
          figure.message =
            title: "Figure " +
              ("``#{label}''" for label in figure.labels).join " / "
            body: figure.caption
            published: now
            format: 'latex'
          frevision = _.clone figure.message
          figure.message.creator = me
          figure.message.created = now
          frevision.updators = [me]
          frevision.updated = now
          await Meteor.call 'messageImport', group, message._id, figure.message, [frevision], defer error, figure.message._id

        await
          for figure in attach
            figure.files = []

            labels[ref]
          else if ref of figures
            attach.push figures[ref]
            #formatLabel figures[ref].labels[figures[p1].labels.length-1]
            formatLabel ref
          else
            console.warn "Unresolved #{match}"
            match
