我对 biblatex 进行了定制,结果为“Smith (1992&1993)”,我怎样才能将其改为“Smith (1992;1993)”?

我对 biblatex 进行了定制,结果为“Smith (1992&1993)”,我怎样才能将其改为“Smith (1992;1993)”?

我正在文中引用来源。我正在关注这个问题改为它可以在哪里“Smith (1992&1993)”

&我根本在设置中找不到该符号。

制作方法:

“Smith (1992 & 1993)”

“Smith (1992; 1993)”

我的 MWE:

\documentclass{article}
\usepackage{xpatch}
% \usepackage[style = authoryear-comp, maxnames = 99]{biblatex}

\usepackage[backend=biber, 
% style=authoryear, 
 style=authoryear-comp,
% citestyle=authoryear, 
dashed=false,
maxcitenames=2,
maxbibnames=99,
giveninits,
uniquename=init]{biblatex}


\DeclareNameAlias{sortname}{family-given} %for second and third author name


\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}

\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}


% for a chapter edited by a book
\usepackage{xpatch}
% \renewcommand*{\finalnamedelim}{\addspace\&\space} 
% \renewcommand*{\intitlepunct}{\space} (to become In:)
\renewcommand{\labelnamepunct}{\space} %to delete . after (1997)
% \DeclareFieldFormat[article, incollection, unpublished]{pages}{#1} % to add in PP. (page)
\DeclareFieldFormat[article, incollection, unpublished]{title}{#1}
% \renewcommand{\bibpagespunct}{\ifentrytype{article}{\addcolon}{\addperiod\addspace}} %cancel out this in order to add in PP. (page)


% for title italic
% \DeclareFieldFormat*{title}{\mkbibemph{#1}} %for title italic in all format (conference, paper..)
\DeclareFieldFormat*{title}{#1} %for conference title delete ".."
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}} %for incollecion title italic ONLY
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}} %for phdthesis title italic ONLY
% for title italic

% to delete "In:" for article
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
% to delete "In:" for article


% for delete comma after Author A and Aurhor b
\DefineBibliographyExtras{english}{%
   \let\finalandcomma\empty
   \let\finalandsemicolon\empty
 }
\renewcommand{\compcitedelim}{\space\&\space}
\DeclareNameAlias{editorin}{given-family}

\newbibmacro*{byeditor:in}{%
  \ifnameundef{editor}
    {}
    {\printnames[editorin]{editor}%
     \setunit{\addcomma\space}%
     \usebibmacro{editorstrg}%
     \clearname{editor}}}     


\xpatchbibdriver{inbook}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{byeditor:in}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{incollection}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor}}
  {}{}

\xpatchbibdriver{inproceedings}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{phdthesis}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}





% for references 's studies (year)
\renewcommand*{\nameyeardelim}{\addcomma\space}
\newcommand{\mycite}[1]{\citeauthor{#1}'s \citeyear{#1}}

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeyear} % <======================================
    {}
    {(\bibhyperref{\printdate})}
    {\multicitedelim}
    {}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\makeatletter
\let\abx@macro@textciteOrig\abx@macro@textcite
\renewbibmacro{textcite}{% <============================================
   \bibhyperref{%
   \let\bibhyperref\relax\relax%
   \abx@macro@textciteOrig%
   }%
}%
\makeatother
% for references 's studies (year)



\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}

@article{flowers1992ear,
  title={The ear’s versus the eye’s potential to assess characteristics of numeric data: Are we too visuocentric?},
  author={Flowers, John H and Hauer, Terry A},
  journal={Behavior Research Methods, Instruments, \& Computers},
  volume={24},
  number={2},
  pages={258--264},
  year={1992},
  publisher={Springer}
}

@article{flowers1993sound,
  title={“Sound” alternatives to visual graphics for exploratory data analysis},
  author={Flowers, John H and Hauer, Terry A},
  journal={Behavior Research Methods, Instruments, \& Computers},
  volume={25},
  number={2},
  pages={242--249},
  year={1993},
  publisher={Springer}
}

\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}


used in analysing histograms and boxplots as is discussed by numerous other authors in \textcite{flowers1992ear, flowers1993sound} 


\printbibliography
\end{document}

答案1

只需在代码中按 Ctrl-F&即可找到以下行

\renewcommand{\compcitedelim}{\addspace\&\space}

事实上如果你注释掉这一行你就会回到

史密斯(1992,1993)

\renewcommand{\compcitedelim}{\addsemicolon\space}

史密斯(1992;1993)

\documentclass{article}


\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}

\usepackage[backend=biber, 
  style=authoryear-comp,
  dashed=false,
  maxcitenames=2,
  maxbibnames=99,
  giveninits,
  uniquename=init]{biblatex}
\usepackage{xpatch}

\usepackage[unicode,colorlinks,citecolor=blue]{hyperref}


\DeclareNameAlias{sortname}{family-given}
\usepackage{xpatch}

\renewcommand{\compcitedelim}{\addsemicolon\space}

\DeclareDelimFormat{nametitledelim}{\addspace}
\DeclareFieldFormat[article, incollection, unpublished]{title}{#1}


\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat[incollection]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[thesis]{title}{\mkbibemph{#1}} 


\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}



\DefineBibliographyExtras{english}{%
   \let\finalandcomma\empty
   \let\finalandsemicolon\empty
 }


\DeclareNameAlias{editorin}{given-family}

\newbibmacro*{byeditor:in}{%
  \ifnameundef{editor}
    {}
    {\printnames[editorin]{editor}%
     \setunit{\addcomma\space}%
     \usebibmacro{editorstrg}%
     \clearname{editor}}}     


\xpatchbibdriver{inbook}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{bybookauthor}%
   \newunit\newblock
   \usebibmacro{byeditor:in}%
   \newunit\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{incollection}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{byeditor}}
  {}{}

\xpatchbibdriver{inproceedings}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}

\xpatchbibdriver{phdthesis}
  {\usebibmacro{in:}%
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {\usebibmacro{in:}%
   \usebibmacro{byeditor:in}%
   \setunit{\labelnamepunct}\newblock
   \usebibmacro{maintitle+booktitle}%
   \newunit\newblock
   \usebibmacro{event+venue+date}%
   \newunit\newblock
   \usebibmacro{byeditor+others}}
  {}{}





\renewcommand*{\nameyeardelim}{\addcomma\space}
\newcommand{\mycite}[1]{\citeauthor{#1}'s \citeyear{#1}}

\DeclareCiteCommand{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printtext[bibhyperref]{\printnames{labelname}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\citeyear}
    {}
    {(\bibhyperref{\printdate})}
    {\multicitedelim}
    {}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{\usebibmacro{cite}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\makeatletter
\let\abx@macro@textciteOrig\abx@macro@textcite
\renewbibmacro{textcite}{%
   \bibhyperref{%
   \let\bibhyperref\relax\relax%
   \abx@macro@textciteOrig%
   }%
}%
\makeatother


\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{flowers1992ear,
  title={The ear’s versus the eye’s potential to assess characteristics of numeric data: Are we too visuocentric?},
  author={Flowers, John H and Hauer, Terry A},
  journal={Behavior Research Methods, Instruments, \& Computers},
  volume={24},
  number={2},
  pages={258--264},
  year={1992},
  publisher={Springer}
}
@article{flowers1993sound,
  title={“Sound” alternatives to visual graphics for exploratory data analysis},
  author={Flowers, John H and Hauer, Terry A},
  journal={Behavior Research Methods, Instruments, \& Computers},
  volume={25},
  number={2},
  pages={242--249},
  year={1993},
  publisher={Springer}
}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}
Lorem \textcite{flowers1992ear, flowers1993sound} 

\printbibliography
\end{document}

洛雷姆·弗劳尔斯和豪尔(1992;1993)

相关内容