Biblatex:将 .bbl 复制到 .tex

Biblatex:将 .bbl 复制到 .tex

我正在尝试将 .bib 文件的内容复制到 .tex 文件中以供最终提交。下面,我使用以下建议Biblatex:向期刊投稿 但这不起作用。我还尝试复制 .bbl 文件,这在使用 bibtex 时有效,但在 biblatex 中无效。

有人可以帮忙吗?

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Yemini2021,
author = {Yemini, Eviatar and Lin, Albert and Nejatbakhsh, Amin and Varol, Erdem and Sun, Ruoxi and Mena, Gonzalo E. and Samuel, Aravinthan D.T. and Paninski, Liam and Venkatachalam, Vivek and Hobert, Oliver},
doi = {https://doi.org/10.1016/j.cell.2020.12.012},
journal = {Cell},
pages = {272--288.e11},
title = {{NeuroPAL: A multicolor atlas for whole-brain neuronal identification in C. elegans}},
volume = {184},
year = {2021},
addendum = {\\{\color{black}*An experimental approach based on multicolor labeling that enables the matching of cellular identity between structural and functional connectomes.}}
}
\end{filecontents*}

\documentclass{article}

%% encoding
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{csquotes}
\usepackage{authblk}
\usepackage[raggedright]{titlesec}

%% Figures and graphics
\usepackage{graphicx}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{float}
\usepackage[a4paper,margin=1.1in,footskip=0.25in]{geometry}

%% OTHER PACKAGES
\usepackage{url}
\usepackage[hyperindex,colorlinks,hyperfootnotes = false,linkcolor=blue,urlcolor=black,citecolor=blue]{hyperref}
\usepackage{makecell}

%% Math
\usepackage{bm}
\usepackage{amssymb}
\usepackage{amsmath}

%bibliography
\usepackage[doi=false,maxbibnames=10,maxcitenames=2,mincitenames=1,articlein=false,giveninits,sorting=none,style=ext-numeric,useprefix]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{xpatch}% load the xpatch package
\xpatchbibdriver{online}% patch the online driver:
  {\printfield{entrysubtype}}% replace this line
  {\printfield{entrysubtype}%  with these lines
   \newunit\newblock
   \printfield{addendum}}
  {}
  {}
  
\defbibenvironment{thebibliography}
  {\textbackslash begin\{thebibliography\}\{99\}
   \renewcommand*{\mkbibemph}[1]{\textbackslash textit\{##1\}}
   \list{}{}}
  {\endlist
   \textbackslash end\{thebibliography\}}
  {\item\textbackslash bibitem\{\printfield{entrykey}\}\\}
  
\usepackage[default]{sourcesanspro}

\newbibmacro{string+doiurl}[1]{%
  \iffieldundef{doi}
    {\iffieldundef{url}
       {#1}
       {\href{\thefield{url}}{#1}}}
    {\href{\thefield{doi}}{#1}}}

\makeatletter
\def\blx@driver#1{%
  \ifcsdef{blx@bbx@#1}
    {\usebibmacro{string+doiurl}{\csuse{blx@bbx@#1}}}
    }
\makeatother  

\DefineBibliographyStrings{english}{
  byeditor = {edited by},
  editor   = {ed},
  editors  = {eds},
}

\renewcommand*{\bibinitdelim}{}
\renewcommand*{\bibinitperiod}{}
\renewcommand*{\bibpagespunct}{\addcolon}
\renewcommand*{\intitlepunct}{\addspace}
\renewcommand*{\jourvoldelim}{\addcomma\space}
\renewcommand*{\pubdatedelim}{\addsemicolon\space}
\renewcommand*{\revsdnamepunct}{\addspace}
\renewcommand*{\volnumdelim}{\addcolon}

\DeclareDelimFormat[bib,biblist]{editortypedelim}{\addspace}
\DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcolon\space}

\DeclareFieldFormat{editortype}{\bibsentence\mkbibparens{#1}}
\DeclareFieldFormat{issuedate}{#1}
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{titlecase}{%
  \ifboolexpr{
    test {\ifentrytype{article}}
    or
    test {\ifentrytype{incollection}}
  }
    {\MakeSentenceCase*{#1}}
    {#1}}
\DeclareFieldFormat{titlecase:booktitle}{#1}
\DeclareFieldFormat{titlecase:journaltitle}{#1}
\DeclareFieldFormat[article,incollection]{title}{\mkbibbold{#1}}
\DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}

%\DeclareNameAlias{default}{family-given}

% reorder date in article
\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\addspace}%
  \usebibmacro{issue+date}%
  \setunit*{\jourvoldelim}%
  \iffieldundef{series}
    {}
    {\setunit*{\jourserdelim}%
     \printfield{series}%
     \setunit{\servoldelim}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}

% lowercase prefix
\renewbibmacro*{begentry}{\midsentence}

\DeclareFieldFormat{labelnumberwidth}{#1\adddot}

%highlights
\usepackage{xcolor}

\makeatletter
\newcommand{\printfnsymbol}[1]{
  \textsuperscript{\@fnsymbol{#1}}
}
\makeatother

\usepackage{lineno}
\linenumbers

\begin{document}
        
\defbibnote{myprenote}{*Papers of special interest\\
\relax **Papers of outstanding interest}
\printbibliography[env=thebibliography]
\printbibliography

\end{document}

相关内容