尾注标题中的斜体文本(属/种)导致编译失败

尾注标题中的斜体文本(属/种)导致编译失败

我想用斜体表示智人在我的尾注中引用的参考文献中。Unitalicized 工作正常。添加 \textit{} 会导致编译失败。

最小不工作 test.bib:

@online{sib_swiss_institute_of_bioinformatics_q8wz42_nodate,
    title = {Q8WZ42 ({TITIN}\_HUMAN) \textit{Homo sapiens} (Human)},
    url = {https://swissmodel.expasy.org/repository/uniprot/Q8WZ42},
    author = {{SIB Swiss Institute of Bioinformatics}},
    urldate = {2024-01-04},
}

如果参考标题字段中没有使用 \textit{},则此方法可以正常工作:

\documentclass[a4paper]{article}
    
\usepackage[notes,notetype=endonly,isbn=false,doi=false,url=false,backend=biber]{biblatex-chicago}
\usepackage{endnotes}
    
\addbibresource{test.bib}
    
\begin{document}
    
    Lorem ipsum dolor\autocite{sib_swiss_institute_of_bioinformatics_q8wz42_nodate}
    
    \theendnotes
        
\end{document}

答案1

我建议使用enotez,但问题是一样的;有一种解决方法,

\begin{filecontents*}[overwrite]{\jobname.bib}
@online{sib_swiss_institute_of_bioinformatics_q8wz42_nodate,
    title = {Q8WZ42 ({TITIN}\_HUMAN) \textit{Homo sapiens} (Human)},
    url = {https://swissmodel.expasy.org/repository/uniprot/Q8WZ42},
    author = {{SIB Swiss Institute of Bioinformatics}},
    urldate = {2024-01-04},
}
\end{filecontents*}

\documentclass[a4paper]{article}
    
\usepackage[
  notes,
  notetype=endonly,
  isbn=false,
  doi=false,
  url=false,
  backend=biber
]{biblatex-chicago}
\usepackage{enotez}
    
\addbibresource{\jobname.bib}

\NewCommandCopy{\latextextit}{\textit}
\RenewDocumentCommand{\textit}{m}{\latextextit{#1}}

\begin{document}
    
Lorem ipsum dolor\autocite{sib_swiss_institute_of_bioinformatics_q8wz42_nodate}
    
\printendnotes
        
\end{document}

在此处输入图片描述

但也算是endnotes有点作用的。

\begin{filecontents*}[overwrite]{\jobname.bib}
@online{sib_swiss_institute_of_bioinformatics_q8wz42_nodate,
    title = {Q8WZ42 ({TITIN}\_HUMAN) \textit{Homo sapiens} (Human)},
    url = {https://swissmodel.expasy.org/repository/uniprot/Q8WZ42},
    author = {{SIB Swiss Institute of Bioinformatics}},
    urldate = {2024-01-04},
}
\end{filecontents*}

\documentclass[a4paper]{article}
    
\usepackage[
  notes,
  notetype=endonly,
  isbn=false,
  doi=false,
  url=false,
  backend=biber
]{biblatex-chicago}
\usepackage{endnotes}
    
\addbibresource{\jobname.bib}

\NewCommandCopy{\latextextit}{\textit}
\RenewDocumentCommand{\textit}{m}{\latextextit{#1}}

\begin{document}
    
Lorem ipsum dolor\autocite{sib_swiss_institute_of_bioinformatics_q8wz42_nodate}
    
\theendnotes
        
\end{document}

然而,我总是

Package biblatex Warning: Please (re)run Biber on the file:
(biblatex)                paulend
(biblatex)                and rerun LaTeX afterwards.

在此处输入图片描述

相关内容