2

In a document which I have been writing just as I have always done, file paths appear at the top of the document for each citation I make with biblatex. I have no idea why this is happening since I have done nothing different from what I usually do. I have even added \AtEveryBibitem{\clearfield{File}} to clear that but didn't work. The bib file was exported from Zotero. Below is a snapshot of the result. How do I take these off?Result

MWE:

\documentclass{article}

\usepackage{xpatch}
\usepackage[utf8]{inputenc}
\usepackage[maxcitenames=2,maxbibnames=99,url=false,isbn=false,doi=false,style=authoryear,giveninits=true,uniquelist=false,uniquename=false,backend=bibtex]{biblatex}
  \addbibresource{test.bib}
  \AtEveryBibitem{\clearfield{File}}
\usepackage{filecontents}

\begin{filecontents}{test.bib}
  @article{author1,
    Author = {Author1, N.},
    Date = {1981},
    File = {/Users/username/Zotero Library/zotero/storage/M3AB6QCB/1-s2.0-0012825281900039-main.pdf},
    Journaltitle = {Journal1},
    Shorttitle = {Title1},
    Title = {Journal1},
    Volume = {17}}

@article{author2,
    Author = {Author2, M.},
    Date = {1995},
    File = {/Users/username/Zotero Library/zotero/storage/6VK3AZ5E/1-s2.0-0895981195000125-main.pdf},
    Journaltitle = {Journal2},
    Title = {Title2},
    Urldate = {2017-06-28},
    Volume = {8}}

@article{author3,
    Author = {Author3, S.},
    Date = {2015-04},
    File = {/Users/username/Zotero Library/zotero/storage/TVKXVJSV/1-s2.0-S0895981115000152-main.pdf},
    Journaltitle = {Journal3},
    Shorttitle = {Title3},
    Title = {Title3},
    Urldate = {2018-02-15},
    Volume = {59}}
\end{filecontents}

\begin{document}

{
\centering\Large\bfseries

My title

}

\section{First}
\parencite{author1}

\textcite{author2}

\cite{author3}

\printbibliography

\end{document}
Rodrigues
  • 199
  • Added the bib. Hope you can reproduce it. – Rodrigues May 27 '18 at 20:09
  • My guess: the space in Zotero Library might be the problem – samcarter_is_at_topanswers.xyz May 27 '18 at 20:13
  • Just added \end{filecontents} to MWE. Also tried replacing Zotero Library with ZoteroLibrary and the problem continues. How do I know which version of biblatex it is? – Rodrigues May 27 '18 at 20:18
  • @samcarter right. It's version 3.4. – Rodrigues May 27 '18 at 20:22
  • 1
    @Rodrigues Your MWE works fine with v. 3.10. The current version is 3.11. Can you update your tex distribution? – samcarter_is_at_topanswers.xyz May 27 '18 at 20:23
  • 2
    Your .bib file ends quite abruptly with Volume = {59. If I add in what is presumably missing so it becomes Volume = {59}} I get no spurious paths and the expected output. Not sure if that can help, but can you try backend=biber and compile with Biber (see https://tex.stackexchange.com/q/154751/35864) instead of BibTeX? – moewe May 27 '18 at 20:26
  • @moewe sorry for the missing }}. But also didn't solve for me. Tried switching to biber and bibliography didn't print, nor were the citations right (like in this problem: https://tex.stackexchange.com/questions/135484/still-biblatex-will-not-print-bibliography) – Rodrigues May 27 '18 at 20:31
  • Well it would have surprised me if the }} had helped, it was just for the benefit of others trying the MWE. If you change from backend=bibtex to backend=bibtex you need to run Biber instead of BibTeX. Presumably your editor currently runs BibTeX for you, so you need to instruct it to run Biber for you. You can find help on that in https://tex.stackexchange.com/q/154751/35864 – moewe May 27 '18 at 20:33
  • @samcarter it's MacTex 2016. Thanks for the help. – Rodrigues May 27 '18 at 20:38
  • 2
    With BibTeX there is no way to remove the file field. I remember that there were some changes to the BibTeX backend around version 3.4 and it could very well be that you suffer from a bug that has long since been resolved. In that case an update is the best thing to do. Just install MacTeX 2018 (you don't need to uninstall MacTeX 2016) and switch to that version using the TeX distribution manager (last picture in egreg's answer here) – moewe May 27 '18 at 20:56
  • @moewe updated to mactex 2018, still didn't help. – Rodrigues May 27 '18 at 22:53
  • 1
    Please make a new directory, copy the code from your question into a new .tex file in that directory. Then pdflatex -> biber -> pdflatex -> pdflatex on the file. If you still see the problem, please post the .log file you get from that run. – cfr May 28 '18 at 01:22
  • 1
    @moewe after trying to upgrade to Mactex2018 the errors persisted and biblatex didn't update. I did a fresh install of everything and biblatex was still misbehaving, though with a different problem. So I began compiling with pdflatexmk in TeXshop and it worked. Went back to my Atom pdflatex compiler and it worked as well. I don't know what happened at all. In fact now it's compiling more seamlessly than before. – Rodrigues May 28 '18 at 10:43
  • 3
    I'm voting to close this question as off-topic because it was magically solved by a reinstallation of the TeX distribution. It is quite likely that the original problem was caused by an outdated package version, but we can't say that conclusively, maybe the installation was corrupted in some other way as well. – moewe May 28 '18 at 10:48
  • @moewe thanks a lot for the help. Maybe it was like what you said. Corrupted distro and packages. I noticed that siunitx and textgreek really were giving a lot of trouble. – Rodrigues May 28 '18 at 11:03

0 Answers0