1

Good evening I am currently writing my thesis with latex and have faced a rather annoying problem. I cannot get my citation to work and couldn't solve this issue despite my efforts and following many threads. So I'd like you to keep in mind that I am not comfortable with the whole latex thing, so hopefully my issue is trivial... But it has given me headaches for month now ! Let me explain the details !

I have been writing on two different computers, and first implemented my citations on computer 1. It has always worked without a flow! But when I switched to computer 2 (which is my main computer), it worked for some time and eventually stopped working... It is still working on computer 1 (sadly not my main computer).

So I'm generating the .bib file using Zotero (better Bib LaTeX, generates unambiguous citation keys), writing with Texstudio 2.12.6, compiling with PdfLaTeX, default bibliography tool : BibTeX, document class: MastersDcotoralThesis.cls (v 1.5).

The code for citations has been given to me (so I must admit I don't fully understand it):

\usepackage[backend=bibtex,style=authoryear,natbib=true, maxbibnames=99,maxcitenames=2]{biblatex} 
\renewbibmacro*{name:andothers}{% 
    \ifboolexpr{
        test {\ifnumequal{\value{listcount}}{\value{liststop}}}
        and
        test \ifmorenames
    }
    {\ifnumgreater{\value{liststop}}{1}
        {\finalandcomma}
        {}%
        \andothersdelim\bibstring[\emph]{andothers}}
    {}}
\addbibresource{biblio.bib}

When I try to compile, my .bbl file gives me the "undefined control sequence" error for the commands : \datalist, \entry, \endentry

Here is an example of entry in my .bbl file (removing additional fields for clarity:

\begingroup
\makeatletter
\@ifundefined{ver@biblatex.sty}
  {\@latex@error
     {Missing 'biblatex' package}
     {The bibliography requires the 'biblatex' package.}
      \aftergroup\endinput}
  {}
\endgroup

\datalist[entry]{nty/global//global/global}
\preamble{%
\ifdefined\DeclarePrefChars\DeclarePrefChars{'’-}\else\fi
}

  \entry{KoshlandSevenPillarsLife2002}{article}{}
    \name{author}{1}{}{%
      {{hash=KDE}{%
         family={Koshland},
         familyi={K\bibinitperiod},
         given={Daniel\bibnamedelima E.},
         giveni={D\bibinitperiod\bibinitdelim E\bibinitperiod},
      }}%
    }
   \endentry

So as suggested by the.bbl file, the biblatex package seems to be missing. When I check MikteX (2.9.6515), it says Biblatex (3.10) is installed.

So my feeling is that there is some problem with MikteX/biblatex as my file compiles on my other computer (older version on MikteX) and on my friend's Mac but not on my same friend's PC.

Hopefully you can help me put the finger on the issue...

Thanks for your help (and hope my issue is not too dumb)

Edit: MWE (hope that will do) :

\documentclass{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{biblio.bib}

\begin{document}
test \cite{LeungStepwisevisualizationmembrane2014}
\end{document}

Same "undefined control sequence (\datalist, \entry, \endentry)

Edit 2 :

I have tried using biber backend : \usepackage[backend=biber,style=authoryear-icomp,sortlocale=de_DE,natbib=true, url=false,doi=true,eprint=false]{biblatex} \addbibresource{biblio.bib}

Same error in .bbl file

  • What happens if you delete the .bbl file and recompile from scratch? Can you show us a complete, yet minimal example that reproduces your problem, an MWE/MWEB? – moewe Feb 20 '18 at 18:38
  • You might also want to consider using Biber instead of BibTeX. Use backend=biber instead of backend=bibtex and run Biber: https://tex.stackexchange.com/q/154751/35864 – moewe Feb 20 '18 at 18:53
  • 1
    Did you delete the .bbl file and recompile from scratch? – moewe Feb 21 '18 at 10:17
  • I've tried deleting the .bbl (and all other files for that matters....) – Benjamin.B Feb 21 '18 at 10:23
  • Your .bbl looks suspicious, it is missing a \refsection command. \documentclass{article} \usepackage[backend=bibtex]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} test \cite{sigfridsson} \end{document} Works brilliantly for me, both with BibTeX and also with backend=biber. Can you show us the .bbl of \documentclass{article} \usepackage[backend=biber]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} test \cite{sigfridsson} \end{document} when processed with Biber? – moewe Feb 21 '18 at 10:25
  • Must I have the .bib file or is it some kind of example included in the package ? – Benjamin.B Feb 21 '18 at 10:30
  • biblatex-examples.bib should be present on your system if biblatex is installed. – moewe Feb 21 '18 at 10:35
  • If all I have to do is just copy your code and compile it, i get errors (no \citation commands, no \bibdata command, no \bibstyle command). The .bbl file generated is empty. – Benjamin.B Feb 21 '18 at 10:39
  • That means you are running BibTeX on the file, while you should be running Biber. See the link in my second comment. – moewe Feb 21 '18 at 10:41
  • So I followed the thing for tex studio, set Biber as my default thing, compiled, ran bibliography and compiled again. I get this error when doing the bibliography : ERROR - Error: Found biblatex control file version 3.3, expected version 3.4. This means that your biber (2.10) and biblatex (3.7) versions are incompatible. See compat matrix in biblatex or biber PDF documentation. – Benjamin.B Feb 21 '18 at 10:49
  • Aha. That means that biblatex 3.7 is found and not 3.10 as you said. MikTeX can install packages in multiple places. Run both 'MikTeX Update' and 'MikTeX Update (Admin)' at least twice to make sure all packages are updated. Do you have another or old TeX installation on your system? – moewe Feb 21 '18 at 10:51
  • Currently updating everything (I can only update as admin, the other telling me .exe is not located by OS) . I don't think I have an older version. I did try to copy my miktek from my computer that work on the other, it compiled once, then I guess some update went through and stopped compiling. About a month ago I spent 2 days trying all possible combinations of miktek/texstudio, reinstalled everything a good 15 times (different versions, at the root of my HHD), most of my trials probably being useless and without success. – Benjamin.B Feb 21 '18 at 11:01
  • Mhhh, that could be a problem. It is possible that the re-installs and simply copying over the MikTeX installation (I don't think that is supported or advised) have left remnants old files on your PC. In that case even an update might not help, you may have to overwrite the old files explicitly, or to delete them. Normally the newest version of all programmes involved should work (well together). It causes more distress and problems to mindlessly install multiple versions than it helps. – moewe Feb 21 '18 at 11:05
  • After update, still same error : Error: Found biblatex control file version 3.3, expected version 3.4. This means that your biber (2.10) and biblatex (3.7) versions are incompatible. See compat matrix in biblatex or biber PDF documentation. – Benjamin.B Feb 21 '18 at 11:07
  • So should I just like..; clean everything and restart from scratch ? – Benjamin.B Feb 21 '18 at 11:07
  • Well, if you can only run one of the two updaters that MikTeX comes with it looks indeed that your system is seriously messed up. The fact that older versions of biblatex seem to be present does not make the situation better. Before you delete anything type kpsewhich -all biblatex.sty into your command line and report the output. – moewe Feb 21 '18 at 11:13
  • Microsoft Windows [version 10.0.16299.248] (c) 2017 Microsoft Corporation. Tous droits réservés.

    C:\Users\Benjamin>kpsewhich -all biblatex.sty C:/Program Files/MiKTeX 2.9/tex/latex/biblatex/biblatex.sty

    – Benjamin.B Feb 21 '18 at 11:16
  • Mhhh, that one looked OK. Can you open C:/Program Files/MiKTeX 2.9/tex/latex/biblatex/biblatex.sty and check the version number at the top? What does biber --version output? Are you sure you ran the Updater twice and deleted all temporary files before you tried again? – moewe Feb 21 '18 at 11:18
  • Unless I'm confused with the file, I'd say version is 3.7. Biber version 2.10. I made sure i ran the updater again, as both admin and normal, twice each with temporary file removal in between each. Versions did not change after that. Still same error from TexStudio (which confirms version 3.7 and 2.10) – Benjamin.B Feb 21 '18 at 11:30
  • OK. Then your installation is indeed toast. If MikTeX reports Biblatex (3.10) is installed in the package manager, but the updater does not update 3.7 to 3.10 something is off. Where exactly did it say that biblatex 3.10 is installed? Was it in the Package Manager? Can you double-check? – moewe Feb 21 '18 at 11:33
  • MikteX, i look for biblatex, the only one from the list which has an installation date (so i guess the one installed), preperties version : 3.10 – Benjamin.B Feb 21 '18 at 11:39
  • Mhh. Very weird indeed. Normally I'm not one for re-installing. But in this case, you should probably try it. Make sure to remove everything that as to do with MikTeX. After the uninstall delete C:/Program Files/MiKTeX 2.9/ if it is still present. Search for all .sty, .bbx files on your PC and delete the directories containing them as well (if they are MikTeX installs). You do not only need to look for C:/Program Files//C:/Program Files x86/ etc. You also need to look in C:\Users\<Yourname>\AppData. – moewe Feb 21 '18 at 11:51
  • Yup. Have you made sure that absolutely no remnants of MikTeX or its config files remained on your PC? – moewe Feb 21 '18 at 12:22
  • Well as much as I could do. Looked for .sty and .bbx files, cleared temporary fillled, rebooted – Benjamin.B Feb 21 '18 at 12:34
  • OK, this is all you can do. After you installed your new MikTeX, make sure to run both Updaters twice. Then install the necessary packages (if they are not installed already, e.g. if you made a full install) using the Package manager. – moewe Feb 21 '18 at 12:36
  • Looks like it is working on the MWE. Got an error, but ran the bibliography, compiled again. Perfectly fine. NOw will it function with my document ? Is my biber code ok ? – Benjamin.B Feb 21 '18 at 12:36
  • If you change backend=bibtex to backend=biber what you have shown us should be fine (of course if you have something else I can't say anything about that). Just make sure to remove the temporary files. – moewe Feb 21 '18 at 12:38
  • Let me know if things worked for you once you tried to compile your real document. – moewe Feb 21 '18 at 13:15
  • Thanks for all of that ! I think I am now a step further. Not out of trouble yet.... So I think the biber thing works now ! But i do have another problem and now I'm facing it again, I realize this second problem is probably the reason why i fiddled so much with the versions/reinstallation. The bibliography gives me a few problem, but I think I can fix it myself, and then i have this error message : LaTeX error: "xparse/if-boolean" Invalid use \IfBooleanTF {-NoValue-} For immediate help type H . ... of the bacterial translocation machinery}. Any idea ? – Benjamin.B Feb 21 '18 at 13:16
  • Mhh, that should have nothing to do with biblatex (biblatex does not use xparse). Can you provide a full, yet small MWE that reproduces the problem? – moewe Feb 21 '18 at 13:17
  • Wait... It does compile and everything seems to work ! I mean i stillg et the error message, but I have my PDF with citations working ! – Benjamin.B Feb 21 '18 at 13:18
  • You should definitely fix the error. Even if a PDF is produced and even if it looks fine. Errors are not classified as errors for fun. They can be serious problems. – moewe Feb 21 '18 at 13:20
  • Sure sure ! Thanks for your help and concern !So I would gadly make a MWE. But i honnestly have no clue which part might be problematic.. – Benjamin.B Feb 21 '18 at 13:21
  • MastersDcotoralThesis.cls is an abomination that should be avoided at all costs. I think you are having the problem described in https://tex.stackexchange.com/q/383150/35864. – moewe Feb 21 '18 at 13:22
  • I believe at least that problem is fixed in version 1.6 of MastersDcotoralThesis.cls so you might want to update your version of MastersDcotoralThesis.cls. That can't be done via MikTeX, you must have downloaded it manually, I believe the original source is https://www.latextemplates.com/template/masters-doctoral-thesis – moewe Feb 21 '18 at 13:28
  • Thanks again for your help. I'm also pretty sure I tried the updated version, with mitigated success. I'll tried to fix the errors i get for now and come back to you if I can't find my way out ! Thanks a lot anyway, you've been of great help ! – Benjamin.B Feb 21 '18 at 13:36
  • 1
    Hey everything is working smoothly ! Thanks again for your help, now i just need to edit some individual references to make them work and I'm good to go ! Cheers ! – Benjamin.B Feb 21 '18 at 14:33
  • 4
    I'm voting to close this question as off-topic because it was caused by remnants of an older TeX installation and a corrupted TeX distribution. A clean re-install solved the issue. – moewe Feb 24 '18 at 14:00

0 Answers0