0

I've looked over possible methods but the problem is still unsolved. I followed the instruction that overleaf provides (but using VS code), I think key commands are all added:

% !TEX program = xelatex
% !TeX TXS-program:bibliography = txs:///biber
\documentclass{article}
\usepackage[backend=biber,style=ieee,sorting=none]{biblatex}
\addbibresource{cite.bib}

Note that the second line is suggested adding. [see 1]
I can \cite the paper stored in the "cite.bib" file, but the warning keeps showing:

Please (re)run Biber on the file:
(biblatex) my paper
(biblatex) and rerun LaTeX afterwards.

Citation 'casetta2013generalized' on page 1 undefined.

well, it surely can read the .bib since VS code shows a little window of reference info when cursor moves to the \cite{} command line. I can't figure out what's wrong, so hope someone can help me out, thanks a lot!
[1] https://www.reddit.com/r/LaTeX/comments/pvscws/biblatex_error_in_vs_code/

  • I am sure there's a way to do this automatically, but does it work if you actually run Biber manually as suggested? – Ingmar Jul 31 '23 at 08:01
  • @Ingmar hi, but how to do "run biber" in VS code? I even don't know what "Biber" is. :( – 106207436 Jul 31 '23 at 10:51
  • 2
    https://tex.stackexchange.com/q/63852/35864 explains what Biber is and does. https://tex.stackexchange.com/q/154751/35864 explains how you can make your editor run Biber for you. – moewe Jul 31 '23 at 11:14
  • @moewe according to links you provided, I found I don't have .blg file, but they don't talk about this much. VS code compiles Latex>Bibtex>Latex>latex every time, so hmm I still have no solution. But thank you. – 106207436 Aug 01 '23 at 17:58
  • If you really don't have a .blg file, this usually means that Biber wasn't run. (Or you're using some feature of your editor that cleans temporary files, which is usually a bad idea.) If Biber was run correctly, there will be a .blg file. If you configured your editor as in the link I gave and asked your editor to run Biber, you should get a .blg file. Try running LaTeX and Biber from the command line to see if that works. – moewe Aug 01 '23 at 18:26
  • @moewe I asked AI, it said that xelatex may not be compatible with biber. Then I changed to lualatex but problems still present. – 106207436 Aug 02 '23 at 09:28
  • Well on that count AI was wrong. XeLaTeX and Biber go together perfectly well. Can you try running XeLaTeX and Biber from the command line instead of via your editor? – moewe Aug 02 '23 at 10:25
  • @moewe ok, I turned back to xelatex and typed biber my paper.tex in VS code's terminal, then it said: `xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    biber: extracting arm64 binary with lipo failed (wstatus=256)`

    – 106207436 Aug 02 '23 at 13:50
  • Then I tried bibtex my paper.tex, it said:

    `This is BibTeX, Version 0.99d (TeX Live 2023)

    The top-level auxiliary file: VS/FSI/Hamilton2023.aux

    I found no \citation commands---while reading file VS/FSI/Hamilton2023.aux I found no \bibdata command---while reading file VS/FSI/Hamilton2023.aux I found no \bibstyle command---while reading file VS/FSI/Hamilton2023.aux`

    – 106207436 Aug 02 '23 at 13:55
  • On Mac you may have to install Xcode command line tools to get Biber to run. I don't own a Mac, but several sources (e.g. https://github.com/plk/biber/issues/448#issuecomment-1577101437) suggest that you need to say at least something like xcode-select --install in a terminal. Running BibTeX instead of Biber will not do any good to your document since it requires Biber. – moewe Aug 02 '23 at 19:54

0 Answers0