没有某些作者的 Biblatex

没有某些作者的 Biblatex

我的目的是不将我的名字列入我的简历的出版物清单中(因为很明显我是合著者,因此浪费空间)。

我曾经寻求并得到了一个解决方案这里

重新运行此解决方案

\documentclass{article}

\begin{filecontents}{\jobname.bib}
@book{texbook,
    author = {D.E. Knuth},
    title = {The {\TeX}book},
    publisher = {Addison Wesley},
    year = 1986
}

@Book{latexbook,
  author =       "Leslie Lamport",
  title =        "{\LaTeX} - A Document Preparation System - User's Guide and Reference Manual",
  publisher =    {Addison Wesley},
  year =         "1985"
}

@ARTICLE{Demetrescu+Hanck-CauchyCoint:17+,
  author       = {Matei Demetrescu and Christoph Hanck},
  title        = {Multiple Testing for No Cointegration under Nonstationary Volatility},
  year         = {2017+},
  journal      = {Oxford Bulletin},
}
\end{filecontents}

\usepackage[backend=bibtex,style=authoryear]{biblatex}

\addbibresource{\jobname.bib}


\DeclareNameFormat{blank}{}

\DeclareCiteCommand{\cite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{blank}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\newtoggle{ismyself}
\newtoggle{hadmyself}

\NewBibliographyString{with}
\DefineBibliographyStrings{ngerman}{%
  with                = {mit}
}
\DefineBibliographyStrings{english}{%
  with                = {with}
}

\DeclareNameFormat{author}{%
   \ifthenelse{\value{listcount}=1}{\ifthenelse{\value{author}>1}{\bibstring{with}\addspace}{}}{}%
   % Exclude Yours Truly
   \ifstrequal{#1}{Hanck}{\toggletrue{ismyself}\toggletrue{hadmyself}}{%
    \ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}}{%
    \iftoggle{ismyself}{}{%
     \ifnumless{\value{listcount}}{\value{liststop}-1}%
       {\addcomma\addspace}%
       {\iftoggle{hadmyself}{%
          \ifnumless{\value{listcount}}{\value{liststop}}%
                {\addcomma\addspace}%
                {\addspace\bibstring{and}\addspace}}
          {\addspace\bibstring{and}\addspace}}%
     }}%
     \ifblank{#3}{}{#3\addspace}%
     \ifblank{#5}{}{#5\addspace}%
     \togglefalse{ismyself}%
     #1%
     \usebibmacro{name:andothers}}%
   \ifthenelse{\value{listcount}=\value{liststop}\AND\value{author}>1}{\unspace}{}%
}


\begin{document}
\cite{texbook} \cite{Demetrescu+Hanck-CauchyCoint:17+}
\end{document}

现在生产错误信息,显然与 biblatex 的更新有关。

有人知道如何调整第一个解决方案与新版本 biblatex 的链接吗?

答案1

biblatex-publistpackage 是专门用于简历的样式。您可以在\plauthorname命令中输入您的姓名,然后您的姓名将被过滤掉。

\documentclass{article}
\usepackage[backend=biber,style=publist]{biblatex}
\addbibresource{biblatex-examples.bib}

\plauthorname[Emma]{Sigfridsson}

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

在此处输入图片描述

相关内容