How to use biber and biblatex in TeXmacs?

I maintain external bibliographic databases which conform to biblatex entry specifications. I use these because of bibliographic needs that go beyond bibtex v0.99d. In LaTeX using biber + biblatex these references work and the bibliography ‘compile’ correctly.

In TeXmacs however, using (its) bibtex only a subset of these entries is correctly processed, i.e. the ones that conform to the bibtex entry format.

To get the this solved, I tried the following:

  • Activating biber in via Edit–>Prefereces–>Bibtex–>command–>bibtex and then updating all (shift-⌘ on macOS) results in the following error message:

error_01

  • The logfile ‘temp.blg’ is in .TeXmacs/system/bib. But the file
    ‘temp.bcf’ is not there/not created.
  • Activating biblatex the way decribed above yields to this error message:

error_02

an error message that I do not get when ‘compiling’ the bibliographies in Latex.

So, what then do I need to do to get biblatex conforming databases correctly read-out in TeXmacs.

Any help/suggestion appreciated.

Cheers,
Tilda

Let me check whether I get the same behaviour and maybe we can report it on the bug tracker. I do not expect to be able to figure out the reason of the malfunctioning.

@pireddag Let me know if you can reproduce the behaviour and I will then file a bug report.

Could you please give me an example of a bibliography entry that does not conform to the bibtex format? So I will check with entries that have a chance of causing the error.

biber simply does not work (if I remember correctly, biber has never worked), e.g. with the following tm file

<TeXmacs|2.1.2>

<style|generic>

<\body>
  We look at <cite|test>.

  <\bibliography|bib|alpha|/tmp/test.bib>
    \;
  </bibliography>
</body>

<\initial>
  <\collection>
    <associate|page-medium|paper>
  </collection>
</initial>

<\references>
  <\collection>
    <associate|auto-1|<tuple|?|1>>
  </collection>
</references>

<\auxiliary>
  <\collection>
    <\associate|bib>
      test
    </associate>
    <\associate|toc>
      <vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|Bibliography>
      <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
      <no-break><pageref|auto-1><vspace|0.5fn>
    </associate>
  </collection>
</auxiliary>

and the bib file saved at /tmp/test.bib:

@Article{test,
  author        = {White, David and Yau, Donald},
  journal       = {Math. Scand.},
  title         = {{Arrow Categories of Monoidal Model Categories}},
  year          = {2019},
  issn          = {0025-5521},
  month         = mar,
  number        = {2},
  pages         = {185--198},
  volume        = {125},
  abstract      = {We prove that the arrow category of a monoidal model category, equipped         with the pushout product monoidal structure and the projective         model structure, is a monoidal model category. This answers a         question posed by Mark Hovey, and has the important consequence         that it allows for the consideration of a monoidal product in         cubical homotopy theory. As illustrations we include numerous         examples of non-cofibrantly generated monoidal model categories,         including chain complexes, small categories, topological spaces,         and pro-categories.},
  archiveprefix = {arXiv},
  doi           = {10.7146/math.scand.a-114968},
  eid           = {arXiv:1703.05359},
  eprint        = {1703.05359},
  fjournal      = {Mathematica Scandinavica},
  keywords      = {Mathematics - Algebraic Topology, Mathematics - Algebraic Geometry, Mathematics - Category Theory, Mathematics - K-Theory and Homology},
  mrclass       = {18D10 (18A30 55U35)},
  mrnumber      = {4031046},
  mrreviewer    = {Karol Szumi\l o},
  primaryclass  = {math.AT},
}

For me it works with your entry, the following tm file

<TeXmacs|2.1.1>

<style|generic>

<\body>
  <cite|test>

  <\bibliography|bib|tm-plain|test_biber>
    <\bib-list|1>
      <bibitem*|1><label|bib-test>David White<localize| and >Donald Yau.
      <newblock>Arrow Categories of Monoidal Model Categories.
      <newblock><with|font-shape|italic|Math. Scand.>, 125(2):185\U198, mar
      2019.<newblock>
    </bib-list>
  </bibliography>
</body>

<\initial>
  <\collection>
    <associate|page-medium|paper>
  </collection>
</initial>

<\references>
  <\collection>
    <associate|auto-1|<tuple|?|1>>
    <associate|bib-test|<tuple|1|1>>
  </collection>
</references>

<\auxiliary>
  <\collection>
    <\associate|bib>
      test
    </associate>
    <\associate|toc>
      <vspace*|1fn><with|font-series|<quote|bold>|math-font-series|<quote|bold>|Bibliography>
      <datoms|<macro|x|<repeat|<arg|x>|<with|font-series|medium|<with|font-size|1|<space|0.2fn>.<space|0.2fn>>>>>|<htab|5mm>>
      <no-break><pageref|auto-1><vspace|0.5fn>
    </associate>
  </collection>
</auxiliary>

and the bib file saved in the same directory as the tm file.

No, if you modify it to tm-plain, then it is TeXmacs which analyzes the bib file (this is what the prefix tm- means), not biber.

For example, this scheme code is invoked for tm-plain.

Ideally, TeXmacs performs perfect analysis. However, currently TeXmacs is not compatible with every extension defined in the biblatex standard. It would also be laborious to implement everything in biblatex. This is why one might want to use the biber engine to proceed the bibliography.

1 Like

I had not understood it. With bibliography style alpha I also get the Cannot find temp.bcf error. Then we (= @Tilda :wink: ) could report this in the bug tracker, if it is not already there.

Is there any reason to expect biber to work out of the box? It seems to use a different intermediate file format (.bcf), so I would not call this a bug per se.

@jeroen @pireddag, if I understand the (pdf)LaTeX/biblatex/biber run correctly, the .bcf-file is produced by (pdf)LaTeX and then processed by biber which return produces both a log file (.blg) and a .bbl-file which is needed for the next two pdfLaTex/biblatex runs.

So this might indeed not be a bug but the result of the missing pdfLaTeX/biblatex “preprocessing”.

… and to keep the data bases external without having to maintain several versions of them spread across various places on your computer system. Yet, I wonder if a call to biber is sufficient.

biber is in the drop list PreferencesConvertBibTeX. The simplest way to “fix” this bug is to remove the option biber from that list, but I suppose that this is an unsatisfactory fix.

There’s no such thing on my TeXmacs.

I did not check for this menu item, but the menu items that appear in the two different presentations of the Preferences menu (Complex actions “through the menus” or “through popup windows”) have a few differences. Maybe it is that?

I can see that option in the Convert menu.

Looking at the corresponding code (bibtex_run in src/Plugins/Bibtex/bibtex.cpp), TeXmacs only generates an .aux file, no .bcf file, while biber's man page says that

Creates "file.bbl" using control file "file.bcf"

So, it seems to me that, unless someone writes code to generate the .bcf file that biber wants, this is not going to work.

Yes, that was it. Thanks for reminding me that there’s an alternative to Preferences –>Complex Actions–>Through the menus.

@jeroen Thanks for checking in the source file.

it seems to me that, unless someone writes code to generate the .bcf file that biber wants, this is not going to work.

It’s a pity that I neither know enough about biber internals nor any C++. Suppose that means having to live with the shortcomings of bibtex. :disappointed:

Out of curiosity, what features of biber/biblatex do you need?

I verified by running pdfLaTeX on a .tex file that the .bcf file is generated by pdfLaTeX.
Maybe one could work around the “missing .bcf file” error in this way:

  1. Obtain a .bcf file with pdfLaTeX using the settings one desires
  2. Place it in the system/bib folder

One also needs to place the references section by section (just found them in the .bcf file), so one needs to export to LaTeX the TeXmacs document.

It looks like a lot of work and I did not yet try it :wink:

I did so, activated biber in TeXmacs, and then ran Document–>Update–>All to get an empty bibliography. It seems to me that the temp.bcf file produced by pdfLaTeX is not read out correctly by biber when called from within TeXmacs. Maybe this is because of:

  • not calling the correct biblatex style file (i.e. biblatex-chicago) from within the the .tm file

  • and having used a bibtex style file instead.

I will be checking on that in a fortnight or so, when I have a bit more time at hand.

I’m afraid, I did not quite understand why you need to be doing all that.

Cheers,
Tilda

@jeroen The references I need to compile have to follow the Chicago Manual of Style, 17th ed.

Sections 4.1 and 4.2 in the manual for the biblatex-chicago package gives you an idea of some of the entry types and fields needed (https://ctan.math.washington.edu/tex-archive/macros/latex/contrib/biblatex-contrib/biblatex-chicago/doc/biblatex-chicago.pdf)

If you’re still curious, I can upload some templates that I use.

Cheers,
Tilda

Perhaps I did not explain myself well, let me try again. You have to run pdfLaTeX on a .tex file that contains the references as well, as the .bcf file contains info about the references as well. So you can’t generate a .bcf file once and apply it to different documents.

I thought maybe TeXmacs cannot find the bibliographic information in the .bbl file, perhaps it does not look inside the \refsection commands that appear inside the .bbl.