uwdata / living-papers

Authoring tools for scholarly communication. Create interactive web pages or formal research papers from markdown source.
BSD 3-Clause "New" or "Revised" License
131 stars 10 forks source link

Trouble with ampersands in bibliography URLs #97

Open joshuahhh opened 1 year ago

joshuahhh commented 1 year ago

I think you're supposed to escape ampersands in bibliography URLs. (Seems like LaTeX yells at me when I don't.)

But something in LP's bibliography pipeline messes them up. In my .md:

@misc{wikipedia-grafting,
  author = "{Wikipedia contributors}",
  title = "Grafting --- {W}ikipedia{,} The Free Encyclopedia",
  year = "2022",
  url = "https://en.wikipedia.org/w/index.php?title=Grafting\&oldid=1095365064",
  note = "[Online; accessed 01-September-2022]"
}

In the output .bib:

@misc{wikipedia-grafting,
    author = {{Wikipedia contributors}},
    year = {2022},
    note = {[Online; accessed 01-September-2022]},
    title = {Grafting --- {Wikipedia}, {The} {Free} {Encyclopedia}},
    howpublished = {https://en.wikipedia.org/w/index.php?title=Grafting%5C&oldid=1095365064},
}

There's actually a bunch of things getting twiddled with here, which is a bit surprising. But the important bit is that \& becomes %5C&, which doesn't work.