如何在LaTex Biology中自动为特定作者姓名加下划线

如何在LaTex Biology中自动为特定作者姓名加下划线,latex,biblatex,Latex,Biblatex,对于简历,我想在参考书目中出现的任何地方加下划线。我用乳胶和比布拉特斯。有没有一种简单的方法可以自动为某个名称加下划线?谢谢 例如,我希望在参考书目中的所有条目中自动在“Name-姓氏”下面加下划线 \documentclass[12pt]{article} \usepackage[maxbibnames=99, sorting=ydnt]{biblatex} \addbibresource{test.bib} \begin{filecontents}{test.bib} @article{p

对于简历,我想在参考书目中出现的任何地方加下划线。我用乳胶和比布拉特斯。有没有一种简单的方法可以自动为某个名称加下划线?谢谢

例如,我希望在参考书目中的所有条目中自动在“Name-姓氏”下面加下划线

\documentclass[12pt]{article}
\usepackage[maxbibnames=99, sorting=ydnt]{biblatex}
\addbibresource{test.bib}

\begin{filecontents}{test.bib}
@article{paper1,
author   = {Surname, Name and Another, Name and Thethird, Name and Andthe, Last},
journal  = {JUR},
month    = {5},
title    = {{Title very good}},
year     = {2015}
}
@article{paper2,
author   = {Guy, Some and Surname, Name and Dude, The},
journal  = {JUR},
month    = {5},
title    = {{Another brilliant title}},
year     = {2016},
}
\end{filecontents}

\begin{document}

\nocite{*}
\printbibliography
\end{document}

可以肯定的是,您是要突出显示所有作者,还是只突出显示一个特定的名称

在第一种情况下,我邀请您查看格式化参考书目的.bst文件,以找到适合您的参考书目,甚至自己创建一个参考书目(相当长)


在第二种情况下,除了在bib文件中添加
\hl{Name,姓氏}
之外,我看不到任何解决方案。

请确定,您是要突出显示所有作者还是只显示特定的姓名

在第一种情况下,我邀请您查看格式化参考书目的.bst文件,以找到适合您的参考书目,甚至自己创建一个参考书目(相当长)


在第二种情况下,除了在bib文件中添加
\hl{Name,姓氏}
之外,我看不到任何解决方案

\documentclass[12pt]{article}
\usepackage[maxbibnames=99,sorting=ydnt]{biblatex}
\开始{filecontents*}[覆盖]{\jobname.bib}
@第{1条,
作者={姓,名和另一个,名和第三个,名和最后一个},
日记账={JUR},
月份={5},
title={{title very good}},
年份={2015}
}
@第{2条,
作者={Guy,Some和姓氏,名字和Dude,The},
日记账={JUR},
月份={5},
title={{另一个精彩的title}},
年份={2016},
}
\结束{filecontents*}
\addbibresource{\jobname.bib}
\usepackage{xstring}
\usepackage{etoolbox}
\纽布尔人{bold}
\新命令{\makeauthorsbold}[1]{%
\声明格式{作者}{%
\setboolean{bold}{false}%
\更新命令{\do}[1]{\expandafter\ifstrequal\expandafter{\namepartfamily}{{
\文件列表{#1}%
\ifthenelse{\value{listcount}=1}
{%
{\expandafter\ifthenalse{\boolean{bold}}{\mkbibbold{\namepartfamily\addcomma\addspace\namepartgiveni}}{\namepartfamily\addcomma\addspace\namepartgiveni}}%
}{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifthenels{\boolean{bold}}{\mkbibbold{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni}}{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni}%
{\expandafter\ifthenels{\boolean{bold}}{\mkbibbold{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni\addcomma\isdot}}}{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni\addcomma\isdot}%
}

\如果其他{\value{listcount}您可以使用

\documentclass[12pt]{article}
\usepackage[maxbibnames=99,sorting=ydnt]{biblatex}
\开始{filecontents*}[覆盖]{\jobname.bib}
@第{1条,
作者={姓,名和另一个,名和第三个,名和最后一个},
日记账={JUR},
月份={5},
title={{title very good}},
年份={2015}
}
@第{2条,
作者={Guy,Some和姓氏,名字和Dude,The},
日记账={JUR},
月份={5},
title={{另一个精彩的title}},
年份={2016},
}
\结束{filecontents*}
\addbibresource{\jobname.bib}
\usepackage{xstring}
\usepackage{etoolbox}
\纽布尔人{bold}
\新命令{\makeauthorsbold}[1]{%
\声明格式{作者}{%
\setboolean{bold}{false}%
\更新命令{\do}[1]{\expandafter\ifstrequal\expandafter{\namepartfamily}{{
\文件列表{#1}%
\ifthenelse{\value{listcount}=1}
{%
{\expandafter\ifthenalse{\boolean{bold}}{\mkbibbold{\namepartfamily\addcomma\addspace\namepartgiveni}}{\namepartfamily\addcomma\addspace\namepartgiveni}}%
}{\ifnumless{\value{listcount}}{\value{liststop}}
{\expandafter\ifthenels{\boolean{bold}}{\mkbibbold{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni}}{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni}%
{\expandafter\ifthenels{\boolean{bold}}{\mkbibbold{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni\addcomma\isdot}}}{\addcomma\addspace\namepartfamily\addcomma\addspace\namepartgiveni\addcomma\isdot}%
}

\如果还有{\value{listcount}请做一个,请做一个,
\hl
宏来自灵魂包
\usepack{soul}
\usepack{soulutf8}
biblatex不使用
.bst
文件
\hl
宏来自灵魂包
\usepack soul}
\usepack{soulutf8}
biblatex不使用
.bst
文件
\documentclass[12pt]{article}
\usepackage[maxbibnames=99, sorting=ydnt]{biblatex}


\begin{filecontents*}[overwrite]{\jobname.bib}
@article{paper1,
author   = {Surname, Name and Another, Name and Thethird, Name and Andthe, Last},
journal  = {JUR},
month    = {5},
title    = {{Title very good}},
year     = {2015}
}
@article{paper2,
author   = {Guy, Some and Surname, Name and Dude, The},
journal  = {JUR},
month    = {5},
title    = {{Another brilliant title}},
year     = {2016},
}
\end{filecontents*}

\addbibresource{\jobname.bib}

\usepackage{xstring}
\usepackage{etoolbox}
\newboolean{bold}
\newcommand{\makeauthorsbold}[1]{%
  \DeclareNameFormat{author}{%
  \setboolean{bold}{false}%
    \renewcommand{\do}[1]{\expandafter\ifstrequal\expandafter{\namepartfamily}{####1}{\setboolean{bold}{true}}{}}%
    \docsvlist{#1}%
    \ifthenelse{\value{listcount}=1}
    {%
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}%
    }{\ifnumless{\value{listcount}}{\value{liststop}}
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}%
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
      }
    \ifthenelse{\value{listcount}<\value{liststop}}
    {\addcomma\space}{}
  }
}

\makeauthorsbold{Surname, Name}



\begin{document}

\nocite{*}
\printbibliography
\end{document}