简体   繁体   中英

Customized hyperlinks for markdown-bibtex to html conversion using Pandoc

I am using the following style to have my bibilography imported from a bibtex file in markdown and from there to html/pdf:

 ---
 bibliography: test.bib
 nocite: '@*'
 ...

 # Biliography

After that I run:

pandoc test.md -o test.html --bibligraphy test.bib --csl=test.csl

However currently the urls of bib entries after conversion to html appear as:

 <a href="www.test.com/test.pdf">www.test.com/test.pdf</a>

I could not figure out how to change this to something like:

 <a href="www.test.com/test.pdf">test file!</a>

I could manipulate prefix and suffic by touching the csl file but could not change the hyperlink name. Any help is appreciated.

I'm afraid the answer to this is that it's not possible. CSL just doesn't allow you to set a hyperlink on a string and since CSL is what pandoc relies on for bibliographies, there's no way to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM