code: private Block createFootnoteReferenceBlock(int counter)
      {
          Block result = new WordBlock(String.valueOf(counter));
          DocumentResourceReference reference = new DocumentResourceReference(null);
          reference.setAnchor(FOOTNOTE_ID_PREFIX + counter);
          result = new LinkBlock(Collections.singletonList(result), reference, false);
          result = new FormatBlock(Collections.singletonList(result), Format.SUPERSCRIPT);
          result.setParameter(ID_ATTRIBUTE_NAME, FOOTNOTE_REFERENCE_ID_PREFIX + counter);
          result.setParameter(CLASS_ATTRIBUTE_NAME, "footnoteRef");
          return result;
      }
docs: Generate the footnote reference (link) that should be inserted at the location of the macro, and should point to
  the actual footnote at the end of the document.
  
  @param counter the current footnote counter
  @return the generated reference element, displayed as {@code (superscript(link(footnote index)))}