A solution is to use the :download:
“role” (detailed in the sphinx documentation on roles).
Here is a short example assuming you have a file mypdf.pdf
in a directory doc
. The directory doc
and your rst file must be in the same directory:
here is a pdf file :download:`pdf <doc/mypdf.pdf>`
Note that you mustn't put a blank space between :download:
and the path to the file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…