[OS X TeX] biber as backend & biblatex with defernumbers=true giving no numbers in bibliographies (TeXShop)

Herbert Schulz herbs at wideopenwest.com
Fri Jul 6 16:49:19 EDT 2018


> On Jul 6, 2018, at 3:18 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
> 
> 
> On 5 Jul2018, at 7:38 PM, Herbert Schulz <herbs at wideopenwest.com> wrote:
>> 
>>> On Jul 5, 2018, at 5:12 PM, Murray Eisenberg <murrayeisenberg at gmail.com> wrote:
>>> 
>>> I have a very complicated, book-length project with many files, using memoir documentclass, including two bibliographies, and using a custom biblatex style, that uses: 
>>> 
>>> \RequirePackage[backend=biber,%
>>>   bibstyle=mybooknumeric,
>>>   citestyle=numeric,
>>>   dashed=true,
>>>   defernumbers=true,
>>>   urldate=iso,date=iso,seconds=true]%
>>> {biblatex}
>>> 
>>> 
>>> Since I switched from backend=bibtex to backend=biber, all the numbers in the bibliographies themselves are printed as 0, as are all citations of those entries. (This still does not happen with backend=bibtex.)
>>> 
>>> I’ve tried, without success, to reproduce this for something simple — a main .tex file and the two .bib files — that still uses the entirety of my preamble and the same biblatex style files and biblatex.cfg, but I don’t get the all-0’s with that!
>>> 
>>> The issue has been discussed on tex.stackexchange (https://tex.stackexchange.com/questions/299336/reference-0-with-defernumbers-true), but the alleged remedy given there of adding opetion sorting=non for biblatex makes no difference for me.
>>> 
>>> Could there be some adjustment needed in config files for TeXShop itself, to ensure correct runs of biber?
>> 
>> Howdy,
>> 
>> Certainly NOT for TeXShop. How are you typesetting the document? The latexmk engines run of biber automatically; if not I assume you are using the directive
>> 
>> % !BIB program = biber
>> 
>> so that Typeset->BibTeX (Shft-Cmd-B) will use biber.
>> 
>> Also make sure you clean all the ``aux'' files.
>> 
>> Finally, if it isn't happening with the same preamble and a sample document there is something wrong in the document or the .bib files. Have you carefully looked over the log files (both for the (lua/xe/pdf)latex [.log] and biber [.blg] runs).
> 
> (1) I presume I do NOT need to include any of the directives 
> 
>   % !TeX TS-program = pdflatexmk
>   % !BIB TS-program = biber
>   % !BIB program = biber
> 
> so long as I am using the pdflatexmk engine for typesetting.

Howdy,

You still want to use the `% !TeX TS-program = pdflatexmk' directive but don't need either of the two, equivalent, `% !BIB' directives.

The `% !BIB' directive tells the Typeset->BibTeX menu command what it should execute (with bibtex the default) while the latexmk program, used by all of the latexmk based engines, automatically determines what it should run.

Note: `TS-program' and `program' do the same thing. Historically TeXShop used `TS-program' while TeXworks used `program' but accepted `TS-program' so Dick Koch added `program' to what it accepts.


> 
> (2) I think I’ve found the source of the problem — and the difference between the small test file and the actual project: In the actual project files, I have some as-yet dummy, defective, citations of the form 
> 
>      \textcite{WHAT}
> 
> that do generate warnings in the log. That’s what seems to cause all the bibliographies’ entries to be numbered 0. As soon as I remove those dummy citations, the numbering is normal.
> 
> I do find it odd that bibtex would mess up the actual bibliography numbering for that reason, rather than just not being able to properly typeset the \textcite’s in the body.
> 
> And when I switch back from option backend=biber to backend=bibtex for biblatex, and with those defective \textcite’s still present, I do NOT get the all-0s numbering error.
> 
> So biber is much fussier than bibtex!

No doubt about it, biber is definitely touchier about that sort of thing as well as the formatting of .bib files.

Glad you found the problem.

> 
> (3) While digging around trying to pinpoint the source of the trouble, I noticed that the TeXShop pdflatexmk.engine I was using was an older version from 2017, and it includes the line
> 
>   "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -e "\$TSUserCompileOptions=q/${2}/" -r "${TSBIN}/pdflatexmkrc" ${localrc} "$1”
> 
> whereas the current version of that engine has instead the line:
> 
>   "${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -e "\$TSUserCompileOptions='${2}'" -r "${TSBIN}/pdflatexmkrc" ${localrc} "$1"
> 
> What is the meaning of that change?

The q/.../ is one of the ways Perl detects quoted material. The second version uses '...' which is also accepted by Perl for quoted material. 

If you've never used the new latexmk based engines with the 

% !TEX parameter = --shell-escape

directive you've never executed that line in the engine file. That directive tells the latexmk based engines ((pdf/xe/lua)latexmk) to execute the typesetting engine of choice using --shell-escape so there is no need for a special engine.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)




More information about the MacOSX-TeX mailing list