From: adin Date: Tue, 7 Apr 2020 17:00:02 +0000 (-0300) Subject: Add user interface for highlight style (\hlformat), and use a verbose name for applyi... X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=ef47cb2ec88e888f61291e51f7c61831aac81592;p=mcv-academic Add user interface for highlight style (\hlformat), and use a verbose name for applying the patches instead of the previous bold one. --- diff --git a/academic.sty b/academic.sty index d293400..74e7aae 100644 --- a/academic.sty +++ b/academic.sty @@ -312,11 +312,11 @@ \addbibresource{\hlblx@bibfile@name} -\newcommand*{\hlbxl@boldhashes}{} +\newcommand*{\hlbxl@processhashes}{} \DeclareNameFormat{hlblx@hashextract}{% - \xifinlist{\thefield{hash}}{\hlbxl@boldhashes} + \xifinlist{\thefield{hash}}{\hlbxl@processhashes} {} - {\listxadd{\hlbxl@boldhashes}{\thefield{fullhash}}}} + {\listxadd{\hlbxl@processhashes}{\thefield{fullhash}}}} \DeclareCiteCommand{\hlblx@getmethehash} {} @@ -324,16 +324,19 @@ {} {} -\newcommand*{\hlblx@format}{\bfseries} +% internal use +\newcommand{\hlblx@format}{\bfseries} +% user interface +\newcommand{\hlformat}[1]{\renewcommand\hlblx@format{#1}} \newbibmacro*{name:hlblx}[1]{% \def\do##1{\iffieldequalstr{hash}{##1}{\hlblx@format\listbreak}{}}% - \dolistloop{\hlbxl@boldhashes}% + \dolistloop{\hlbxl@processhashes}% } \xpretobibmacro{name:hook}{\usebibmacro{name:hlblx}{#1}}{}{} % User macros \newcommand*{\addboldnames}{\forcsvlist\hlblx@writenametobib} -\newcommand*{\resetboldnames}{\def\hlbxl@boldhashes{}} +\newcommand*{\resetboldnames}{\def\hlbxl@processhashes{}} % Mantained for backwards compatibility \newcommand*{\boldname}[3]{%