biblatex-ext-oa 无法检索有关开放访问状态的信息

biblatex-ext-oa 无法检索有关开放访问状态的信息

考虑一下这个 MWE

\documentclass{scrartcl}


\begin{filecontents*}[overwrite]{testbib.bib}
@Article{wilkinson_fair_2016,
  Author          = {Wilkinson, Mark D. and others},
  Title           = {The {FAIR} Guiding Principles for scientific data
                    management and stewardship},
  JournalTitle    = {Scientific Data},
  Date            = {2016-12},
  DOI             = {10.1038/sdata.2016.18},
  Keywords        = {{FAIR}},
  langid          = {english},
  Number          = {1},
  Pages           = {160018},
  ShortJournal    = {Sci Data},
  URLDate         = {2021-05-31},
  Volume          = {3}
}
\end{filecontents*}

% using quotes esp. for biblatex.
\usepackage{csquotes}
\usepackage[%
backend=biber,
  style=ext-authoryear-ecomp,
  autocite=inline,
  defernumbers=true, % reset numbered bibliography for each chapter
  giveninits=true, % abbreviate the first names
  maxcitenames=1,
  mincitenames=1,
  maxbibnames=99, % show all authors of an bib entry
  dashed=false,
  ]{biblatex}
  % ==== open access publications
  % This allows us to automatically detect if a publication is
  % available open access (does not work always.)
  % In case you need to manually set the open access status
  % use `  options    = {openaccess=auto},`.
  \usepackage[
  doiapi=true,
  enable=true,
  symbolpackage=tikz,
  symbol=oanet]{biblatex-ext-oa}
% vv added
\ExecuteBibliographyOptions{openaccess=doiapi}
\SetDOIAPIMail{[email protected]}% <- this MUST be set for doiapi
% ^^ added

\addbibresource{testbib.bib}

  \begin{document}
  \nocite{*}
  \printbibliography
  \end{document}

我收到此错误:

(/usr/local/texlive/2023/texmf-dist/tex/latex/biblatex-ext/biblatex-ext-oa-doia
pi.sty.../2023/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua:41: module 's
ocket.http' not found:
    no field package.preload['socket.http']
    [kpse lua searcher] file not found: 'socket.http'
stack traceback:
    [C]: in function 'require'
    .../2023/texmf-dist/tex/latex/biblatex-ext/blxextdoiapi.lua:41: in main chunk
    [C]: in function 'require'
    [\directlua]:1: in main chunk.
l.40 ...tlua{blxextdoiapi = require("blxextdoiapi")}

答案1

正如所讨论的https://github.com/moewew/biblatex-ext/issues/42新版本的 LuaLaTeX 需要使用--socket启用套接字库(我们需要下载数据)的选项来调用,因为https://tug.org/~mseven/luatex.html#luasocket. 因此该文件需要使用

lualatex --socket mwe
biber mwe
lualatex --socket mwe
lualatex --socket mwe

相关内容