Displaying URL and Accessed Date Information of a Website in Bibliography using Bibtex
Dear Form Members,
I am using Zotero to export my .bib file. It so happens that I would like to cite websites. I would like the URL and the access date of the website to be displayed in my bibliography. I do reference the Zotero item as "website". The URL is displayed. The access date ist not.
This forum discussion [1] has led me to this webpage [2]. This webpage suggests to use the javascript below.
[1] https://forums.zotero.org/discussion/70710/displaying-url-and-accessed-date-information-of-web-page-bibliography-type
[2] https://retorque.re/zotero-better-bibtex/exporting/scripting/
if (Translator.BetterBibTeX && item.itemType === 'webpage') {
if (item.accessDate) {
reference.add({ name: 'note', value: "(accessed " + item.accessDate + ")" });
}
if (item.url) {
reference.add({ name: 'howpublished', bibtex: "{\\url{" + reference.enc_verbatim({value: item.url}) + "}}" });
}
}
This does work as far as it does display the access date in some form. To be exact as: "accessed 2020-03-12T13:11:07Z".
Surprisingly the .bib file still does not contain the information of the access date. How can this be?
Moreover I would like to change accessed to "Zuletzt geprüft". This is difficult because it has a German character ü in it, which the javascript code does not accept. Does anybody know how to work around this?
Last but not least I would like to get rid of the "T13:11:07Z" in "accessed 2020-03-12T13:11:07Z". I cannot figure out where this comes form. Ideally I would also like to change 2020-03-12 into 12.03.2020.
I hope someone can help at least with some of those issues.
Thanks in advance!
Timon
I am using Zotero to export my .bib file. It so happens that I would like to cite websites. I would like the URL and the access date of the website to be displayed in my bibliography. I do reference the Zotero item as "website". The URL is displayed. The access date ist not.
This forum discussion [1] has led me to this webpage [2]. This webpage suggests to use the javascript below.
[1] https://forums.zotero.org/discussion/70710/displaying-url-and-accessed-date-information-of-web-page-bibliography-type
[2] https://retorque.re/zotero-better-bibtex/exporting/scripting/
if (Translator.BetterBibTeX && item.itemType === 'webpage') {
if (item.accessDate) {
reference.add({ name: 'note', value: "(accessed " + item.accessDate + ")" });
}
if (item.url) {
reference.add({ name: 'howpublished', bibtex: "{\\url{" + reference.enc_verbatim({value: item.url}) + "}}" });
}
}
This does work as far as it does display the access date in some form. To be exact as: "accessed 2020-03-12T13:11:07Z".
Surprisingly the .bib file still does not contain the information of the access date. How can this be?
Moreover I would like to change accessed to "Zuletzt geprüft". This is difficult because it has a German character ü in it, which the javascript code does not accept. Does anybody know how to work around this?
Last but not least I would like to get rid of the "T13:11:07Z" in "accessed 2020-03-12T13:11:07Z". I cannot figure out where this comes form. Ideally I would also like to change 2020-03-12 into 12.03.2020.
I hope someone can help at least with some of those issues.
Thanks in advance!
Timon
So within the .bib file I get an entry such as:
@misc{zotero-128,
title = {Boltzmann-{{Statistik}} \textendash{} {{Wikipedia}}},
howpublished = {https://de.wikipedia.org/wiki/Boltzmann-Statistik}
}
In my bibliography in my .pdf file, which is being created by LaTeX I get:
Boltzmann-Statistik - Wikipedia. Https://de.wikipedia.org//wiki/Boltzmannn-Statistik, . - (Zuletzt geprueft 2020-03-12T12:27:30Z)
I am wondering how LaTeX can give me this output in the .pdf file, if the information about the date accessed (german: Zuletzt geprueft) is nowhere to be seen in the .bib file. Where does it take the information form if not from the .bib file.
Your Question: If it's not in the .bib file, where is the line in the first quote displayed?
Answer: The line in the first quote is displayed in the .pdf file created by LaTeX
Not a silly Question at all! I am exporting as "Better BibTeX" though.
You are right. I let it run a couple of more times as this time it accepted the ü. So this issue is resolved.
Do you happen to know how I can get rid of the "T13:11:07Z" Part in "accessed 2020-03-12T13:11:07Z"?
Sorry guys! With a couple of more reloads/exports my .bib file now displays
@misc{zotero-128,
title = {Boltzmann-{{Statistik}} \textendash{} {{Wikipedia}}},
note = {(Zuletzt gepr{\"u}ft 2020-03-12T12:27:30Z)},
howpublished = {\url{https://de.wikipedia.org/wiki/Boltzmann-Statistik}}
}
Maybe I got confused with my reload/export order.
These issues remain:
- How to get rid of the "T13:11:07Z" Part in "accessed 2020-03-12T13:11:07Z"
- How to get rid of the comma and the period in in between the URL and the parenthesis of the (Zuletzt geprüft)*
*Boltzmann-Statistik - Wikipedia. https://de.wikipedia.org//wiki/Boltzmannn-Statistik, . - (Zuletzt geprüft 2020-03-12T12:27:30Z)
*better
*Boltzmann-Statistik - Wikipedia. https://de.wikipedia.org//wiki/Boltzmannn-Statistik - (Zuletzt geprüft 2020-03-12T12:27:30Z)
Yes I did :D
Sorry for being away for a while. Busy times... let's continue this on GitHub :D
It initially just managed the "user feedback required" label based on who spoke last, hence its name.
For non-question issues it will also re-open an issue when it's closed by anyone that's not a repo owner; I want to keep issues open until I've merged the results to master as a reminder to myself.
It also parses the opening message on non-questions to see if there's a debug log ID, and puts out a standard message if it's not found. People would fairly routinely omit it thinking it not relevant to the case, while I really need it, not just for diagnosis, but also because it gives me a testcase to prevent regression.
Is there any way we can reopen the case on GitHub. I am a bit slow in responding, I know, but I am still interested in solving my issue.