Make specific author bold using fullcite












2















I want to make bold specific author, wherever it placed (i.e., 1st, 2nd does not matter) when only citing at the text area (i.e., should not get bold in reference section).



For full citation in the text/normal section, I used the method described here. For changing it to bold, I found this answer might be useful, but don't how to incorporate it in the printpublication command.



MWE:



documentclass{article}
usepackage[backend=biber,natbib=true,style=ieee,
citestyle=numeric-comp,sorting=none,doi=false,isbn=false,url=true,]{biblatex}

usepackage{filecontents}

begin{filecontents}{cite.bib}
@misc{A01,
author = {Author, Arik and Author, Jaz and Author, Ricky},
year = {2100},
title = {An unnecessary long title},
}
@book{A02,
author = {Author, Jaz and Author, Arik and Author, Ricky},
year = {2100},
title = {An unnecessary long title},
}
end{filecontents}
addbibresource{cite.bib}


newcommand{printpublication}[1]{AtNextCite{defcounter{maxnames}{3}defcounter{minnames}{1}}fullcite{#1}}

begin{document}
printpublication{A01}
printpublication{A02}

printbibliography
end{document}









share|improve this question



























    2















    I want to make bold specific author, wherever it placed (i.e., 1st, 2nd does not matter) when only citing at the text area (i.e., should not get bold in reference section).



    For full citation in the text/normal section, I used the method described here. For changing it to bold, I found this answer might be useful, but don't how to incorporate it in the printpublication command.



    MWE:



    documentclass{article}
    usepackage[backend=biber,natbib=true,style=ieee,
    citestyle=numeric-comp,sorting=none,doi=false,isbn=false,url=true,]{biblatex}

    usepackage{filecontents}

    begin{filecontents}{cite.bib}
    @misc{A01,
    author = {Author, Arik and Author, Jaz and Author, Ricky},
    year = {2100},
    title = {An unnecessary long title},
    }
    @book{A02,
    author = {Author, Jaz and Author, Arik and Author, Ricky},
    year = {2100},
    title = {An unnecessary long title},
    }
    end{filecontents}
    addbibresource{cite.bib}


    newcommand{printpublication}[1]{AtNextCite{defcounter{maxnames}{3}defcounter{minnames}{1}}fullcite{#1}}

    begin{document}
    printpublication{A01}
    printpublication{A02}

    printbibliography
    end{document}









    share|improve this question

























      2












      2








      2








      I want to make bold specific author, wherever it placed (i.e., 1st, 2nd does not matter) when only citing at the text area (i.e., should not get bold in reference section).



      For full citation in the text/normal section, I used the method described here. For changing it to bold, I found this answer might be useful, but don't how to incorporate it in the printpublication command.



      MWE:



      documentclass{article}
      usepackage[backend=biber,natbib=true,style=ieee,
      citestyle=numeric-comp,sorting=none,doi=false,isbn=false,url=true,]{biblatex}

      usepackage{filecontents}

      begin{filecontents}{cite.bib}
      @misc{A01,
      author = {Author, Arik and Author, Jaz and Author, Ricky},
      year = {2100},
      title = {An unnecessary long title},
      }
      @book{A02,
      author = {Author, Jaz and Author, Arik and Author, Ricky},
      year = {2100},
      title = {An unnecessary long title},
      }
      end{filecontents}
      addbibresource{cite.bib}


      newcommand{printpublication}[1]{AtNextCite{defcounter{maxnames}{3}defcounter{minnames}{1}}fullcite{#1}}

      begin{document}
      printpublication{A01}
      printpublication{A02}

      printbibliography
      end{document}









      share|improve this question














      I want to make bold specific author, wherever it placed (i.e., 1st, 2nd does not matter) when only citing at the text area (i.e., should not get bold in reference section).



      For full citation in the text/normal section, I used the method described here. For changing it to bold, I found this answer might be useful, but don't how to incorporate it in the printpublication command.



      MWE:



      documentclass{article}
      usepackage[backend=biber,natbib=true,style=ieee,
      citestyle=numeric-comp,sorting=none,doi=false,isbn=false,url=true,]{biblatex}

      usepackage{filecontents}

      begin{filecontents}{cite.bib}
      @misc{A01,
      author = {Author, Arik and Author, Jaz and Author, Ricky},
      year = {2100},
      title = {An unnecessary long title},
      }
      @book{A02,
      author = {Author, Jaz and Author, Arik and Author, Ricky},
      year = {2100},
      title = {An unnecessary long title},
      }
      end{filecontents}
      addbibresource{cite.bib}


      newcommand{printpublication}[1]{AtNextCite{defcounter{maxnames}{3}defcounter{minnames}{1}}fullcite{#1}}

      begin{document}
      printpublication{A01}
      printpublication{A02}

      printbibliography
      end{document}






      biblatex citing bold






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 9 at 6:41









      Mr.EUMr.EU

      345111




      345111






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Building on my answer to Make specific author bold using biblatex, which has a slightly more convenient user interface for the bold names, we can define the new command printpublication.



          The exact working of the code for bold names is explained in the linked answer: The gist is that we write the names to an external .bib and can then extract the hash automatically from the .bbl file. With the hashes we can then go on to highlight the names, the hashes of interest are stored in a list.



          The name format given-family:bold is a copy of biblatex.def's given-family name format, just with a wrapper command (in the style of the second part of my answer to Indicating joint first authorship through special markup in biblatex/biber). That wrapper command mkbibcompletename highlights exactly those names for which the hashes are in the list of interest.



          printpublication is a copy of fullcite with the defcounters as well as the new bold name format thrown directly into the precode of usedriver.



          documentclass{article}
          usepackage[backend=biber, natbib=true, style=ieee, sorting=none,
          doi=false, isbn=false, url=true]{biblatex}

          makeatletter
          % auxiliary command to ensure we execute code in document body
          defhlblx@ensuredocument#1{%
          ifx@onlypreamble@notprerr
          #1%
          else
          AtBeginDocument{#1}%
          fi}

          % auxiliary bibfile
          defhlblx@bibfile@name{jobname -boldnames.bib}
          newwritehlblx@bibfile
          immediateopenouthlblx@bibfile=hlblx@bibfile@name

          newcounter{hlblx@name}
          setcounter{hlblx@name}{0}

          newcommand*{hlblx@writenametobib}[1]{%
          stepcounter{hlblx@name}%
          edefhlblx@tmp@nocite{%
          noexpandhlblx@ensuredocument{%
          noexpandsetbox0noexpandvbox{%
          noexpandhlblx@getmethehash{hlblx@name@thevalue{hlblx@name}}}}%
          }%
          hlblx@tmp@nocite
          immediatewritehlblx@bibfile{%
          @misc{hlblx@name@thevalue{hlblx@name}, author = {unexpanded{#1}}, %
          options = {dataonly=true},}%
          }%
          }

          AtEndDocument{%
          closeouthlblx@bibfile}

          addbibresource{hlblx@bibfile@name}

          newcommand*{hlbxl@boldhashes}{}
          DeclareNameFormat{hlblx@hashextract}{%
          xifinlist{thefield{hash}}{hlbxl@boldhashes}
          {}
          {listxadd{hlbxl@boldhashes}{thefield{fullhash}}}}

          DeclareCiteCommand{hlblx@getmethehash}
          {}
          {printnames[hlblx@hashextract][1-999]{author}}
          {}
          {}

          % user-level macros
          newcommand*{addboldnames}{forcsvlisthlblx@writenametobib}
          newcommand*{resetboldnames}{defhlbxl@boldhashes{}}

          DeclareNameFormat{given-family:bold}{%
          ifgiveninits
          {usebibmacro{name:given-family:bold}
          {namepartfamily}
          {namepartgiveni}
          {namepartprefix}
          {namepartsuffix}}
          {usebibmacro{name:given-family:bold}
          {namepartfamily}
          {namepartgiven}
          {namepartprefix}
          {namepartsuffix}}%
          usebibmacro{name:andothers}}

          newbibmacro*{name:given-family:bold}[4]{%
          usebibmacro{name:delim}{#2#3#1}%
          usebibmacro{name:hook}{#2#3#1}%
          mkbibcompletename{%
          ifdefvoid{#2}{}{mkbibnamegiven{#2}isdotbibnamedelimd}%
          ifdefvoid{#3}{}{%
          mkbibnameprefix{#3}isdot
          ifprefchar
          {}
          {ifuseprefix{bibnamedelimc}{bibnamedelimd}}}%
          mkbibnamefamily{#1}isdot
          ifdefvoid{#4}{}{bibnamedelimdmkbibnamesuffix{#4}isdot}}}

          newcommand*{mkbibcompletename}[1]{%
          xifinlist{thefield{hash}}{hlbxl@boldhashes}
          {mkbibbold{#1}}
          {#1}}
          makeatother

          DeclareCiteCommand{printpublication}
          {usebibmacro{prenote}}
          {usedriver
          {DeclareNameAlias{sortname}{default}%
          DeclareNameAlias{default}{given-family:bold}%
          defcounter{maxnames}{3}%
          defcounter{minnames}{1}}
          {thefield{entrytype}}}
          {multicitedelim}
          {usebibmacro{postnote}}

          addboldnames{{Author, Arik}}

          usepackage{filecontents}
          begin{filecontents}{jobname.bib}
          @misc{A01,
          author = {Author, Arik and Author, Jaz and Author, Ricky},
          year = {2100},
          title = {An unnecessary long title},
          }
          @book{A02,
          author = {Author, Jaz and Author, Arik and Author, Ricky},
          year = {2100},
          title = {An unnecessary long title},
          }
          end{filecontents}
          addbibresource{jobname.bib}


          begin{document}
          printpublication{A01}

          printpublication{A02}

          printbibliography
          end{document}


          "**A. Author**, J. Author, and R. Author, An unnecessary long title, 2100"//"J. Author, **A. Author**, and R. Author, An unnecessary long title. 2100." Bibliography the same but without bold highlights for names.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469295%2fmake-specific-author-bold-using-fullcite%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Building on my answer to Make specific author bold using biblatex, which has a slightly more convenient user interface for the bold names, we can define the new command printpublication.



            The exact working of the code for bold names is explained in the linked answer: The gist is that we write the names to an external .bib and can then extract the hash automatically from the .bbl file. With the hashes we can then go on to highlight the names, the hashes of interest are stored in a list.



            The name format given-family:bold is a copy of biblatex.def's given-family name format, just with a wrapper command (in the style of the second part of my answer to Indicating joint first authorship through special markup in biblatex/biber). That wrapper command mkbibcompletename highlights exactly those names for which the hashes are in the list of interest.



            printpublication is a copy of fullcite with the defcounters as well as the new bold name format thrown directly into the precode of usedriver.



            documentclass{article}
            usepackage[backend=biber, natbib=true, style=ieee, sorting=none,
            doi=false, isbn=false, url=true]{biblatex}

            makeatletter
            % auxiliary command to ensure we execute code in document body
            defhlblx@ensuredocument#1{%
            ifx@onlypreamble@notprerr
            #1%
            else
            AtBeginDocument{#1}%
            fi}

            % auxiliary bibfile
            defhlblx@bibfile@name{jobname -boldnames.bib}
            newwritehlblx@bibfile
            immediateopenouthlblx@bibfile=hlblx@bibfile@name

            newcounter{hlblx@name}
            setcounter{hlblx@name}{0}

            newcommand*{hlblx@writenametobib}[1]{%
            stepcounter{hlblx@name}%
            edefhlblx@tmp@nocite{%
            noexpandhlblx@ensuredocument{%
            noexpandsetbox0noexpandvbox{%
            noexpandhlblx@getmethehash{hlblx@name@thevalue{hlblx@name}}}}%
            }%
            hlblx@tmp@nocite
            immediatewritehlblx@bibfile{%
            @misc{hlblx@name@thevalue{hlblx@name}, author = {unexpanded{#1}}, %
            options = {dataonly=true},}%
            }%
            }

            AtEndDocument{%
            closeouthlblx@bibfile}

            addbibresource{hlblx@bibfile@name}

            newcommand*{hlbxl@boldhashes}{}
            DeclareNameFormat{hlblx@hashextract}{%
            xifinlist{thefield{hash}}{hlbxl@boldhashes}
            {}
            {listxadd{hlbxl@boldhashes}{thefield{fullhash}}}}

            DeclareCiteCommand{hlblx@getmethehash}
            {}
            {printnames[hlblx@hashextract][1-999]{author}}
            {}
            {}

            % user-level macros
            newcommand*{addboldnames}{forcsvlisthlblx@writenametobib}
            newcommand*{resetboldnames}{defhlbxl@boldhashes{}}

            DeclareNameFormat{given-family:bold}{%
            ifgiveninits
            {usebibmacro{name:given-family:bold}
            {namepartfamily}
            {namepartgiveni}
            {namepartprefix}
            {namepartsuffix}}
            {usebibmacro{name:given-family:bold}
            {namepartfamily}
            {namepartgiven}
            {namepartprefix}
            {namepartsuffix}}%
            usebibmacro{name:andothers}}

            newbibmacro*{name:given-family:bold}[4]{%
            usebibmacro{name:delim}{#2#3#1}%
            usebibmacro{name:hook}{#2#3#1}%
            mkbibcompletename{%
            ifdefvoid{#2}{}{mkbibnamegiven{#2}isdotbibnamedelimd}%
            ifdefvoid{#3}{}{%
            mkbibnameprefix{#3}isdot
            ifprefchar
            {}
            {ifuseprefix{bibnamedelimc}{bibnamedelimd}}}%
            mkbibnamefamily{#1}isdot
            ifdefvoid{#4}{}{bibnamedelimdmkbibnamesuffix{#4}isdot}}}

            newcommand*{mkbibcompletename}[1]{%
            xifinlist{thefield{hash}}{hlbxl@boldhashes}
            {mkbibbold{#1}}
            {#1}}
            makeatother

            DeclareCiteCommand{printpublication}
            {usebibmacro{prenote}}
            {usedriver
            {DeclareNameAlias{sortname}{default}%
            DeclareNameAlias{default}{given-family:bold}%
            defcounter{maxnames}{3}%
            defcounter{minnames}{1}}
            {thefield{entrytype}}}
            {multicitedelim}
            {usebibmacro{postnote}}

            addboldnames{{Author, Arik}}

            usepackage{filecontents}
            begin{filecontents}{jobname.bib}
            @misc{A01,
            author = {Author, Arik and Author, Jaz and Author, Ricky},
            year = {2100},
            title = {An unnecessary long title},
            }
            @book{A02,
            author = {Author, Jaz and Author, Arik and Author, Ricky},
            year = {2100},
            title = {An unnecessary long title},
            }
            end{filecontents}
            addbibresource{jobname.bib}


            begin{document}
            printpublication{A01}

            printpublication{A02}

            printbibliography
            end{document}


            "**A. Author**, J. Author, and R. Author, An unnecessary long title, 2100"//"J. Author, **A. Author**, and R. Author, An unnecessary long title. 2100." Bibliography the same but without bold highlights for names.






            share|improve this answer






























              1














              Building on my answer to Make specific author bold using biblatex, which has a slightly more convenient user interface for the bold names, we can define the new command printpublication.



              The exact working of the code for bold names is explained in the linked answer: The gist is that we write the names to an external .bib and can then extract the hash automatically from the .bbl file. With the hashes we can then go on to highlight the names, the hashes of interest are stored in a list.



              The name format given-family:bold is a copy of biblatex.def's given-family name format, just with a wrapper command (in the style of the second part of my answer to Indicating joint first authorship through special markup in biblatex/biber). That wrapper command mkbibcompletename highlights exactly those names for which the hashes are in the list of interest.



              printpublication is a copy of fullcite with the defcounters as well as the new bold name format thrown directly into the precode of usedriver.



              documentclass{article}
              usepackage[backend=biber, natbib=true, style=ieee, sorting=none,
              doi=false, isbn=false, url=true]{biblatex}

              makeatletter
              % auxiliary command to ensure we execute code in document body
              defhlblx@ensuredocument#1{%
              ifx@onlypreamble@notprerr
              #1%
              else
              AtBeginDocument{#1}%
              fi}

              % auxiliary bibfile
              defhlblx@bibfile@name{jobname -boldnames.bib}
              newwritehlblx@bibfile
              immediateopenouthlblx@bibfile=hlblx@bibfile@name

              newcounter{hlblx@name}
              setcounter{hlblx@name}{0}

              newcommand*{hlblx@writenametobib}[1]{%
              stepcounter{hlblx@name}%
              edefhlblx@tmp@nocite{%
              noexpandhlblx@ensuredocument{%
              noexpandsetbox0noexpandvbox{%
              noexpandhlblx@getmethehash{hlblx@name@thevalue{hlblx@name}}}}%
              }%
              hlblx@tmp@nocite
              immediatewritehlblx@bibfile{%
              @misc{hlblx@name@thevalue{hlblx@name}, author = {unexpanded{#1}}, %
              options = {dataonly=true},}%
              }%
              }

              AtEndDocument{%
              closeouthlblx@bibfile}

              addbibresource{hlblx@bibfile@name}

              newcommand*{hlbxl@boldhashes}{}
              DeclareNameFormat{hlblx@hashextract}{%
              xifinlist{thefield{hash}}{hlbxl@boldhashes}
              {}
              {listxadd{hlbxl@boldhashes}{thefield{fullhash}}}}

              DeclareCiteCommand{hlblx@getmethehash}
              {}
              {printnames[hlblx@hashextract][1-999]{author}}
              {}
              {}

              % user-level macros
              newcommand*{addboldnames}{forcsvlisthlblx@writenametobib}
              newcommand*{resetboldnames}{defhlbxl@boldhashes{}}

              DeclareNameFormat{given-family:bold}{%
              ifgiveninits
              {usebibmacro{name:given-family:bold}
              {namepartfamily}
              {namepartgiveni}
              {namepartprefix}
              {namepartsuffix}}
              {usebibmacro{name:given-family:bold}
              {namepartfamily}
              {namepartgiven}
              {namepartprefix}
              {namepartsuffix}}%
              usebibmacro{name:andothers}}

              newbibmacro*{name:given-family:bold}[4]{%
              usebibmacro{name:delim}{#2#3#1}%
              usebibmacro{name:hook}{#2#3#1}%
              mkbibcompletename{%
              ifdefvoid{#2}{}{mkbibnamegiven{#2}isdotbibnamedelimd}%
              ifdefvoid{#3}{}{%
              mkbibnameprefix{#3}isdot
              ifprefchar
              {}
              {ifuseprefix{bibnamedelimc}{bibnamedelimd}}}%
              mkbibnamefamily{#1}isdot
              ifdefvoid{#4}{}{bibnamedelimdmkbibnamesuffix{#4}isdot}}}

              newcommand*{mkbibcompletename}[1]{%
              xifinlist{thefield{hash}}{hlbxl@boldhashes}
              {mkbibbold{#1}}
              {#1}}
              makeatother

              DeclareCiteCommand{printpublication}
              {usebibmacro{prenote}}
              {usedriver
              {DeclareNameAlias{sortname}{default}%
              DeclareNameAlias{default}{given-family:bold}%
              defcounter{maxnames}{3}%
              defcounter{minnames}{1}}
              {thefield{entrytype}}}
              {multicitedelim}
              {usebibmacro{postnote}}

              addboldnames{{Author, Arik}}

              usepackage{filecontents}
              begin{filecontents}{jobname.bib}
              @misc{A01,
              author = {Author, Arik and Author, Jaz and Author, Ricky},
              year = {2100},
              title = {An unnecessary long title},
              }
              @book{A02,
              author = {Author, Jaz and Author, Arik and Author, Ricky},
              year = {2100},
              title = {An unnecessary long title},
              }
              end{filecontents}
              addbibresource{jobname.bib}


              begin{document}
              printpublication{A01}

              printpublication{A02}

              printbibliography
              end{document}


              "**A. Author**, J. Author, and R. Author, An unnecessary long title, 2100"//"J. Author, **A. Author**, and R. Author, An unnecessary long title. 2100." Bibliography the same but without bold highlights for names.






              share|improve this answer




























                1












                1








                1







                Building on my answer to Make specific author bold using biblatex, which has a slightly more convenient user interface for the bold names, we can define the new command printpublication.



                The exact working of the code for bold names is explained in the linked answer: The gist is that we write the names to an external .bib and can then extract the hash automatically from the .bbl file. With the hashes we can then go on to highlight the names, the hashes of interest are stored in a list.



                The name format given-family:bold is a copy of biblatex.def's given-family name format, just with a wrapper command (in the style of the second part of my answer to Indicating joint first authorship through special markup in biblatex/biber). That wrapper command mkbibcompletename highlights exactly those names for which the hashes are in the list of interest.



                printpublication is a copy of fullcite with the defcounters as well as the new bold name format thrown directly into the precode of usedriver.



                documentclass{article}
                usepackage[backend=biber, natbib=true, style=ieee, sorting=none,
                doi=false, isbn=false, url=true]{biblatex}

                makeatletter
                % auxiliary command to ensure we execute code in document body
                defhlblx@ensuredocument#1{%
                ifx@onlypreamble@notprerr
                #1%
                else
                AtBeginDocument{#1}%
                fi}

                % auxiliary bibfile
                defhlblx@bibfile@name{jobname -boldnames.bib}
                newwritehlblx@bibfile
                immediateopenouthlblx@bibfile=hlblx@bibfile@name

                newcounter{hlblx@name}
                setcounter{hlblx@name}{0}

                newcommand*{hlblx@writenametobib}[1]{%
                stepcounter{hlblx@name}%
                edefhlblx@tmp@nocite{%
                noexpandhlblx@ensuredocument{%
                noexpandsetbox0noexpandvbox{%
                noexpandhlblx@getmethehash{hlblx@name@thevalue{hlblx@name}}}}%
                }%
                hlblx@tmp@nocite
                immediatewritehlblx@bibfile{%
                @misc{hlblx@name@thevalue{hlblx@name}, author = {unexpanded{#1}}, %
                options = {dataonly=true},}%
                }%
                }

                AtEndDocument{%
                closeouthlblx@bibfile}

                addbibresource{hlblx@bibfile@name}

                newcommand*{hlbxl@boldhashes}{}
                DeclareNameFormat{hlblx@hashextract}{%
                xifinlist{thefield{hash}}{hlbxl@boldhashes}
                {}
                {listxadd{hlbxl@boldhashes}{thefield{fullhash}}}}

                DeclareCiteCommand{hlblx@getmethehash}
                {}
                {printnames[hlblx@hashextract][1-999]{author}}
                {}
                {}

                % user-level macros
                newcommand*{addboldnames}{forcsvlisthlblx@writenametobib}
                newcommand*{resetboldnames}{defhlbxl@boldhashes{}}

                DeclareNameFormat{given-family:bold}{%
                ifgiveninits
                {usebibmacro{name:given-family:bold}
                {namepartfamily}
                {namepartgiveni}
                {namepartprefix}
                {namepartsuffix}}
                {usebibmacro{name:given-family:bold}
                {namepartfamily}
                {namepartgiven}
                {namepartprefix}
                {namepartsuffix}}%
                usebibmacro{name:andothers}}

                newbibmacro*{name:given-family:bold}[4]{%
                usebibmacro{name:delim}{#2#3#1}%
                usebibmacro{name:hook}{#2#3#1}%
                mkbibcompletename{%
                ifdefvoid{#2}{}{mkbibnamegiven{#2}isdotbibnamedelimd}%
                ifdefvoid{#3}{}{%
                mkbibnameprefix{#3}isdot
                ifprefchar
                {}
                {ifuseprefix{bibnamedelimc}{bibnamedelimd}}}%
                mkbibnamefamily{#1}isdot
                ifdefvoid{#4}{}{bibnamedelimdmkbibnamesuffix{#4}isdot}}}

                newcommand*{mkbibcompletename}[1]{%
                xifinlist{thefield{hash}}{hlbxl@boldhashes}
                {mkbibbold{#1}}
                {#1}}
                makeatother

                DeclareCiteCommand{printpublication}
                {usebibmacro{prenote}}
                {usedriver
                {DeclareNameAlias{sortname}{default}%
                DeclareNameAlias{default}{given-family:bold}%
                defcounter{maxnames}{3}%
                defcounter{minnames}{1}}
                {thefield{entrytype}}}
                {multicitedelim}
                {usebibmacro{postnote}}

                addboldnames{{Author, Arik}}

                usepackage{filecontents}
                begin{filecontents}{jobname.bib}
                @misc{A01,
                author = {Author, Arik and Author, Jaz and Author, Ricky},
                year = {2100},
                title = {An unnecessary long title},
                }
                @book{A02,
                author = {Author, Jaz and Author, Arik and Author, Ricky},
                year = {2100},
                title = {An unnecessary long title},
                }
                end{filecontents}
                addbibresource{jobname.bib}


                begin{document}
                printpublication{A01}

                printpublication{A02}

                printbibliography
                end{document}


                "**A. Author**, J. Author, and R. Author, An unnecessary long title, 2100"//"J. Author, **A. Author**, and R. Author, An unnecessary long title. 2100." Bibliography the same but without bold highlights for names.






                share|improve this answer















                Building on my answer to Make specific author bold using biblatex, which has a slightly more convenient user interface for the bold names, we can define the new command printpublication.



                The exact working of the code for bold names is explained in the linked answer: The gist is that we write the names to an external .bib and can then extract the hash automatically from the .bbl file. With the hashes we can then go on to highlight the names, the hashes of interest are stored in a list.



                The name format given-family:bold is a copy of biblatex.def's given-family name format, just with a wrapper command (in the style of the second part of my answer to Indicating joint first authorship through special markup in biblatex/biber). That wrapper command mkbibcompletename highlights exactly those names for which the hashes are in the list of interest.



                printpublication is a copy of fullcite with the defcounters as well as the new bold name format thrown directly into the precode of usedriver.



                documentclass{article}
                usepackage[backend=biber, natbib=true, style=ieee, sorting=none,
                doi=false, isbn=false, url=true]{biblatex}

                makeatletter
                % auxiliary command to ensure we execute code in document body
                defhlblx@ensuredocument#1{%
                ifx@onlypreamble@notprerr
                #1%
                else
                AtBeginDocument{#1}%
                fi}

                % auxiliary bibfile
                defhlblx@bibfile@name{jobname -boldnames.bib}
                newwritehlblx@bibfile
                immediateopenouthlblx@bibfile=hlblx@bibfile@name

                newcounter{hlblx@name}
                setcounter{hlblx@name}{0}

                newcommand*{hlblx@writenametobib}[1]{%
                stepcounter{hlblx@name}%
                edefhlblx@tmp@nocite{%
                noexpandhlblx@ensuredocument{%
                noexpandsetbox0noexpandvbox{%
                noexpandhlblx@getmethehash{hlblx@name@thevalue{hlblx@name}}}}%
                }%
                hlblx@tmp@nocite
                immediatewritehlblx@bibfile{%
                @misc{hlblx@name@thevalue{hlblx@name}, author = {unexpanded{#1}}, %
                options = {dataonly=true},}%
                }%
                }

                AtEndDocument{%
                closeouthlblx@bibfile}

                addbibresource{hlblx@bibfile@name}

                newcommand*{hlbxl@boldhashes}{}
                DeclareNameFormat{hlblx@hashextract}{%
                xifinlist{thefield{hash}}{hlbxl@boldhashes}
                {}
                {listxadd{hlbxl@boldhashes}{thefield{fullhash}}}}

                DeclareCiteCommand{hlblx@getmethehash}
                {}
                {printnames[hlblx@hashextract][1-999]{author}}
                {}
                {}

                % user-level macros
                newcommand*{addboldnames}{forcsvlisthlblx@writenametobib}
                newcommand*{resetboldnames}{defhlbxl@boldhashes{}}

                DeclareNameFormat{given-family:bold}{%
                ifgiveninits
                {usebibmacro{name:given-family:bold}
                {namepartfamily}
                {namepartgiveni}
                {namepartprefix}
                {namepartsuffix}}
                {usebibmacro{name:given-family:bold}
                {namepartfamily}
                {namepartgiven}
                {namepartprefix}
                {namepartsuffix}}%
                usebibmacro{name:andothers}}

                newbibmacro*{name:given-family:bold}[4]{%
                usebibmacro{name:delim}{#2#3#1}%
                usebibmacro{name:hook}{#2#3#1}%
                mkbibcompletename{%
                ifdefvoid{#2}{}{mkbibnamegiven{#2}isdotbibnamedelimd}%
                ifdefvoid{#3}{}{%
                mkbibnameprefix{#3}isdot
                ifprefchar
                {}
                {ifuseprefix{bibnamedelimc}{bibnamedelimd}}}%
                mkbibnamefamily{#1}isdot
                ifdefvoid{#4}{}{bibnamedelimdmkbibnamesuffix{#4}isdot}}}

                newcommand*{mkbibcompletename}[1]{%
                xifinlist{thefield{hash}}{hlbxl@boldhashes}
                {mkbibbold{#1}}
                {#1}}
                makeatother

                DeclareCiteCommand{printpublication}
                {usebibmacro{prenote}}
                {usedriver
                {DeclareNameAlias{sortname}{default}%
                DeclareNameAlias{default}{given-family:bold}%
                defcounter{maxnames}{3}%
                defcounter{minnames}{1}}
                {thefield{entrytype}}}
                {multicitedelim}
                {usebibmacro{postnote}}

                addboldnames{{Author, Arik}}

                usepackage{filecontents}
                begin{filecontents}{jobname.bib}
                @misc{A01,
                author = {Author, Arik and Author, Jaz and Author, Ricky},
                year = {2100},
                title = {An unnecessary long title},
                }
                @book{A02,
                author = {Author, Jaz and Author, Arik and Author, Ricky},
                year = {2100},
                title = {An unnecessary long title},
                }
                end{filecontents}
                addbibresource{jobname.bib}


                begin{document}
                printpublication{A01}

                printpublication{A02}

                printbibliography
                end{document}


                "**A. Author**, J. Author, and R. Author, An unnecessary long title, 2100"//"J. Author, **A. Author**, and R. Author, An unnecessary long title. 2100." Bibliography the same but without bold highlights for names.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 9 at 19:48

























                answered Jan 9 at 10:06









                moewemoewe

                88k9110338




                88k9110338






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469295%2fmake-specific-author-bold-using-fullcite%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to change which sound is reproduced for terminal bell?

                    Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

                    Can I use Tabulator js library in my java Spring + Thymeleaf project?