format references like `.. [1] Foo ref`