我正在使用 BibLaTeX 和 LyX,并将以下内容作为我的 TeX 文件:
%% LyX 2.1.0 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[11pt,letterpaper,english]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{setspace}
\onehalfspacing
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
%\documentclass{scrbook}
%\usepackage[english]{babel}
\usepackage[colorlinks=true]{hyperref}
\usepackage[style=chem-acs,hyperref=true,babel=hyphen,doi=true]{biblatex}
\usepackage{filecontents}
%page header and footer
%Superscripts and brackets in citation footnotes can be obtained by redefining \@makefntext.
%Citation and "vanilla" footnotes can be printed as separate lists using the manyfoot package.
\usepackage{manyfoot}
% Citation footnotes: use \footnoteA
%\DeclareNewFootnote{A}[roman]
%
%% Vanilla footnotes: use \footnoteB
%\DeclareNewFootnote{B}
% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\makeatletter
\newtoggle{cbx@togcite}
% Citation number superscript in brackets
\renewcommand\@makefntext[1]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
{\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
\global\togglefalse{cbx@togcite}}
\ExecuteBibliographyOptions{%
citetracker=true,sorting=none,alldates=long,dateabbrev=false,%
articletitle=true,maxcitenames=1}
% No brackets around the number of each bibliography entry
\DeclareFieldFormat{labelnumberwidth}{#1\addperiod}
% Suppress article title, doi, url, etc. in citations
\AtEveryCitekey{%
\ifentrytype{article}
{\clearfield{title}}
{}%
\clearfield{doi}%
\clearfield{url}%
\clearlist{publisher}%
\clearlist{location}%
\clearfield{note}}
% Print year instead of date, when available; make use of urldate
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\renewbibmacro*{date}{% Based on date bib macro from chem-acs.bbx
\iffieldundef{year}
{\ifentrytype{online}
{\printtext[urldate]{\printurldate}}
{\printtext[date]{\printdate}}}
{\printfield[date]{year}}}
% Remove period from titles
\DeclareFieldFormat*{title}{#1}
%---------------------------------------------------------------
% Essentially verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\makeatletter
\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{sfcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{sfcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\noexpand\footnotetext[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}\addperiod}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{#1}%
\cbx@citehook%
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
%---------------------------------------------------------------
\long\def\footnote#1{%
\begingroup%
\def\thefootnote{\roman{footnote}}\footnote{#1}%
\endgroup}
\begin{filecontents*}{\jobname.bib}
@Article{Benfield2003,
Title = {Changing trends in pediatric transplantation: 2001 Annual Report of the North American Pediatric Renal Transplant Cooperative Study.},
Author = {Benfield, Mark R. and McDonald, Ruth A. and Bartosh, Sharon and Ho, P. L. and Harmon, William},
Journal = {Pediatr Transplant},
Language = {eng},
Pages = {321--335},
Volume = {7},
Year = {2003},
Month = {Aug},
Number = {4}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\makeatother
\usepackage{babel}
\begin{document}
The first citation.\sfcite{Benfield2003}
\printbibliography
\end{document}
生成的 PDF 在脚注中引用为
1 Beneld, MR 等,《儿科移植》2003, 7, 321335。
title 字段已正确隐藏。如何隐藏 title 字段后的 eng?
答案1
我明白了。
首先,通过添加此项来更改序言\clearlist{language}
,这将停止在脚注引用中添加语言字段;
\AtEveryCitekey{%
\ifentrytype{article}
{\clearfield{title}}
{}%
\clearlist{language}%
\clearfield{doi}%
\clearfield{url}%
\clearlist{publisher}%
\clearlist{location}%
\clearfield{note}}
接下来,\AtEveryBibitem{\clearlist{language}}
在加载书目资源后,在序言末尾添加,这将清除书目中的语言字段。