2

I am quite new to overleaf/latex and have run into a problem. I want to cite a link which containt % and this outcomments the link is there anyway to get around this?

code:

    @book{web:KompetenceProfil,
    author = "UVM",
    title = "Undervisningsvejledning for forsøgsfaget teknologiforståelse",
    year = "2018",
    publisher = "2021",
    address = "\newline \url{https://emu.dk/sites/default/files/2019-02/GSK.%20F%C3%A6lles%20M%C3%A5l.%20Tilg%C3%A6ngelig.%20Teknologiforst%C3%A5else.pdf}"
}

So at every % it outcomments the link tried to google around but could not google correctly thank you in advance for my stupidity :)

12
  • 1
    Note that the address field is not for this. Use the note field instead and make use you load the url or xurl packages, when those package are loaded \url should be able to handle %. Several bibtex styles "provide" a poormans version of \url if it is not already defined, but those versions cannot handle %
    – daleif
    Mar 26 at 11:13
  • 1
    Additionally, next time please provide a full minimal example such that we know which packages you are using.
    – daleif
    Mar 26 at 11:14
  • it depends on your bibliography system, but you could try to input all % as \% Mar 26 at 11:17
  • Sorry it actually worked even though it was outcommented. I use hyperref is that ok or would you recommend bibtex?
    – Simon
    Mar 26 at 11:24
  • 1
    still remember to load xurl, it works better, also with hyperref
    – daleif
    Mar 26 at 11:27
0

(Tom from Overleaf Support here.)

I'm afraid that you fail victim of a glitch in our current (March 2021) syntax highlighting. Percent signs don't start a comment in a bib file, despite our syntax highlighter suggesting they do, sorry for that. It's a limitation of our current editor that we are aware of and are looking to mitigate, but we can't say when this will happen. Apologies for this once more.

To conclude: The percent signs should work just fine in a bib file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.