2

After having updated Biber from 1.5 version to 1.8, while the build time, I'm getting errors on the \begin{document} of my latex code telling that File ended while scanning use of \field.. I've tried to compile the same full code on this site, and this have worked.

Knowing that I'm on Windows 7 SP1 and using MiKTeX 2.9, how do I to fix this please?

I've tried to use Update (Admin) of MiKTeX for updates, but, after doing this I still getting the same errors.

Full Log file.

Minimal Log file related to the below .tex code.

.tex file

\documentclass[12pt,english,french]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel} \usepackage{csquotes}% recommended in output (biblatex) 
\usepackage[backend=biber, style=alphabetic]{biblatex} 
\addbibresource{bibli.bib} 
\usepackage{titletoc}

\begin{document}
\nocite{*}
\printbibliography
\addcontentsline{toc}{chapter}{Bibliographie}
\end{document}

small .bib file

@online{msdn2,
    label    = {MSDN2},
    title    = {Comparatif entre C\# et Visual Basic .NET},
    author   = {Microsoft},
    date     = {2014-01-01},
    url      = {http://support.microsoft.com/kb/308470},
    urldate  = {2014-04-12}
}
doncherry
  • 54,637
dgs
  • 1,637
  • Could you post a .tex file with an accompanying .bib file? Any .log or output, would be also useful to us debugging your problem. I remember that at some point Biber changed quite dramatically, so please post a MWE. – aignas Apr 14 '14 at 14:45
  • @gns-ank, I've updated my post – dgs Apr 14 '14 at 14:58
  • 2
    Well, even though the example is not quite minimal (certainly a lot of the packages and redefinitions could be removed), it works on my computer (MikTeX 2.9, newest biblatex, Biber [v 2.8/1.8 respectively]). Please be more specific on what error message you get and also post the (relevant passages of your) .log and .blg files. – moewe Apr 14 '14 at 15:42
  • 2
    As it already happpened to me I guess it's with the binary cache that Biber creates, getting corrupted on an update. The solution is to delete the cache directory, that is somewhere in your personal directory; on my WinXP system it is in C:\Documents and Settings\Bernard\Local Settings\Temp\par-4265726e617264. The important thing to find (and delete) is \Temp\par-4265726e617264.

    You will find many details on this thread.

    – Bernard Apr 14 '14 at 16:00
  • Of course it goes without saying that the long sequence of figures and letter that follows par- may vary. – Bernard Apr 14 '14 at 16:11
  • @Bernard, that wouldn't work :/ it still the same! – dgs Apr 14 '14 at 16:21
  • Did you try removing the .bbl file and recreating it running Biber? – egreg Apr 14 '14 at 17:54
  • @egreg, yes, I've tried to remove all of the output files. – dgs Apr 14 '14 at 17:55
  • Strange… I would have bet my life on it. Incidentally, on Win 7, the directory is in C:\Users\User_Name\AppData\Local\Temp\par-4265726e617264. – Bernard Apr 14 '14 at 19:25
  • @Bernard, it still the same. Nothing have changed :/ – dgs Apr 15 '14 at 12:46
  • @dgs: The only thing to do I can see in such a case is to delete again the binary cache directory, uninstall biber with the MiKTeX package manager, then re-install it. – Bernard Apr 15 '14 at 12:57
  • @Bernard, I've did that but I still getting the same errors – dgs Apr 15 '14 at 13:38
  • @Bernard, would you please link me a good version of MiKTeX, I've installed the 64bits version. it's maybe due to that. – dgs Apr 15 '14 at 13:54
  • 1
    @dgs: I think I understand now. MiKTeX doesn't have a 64 bit version of biber. Here is what I did, as I also have the 64-bit version: I went on CTAN to MiKTeX packages repository and downloaded miktex-biber-bin.tar.lzma (that's a 32-bit version).I uncompressed it, obtaining a texmf directory. Then I moved the contents of this directory (not the directory itself) in my Local TeXMF directory, as is. Next you'll have to refresh the FNDB as usual, and maybe install a perl distribution (I have Strawberry Perl). That's about all. – Bernard Apr 15 '14 at 14:11
  • @Bernard, what have you installed as biber version? – dgs Apr 15 '14 at 15:42
  • @dgs: the 32-bit version as there's no other. – Bernard Apr 15 '14 at 15:59
  • 1.8 biber version? – dgs Apr 15 '14 at 16:12
  • Yes. Look at @moewe's comment above. If there is only one biber for MiKTeX, moewe must be using that (32bit) version and says there that it is 1.8. (2.8 is the biblatex version which works with biber 1.8.) – cfr Apr 15 '14 at 21:28
  • @cfr, but how to upgrade biblatex? – dgs Apr 15 '14 at 22:09
  • Doesn't MiKTeX include biblatex at least?! The 32/64 bit thing is irrelevant here so I'd assume that having up-to-date MiKTeX would automatically take care of this. – cfr Apr 15 '14 at 22:17
  • I've 2.8a biblatex's version installed, but updating Biber hasn't solved my problem. – dgs Apr 15 '14 at 22:19
  • I've updated my post linking the minimal log file. Can you please help to catch from where is coming the error? – dgs Apr 15 '14 at 23:31
  • @dgs You do not need to write your comments more than one time, especially where interested people can see your edit. – Speravir Apr 15 '14 at 23:32
  • @dgs: I must second moewe: Your code is far from being a minimal working example (MWE), in fact I see some issues at least with url and hyperref, but nonetheless I also do not have any problem with compiling your code (note, that I have 32bit MiKTeX on a 64bit Windows 7). – Speravir Apr 15 '14 at 23:39
  • @Speravir, have you found any ambigious line into the minimal posted log file? – dgs Apr 15 '14 at 23:40
  • @dgs Your biblatex is up to date. 2.8a is the correct version. When you run biber what version does it now report? – cfr Apr 15 '14 at 23:40
  • @cfr, 1.8 version. – dgs Apr 15 '14 at 23:41
  • @dgs: I just was going to comment that there is no other problem than that like stated you should run the compiling a second time. You must, of course have executed biber after first compiling run. – Speravir Apr 15 '14 at 23:43
  • @Speravir, I do. I'm compiling the .tex file, then using biber command, and finally the .tex file (only at this time, I get 44 errors). – dgs Apr 15 '14 at 23:44
  • @dgs I think it would be good to use a completely minimal example, with a known good .bib file for testing. I've posted one below. Please try compiling it and post any errors in your question. Note that it is better to post logs etc. to a pastebin site so that people do not have to download an unknown entity to help you. (I won't do this basically - I doubt I'm alone in this.) With a really minimal case, though, it should be easy to post the errors in your question. – cfr Apr 15 '14 at 23:53
  • @cfr, I've just posted a minimal code. – dgs Apr 16 '14 at 00:02
  • 1
    @dgs: You should use a really minimal file to see if biber runs on your system or not. In your preamble the only necessary lines are the following: \usepackage{babel} \usepackage{csquotes}% recommended in output (biblatex) \usepackage[backend=biber, style=alphabetic]{biblatex} and \addbibresource{otherbibli.bib} \usepackage{titletoc}. Comment out the rest of the preamble, compile and see what happens (hope you have a good editor that lets you comment out selected portions of text with a single click, or make a copy and delete the spurious lines). – Bernard Apr 16 '14 at 00:03
  • @dgs: That one is really minimal, and it runs fine on my system. Does it now on yours? – Bernard Apr 16 '14 at 00:09
  • @Bernard, No I'm now getting 118 errors. – dgs Apr 16 '14 at 00:10
  • @Bernard, Do I post the new log file? – dgs Apr 16 '14 at 00:10
  • @dgs What is the first error you get? – cfr Apr 16 '14 at 00:11
  • @cfr, File ended while scanning use of \field. on \begin{document} – dgs Apr 16 '14 at 00:13
  • Also after the edit with your real minimal code: No problem on my side. – Speravir Apr 16 '14 at 00:13
  • @dgs: OK, but first change your inputenc to utf8, not cp1250, delete your auxiliary files ansd re-compile. Utf8 is the only encoding that is understood by all OSs and all modern editors use it by default. I'd like to see the .blg too. – Bernard Apr 16 '14 at 00:15
  • @Bernard, using utf8 I get errors on this kind of words Minist\\ere`. – dgs Apr 16 '14 at 00:22
  • @dgs Where is Minist\\ere` in your example? – cfr Apr 16 '14 at 00:25
  • @cfr, it's in my main code. – dgs Apr 16 '14 at 00:28
  • @dgs: Why don't you type directly Ministère? – Bernard Apr 16 '14 at 00:38
  • @Bernard, because doing that I get Package inputenc Error:Unicde char \u8:ère not set up for use with LaTeX. – dgs Apr 16 '14 at 00:41
  • @dgs But the whole point is to see if you can compile the minimal example without errors. The fact that you get errors when you compile your main code is, at this stage, simply irrelevant. I don't mean it isn't a problem. But it is not the problem we are concerned with right now. We cannot help if you will not run the tests because we do not have access to your computer. We have to rely on you to run those tests. Yet you keep posting errors from your main document when we haven't even figured out if you can compile a minimal one. – cfr Apr 16 '14 at 00:42
  • @dgs You never bothered to say whether you could compile the minimal document I posted. That would tell us whether there is a basic problem with your set up or a problem with your code. Right now we know absolutely nothing. – cfr Apr 16 '14 at 00:44
  • 1
    @cfr, Oh sorry! With the minimal code, I haven't get any error. but I was testing it on my main code here. – dgs Apr 16 '14 at 00:45
  • 1
    I've executed the minimal code using utf8 as suggested @Bernard and that works without any output error. But testing this on the main code, leads output errors. – dgs Apr 16 '14 at 00:47
  • 2
    @dgs OK! Good! Thank you! Now we know that biber is working OK. So we know it is installed correctly, it matches your biblatex version and that everything is being found OK at compile time. Now we know the problem is somewhere in your code. That is tremendously helpful. (Though I realise that you want your code to work but we are trying to narrow down the problem so ruling stuff out is progress.) – cfr Apr 16 '14 at 00:48
  • @cfr, no problem. Thank you too for your time. Do you need now me to repost the full premble code? – dgs Apr 16 '14 at 00:50
  • I could compile your minimal body file(just the bibliography) with the whole preamble, jsut changing the input encoding. Are you sure you need every package loaded in the preamble? – Bernard Apr 16 '14 at 00:53
  • @Bernard, yes I need them. But, how to fix utf8 to work on my main code (report) ? – dgs Apr 16 '14 at 00:55
  • @dgs: It depends. What was the initial encoding? If you know it you may try to convert (I think editors like TeXmaker or scite or notepad++ can do that), but there probably will remain residual badly converted characters, often due to the fact that there are several encodings messed up in the document. In such a case you will usually be able to see to which character it corresponds, and then just do a search and replace for that character. It will take a certain time but it ceratinly is worth the time. – Bernard Apr 16 '14 at 01:10
  • @Bernard, it was cp1250. I have also tried to load utf8x on the main project but this led me to much output errors, so I haven't used it. As editor text, I'm using TexnicCenter. – dgs Apr 16 '14 at 01:13
  • I don't if TeXnic Center can do that. I know TeXmaker can. My suggestion is to install it, at least. for the conversion. If you open your main file with it, it will warn that it is not utf8 encoded, but cp 1250, and ask you if you want to load the file with this encoding. Of course, say yes. Then go to the tools menu; the last item of this menu is Convert to Unicode. – Bernard Apr 16 '14 at 01:31
  • @Bernard, you may want to make an answer, this have finally worked. Thank you very much !!! – dgs Apr 16 '14 at 02:16
  • @cfr, THANK YOU VERY MUCH !!! This has finally worked :DD – dgs Apr 16 '14 at 02:17
  • @moewe, THANK YOU VERY MUCH !!! This has finally worked :DD – dgs Apr 16 '14 at 02:17
  • @gns-ank, THANK YOU VERY MUCH !!! This has finally worked :DD – dgs Apr 16 '14 at 02:17
  • @Speravir, THANK YOU VERY MUCH !!! This has finally worked :DD – dgs Apr 16 '14 at 02:18
  • 1
    ;) [I figure at this point one more comment can't hurt... can it?] – cfr Apr 16 '14 at 02:23
  • @dgs: I'm glad it worked… I don't know what answer I could make, as there was no specific question, except you couldn't compile. – Bernard Apr 16 '14 at 02:34
  • @dgs: Would be good if you would write a short answer yourself about the reason and the cure. See also last part of my answer work on documents on Linux and Windows (umlaut, newline) beginning from “Converting between ending formats” or more general How do I change the encoding of my files?. – Speravir Apr 16 '14 at 02:36
  • @dgs: And you should edit title and question to your real problem (with a short note that you’ve rewritten this). – Speravir Apr 16 '14 at 02:43

2 Answers2

2

As the problem actually seems linked to the fact that MiKTeX 64-bit doesn't include biber, which is a 32-bit application, you should take a look at the answers to this question. Don't forget to create a Local TeXMF root if you don't already have one.

Added on 09/20/2015:

Since last summer, MiKTeX 64bits repositories have a miktex-bin-biber-x64.tar.lzma file, so the above-mentioned answers are obsolete. Install biber through MiKTeX Package Manager.

Bernard
  • 271,350
  • Please post this as a comment and not as an answer. If this solves the OP's problem, you can then post it as an answer. But from what we know now it might well be an entirely different problem. – moewe Apr 14 '14 at 15:59
  • @Bernard, I've downloaded and installed the 32-bits version of MiKTeX which is placed at the first place in the link. And downloaded thr 1.7 biber version and pasted the exe file under C:/../miktex/bin/ but this wouldn't work. I've also tried the 1.8 version, but it still the same. – dgs Apr 15 '14 at 16:44
  • Did you refresh the FNDB? Did you put it in a local texmf root? And did you declare this local root via MiKTeX Settings( Roots tab)? – Bernard Apr 15 '14 at 17:11
  • 1
    what's the mean of FNDB ? – dgs Apr 15 '14 at 17:18
  • Yes, I've putted the biber.exe file under C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\. – dgs Apr 15 '14 at 17:20
  • File Names Data Base. MiKTeX uses this database to find all sorts of files (executable, .config, .sty, .cls, &c.) So if biber is not in the database, it won't be found. Don't forget you also have to declare the new root. I think you'd better name it differently because that root is the one used by the 32-bit version of MiKTeX. It might be confusional. – Bernard Apr 15 '14 at 17:36
  • @dgs: 1) When you open the MiKTeX settings you will see under the General tab a button “Refresh FNDB”. 2) Please, do not install into main MiKTeX installation, cf. Install Biber in MiKTeX on a 64-bit version of Windows and linked answers and comments. – Speravir Apr 15 '14 at 22:27
  • @Speravir, but I can not open miktex-biber-bin.tar.lzma from Windows 7 ! – dgs Apr 15 '14 at 22:29
  • When I paste the biber.exe under c:/../miktex/bin/ and run the biber command, biber tells its version at compile time. And that worked (its update), why this can't be solve the problem ? – dgs Apr 15 '14 at 22:31
  • @dgs: You need a file archiver that can handle LZMA compressed files, e.g. 7-Zip or PeaZip. Why you shouldn’t install in main installation: See Purpose of local texmf trees. – Speravir Apr 15 '14 at 22:32
  • @Bernard, please how to declare this local root via MiKTeX Settings( Roots tab)? – dgs Apr 15 '14 at 22:40
  • @Speravir, please how to declare this local root via MiKTeX Settings( Roots tab)? – dgs Apr 15 '14 at 22:41
  • @dgs: Well, it’s alreay linked in questions and answer we gave you as hint, but see Create a local texmf tree in MiKTeX. – Speravir Apr 15 '14 at 22:51
  • @Speravir, thank you very much! I've just installed biber's 1.2 version like you've described, after compiling my report I haven't got any error, but when I've displayed the PDF file, I've found the bibliography. After that, I've upgraded biber to 1.8 using MiKTeX package manager and compiled the report again and I've got the same errors. – dgs Apr 15 '14 at 22:55
  • @dgs: Well there are quite a number of errors that don't seem to have anything to do with biber or biblatex. You should try to run a minimalistic file, just containing a call to a simple .bib file to see if biber works ot not. – Bernard Apr 15 '14 at 23:20
  • @Bernard, I've updated my post linking the minimal log file. – dgs Apr 15 '14 at 23:31
  • You might want to mention that as of now there is a version of Biber for 64-bit MikTeX, so people don't get confused. – moewe Sep 20 '15 at 06:46
1

Upgrading Biber have implied that I must encode my report on UTF8.

Thanks to @Bernard, @cfr, @Speravir, @moewe and @gns_ank.

dgs
  • 1,637