BibLaTeX: How to create NewDocumentCommand for automated Prenotes?











up vote
0
down vote

favorite












Description:



I am using a small modification to automatically add the abbreviation "cf." into citation prenotes:



renewbibmacro*{prenote}{%
iffieldundef{prenote}%
{% true
printtext{cfadddot}%
}{% false
printfield{prenote}}%
setunit{prenotedelim}%
}%


Always adding "cf." is mostly useful, but not in every case. Therefore I want to outsource this auto-prenote into a separate NewDocumentCommand. Only when typing cf-cite or cf-autocite the abbreviation should be added as a prenote.



How can I introduce that?





Minimum Working Example (MWE):



begin{filecontents}{jobname.bib}  
@book{Doe,author = {Doe, Jon},date = {1998}}
end{filecontents}

% ----------------------------------------------------------------------------------

documentclass{book}

usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
usepackage{filecontents}

setlengthparindent{0pt}

renewbibmacro*{prenote}{%
iffieldundef{prenote}%
{% true
printtext{cfadddot}%
}{% false
printfield{prenote}}%
setunit{prenotedelim}%
}%

bibliography{jobname}

begin{document}

This is a very simple example to demonstrate citing with auto-added prenotes autocite[25]{Doe}.

parbigskip As you can see, the abbreviation enquote{cf.} will always be displayed. It is not possible to keep this field empty anymore. However, this is not useful in every case. Therefore I want to generate two textbackslash NewDocumentCommand's:

begin{itemize}
item textbackslash cf-cite and
item textbackslash cf-autocite
end{itemize}

Only when using one of those two new commands, the previous mentioned enquote{cf.} should be displayed as a prenote. In all other cases the field should remain empty.

parbigskip How can I do that?

end{document}




Edit: When thinking about my previous idea that does not make big sense anymore. It does not matter if I have to write autocite[cf.][35]{Doe} or cf-autocite[35]{Doe}. :-)










share|improve this question




























    up vote
    0
    down vote

    favorite












    Description:



    I am using a small modification to automatically add the abbreviation "cf." into citation prenotes:



    renewbibmacro*{prenote}{%
    iffieldundef{prenote}%
    {% true
    printtext{cfadddot}%
    }{% false
    printfield{prenote}}%
    setunit{prenotedelim}%
    }%


    Always adding "cf." is mostly useful, but not in every case. Therefore I want to outsource this auto-prenote into a separate NewDocumentCommand. Only when typing cf-cite or cf-autocite the abbreviation should be added as a prenote.



    How can I introduce that?





    Minimum Working Example (MWE):



    begin{filecontents}{jobname.bib}  
    @book{Doe,author = {Doe, Jon},date = {1998}}
    end{filecontents}

    % ----------------------------------------------------------------------------------

    documentclass{book}

    usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
    usepackage{filecontents}

    setlengthparindent{0pt}

    renewbibmacro*{prenote}{%
    iffieldundef{prenote}%
    {% true
    printtext{cfadddot}%
    }{% false
    printfield{prenote}}%
    setunit{prenotedelim}%
    }%

    bibliography{jobname}

    begin{document}

    This is a very simple example to demonstrate citing with auto-added prenotes autocite[25]{Doe}.

    parbigskip As you can see, the abbreviation enquote{cf.} will always be displayed. It is not possible to keep this field empty anymore. However, this is not useful in every case. Therefore I want to generate two textbackslash NewDocumentCommand's:

    begin{itemize}
    item textbackslash cf-cite and
    item textbackslash cf-autocite
    end{itemize}

    Only when using one of those two new commands, the previous mentioned enquote{cf.} should be displayed as a prenote. In all other cases the field should remain empty.

    parbigskip How can I do that?

    end{document}




    Edit: When thinking about my previous idea that does not make big sense anymore. It does not matter if I have to write autocite[cf.][35]{Doe} or cf-autocite[35]{Doe}. :-)










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Description:



      I am using a small modification to automatically add the abbreviation "cf." into citation prenotes:



      renewbibmacro*{prenote}{%
      iffieldundef{prenote}%
      {% true
      printtext{cfadddot}%
      }{% false
      printfield{prenote}}%
      setunit{prenotedelim}%
      }%


      Always adding "cf." is mostly useful, but not in every case. Therefore I want to outsource this auto-prenote into a separate NewDocumentCommand. Only when typing cf-cite or cf-autocite the abbreviation should be added as a prenote.



      How can I introduce that?





      Minimum Working Example (MWE):



      begin{filecontents}{jobname.bib}  
      @book{Doe,author = {Doe, Jon},date = {1998}}
      end{filecontents}

      % ----------------------------------------------------------------------------------

      documentclass{book}

      usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
      usepackage{filecontents}

      setlengthparindent{0pt}

      renewbibmacro*{prenote}{%
      iffieldundef{prenote}%
      {% true
      printtext{cfadddot}%
      }{% false
      printfield{prenote}}%
      setunit{prenotedelim}%
      }%

      bibliography{jobname}

      begin{document}

      This is a very simple example to demonstrate citing with auto-added prenotes autocite[25]{Doe}.

      parbigskip As you can see, the abbreviation enquote{cf.} will always be displayed. It is not possible to keep this field empty anymore. However, this is not useful in every case. Therefore I want to generate two textbackslash NewDocumentCommand's:

      begin{itemize}
      item textbackslash cf-cite and
      item textbackslash cf-autocite
      end{itemize}

      Only when using one of those two new commands, the previous mentioned enquote{cf.} should be displayed as a prenote. In all other cases the field should remain empty.

      parbigskip How can I do that?

      end{document}




      Edit: When thinking about my previous idea that does not make big sense anymore. It does not matter if I have to write autocite[cf.][35]{Doe} or cf-autocite[35]{Doe}. :-)










      share|improve this question















      Description:



      I am using a small modification to automatically add the abbreviation "cf." into citation prenotes:



      renewbibmacro*{prenote}{%
      iffieldundef{prenote}%
      {% true
      printtext{cfadddot}%
      }{% false
      printfield{prenote}}%
      setunit{prenotedelim}%
      }%


      Always adding "cf." is mostly useful, but not in every case. Therefore I want to outsource this auto-prenote into a separate NewDocumentCommand. Only when typing cf-cite or cf-autocite the abbreviation should be added as a prenote.



      How can I introduce that?





      Minimum Working Example (MWE):



      begin{filecontents}{jobname.bib}  
      @book{Doe,author = {Doe, Jon},date = {1998}}
      end{filecontents}

      % ----------------------------------------------------------------------------------

      documentclass{book}

      usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
      usepackage{filecontents}

      setlengthparindent{0pt}

      renewbibmacro*{prenote}{%
      iffieldundef{prenote}%
      {% true
      printtext{cfadddot}%
      }{% false
      printfield{prenote}}%
      setunit{prenotedelim}%
      }%

      bibliography{jobname}

      begin{document}

      This is a very simple example to demonstrate citing with auto-added prenotes autocite[25]{Doe}.

      parbigskip As you can see, the abbreviation enquote{cf.} will always be displayed. It is not possible to keep this field empty anymore. However, this is not useful in every case. Therefore I want to generate two textbackslash NewDocumentCommand's:

      begin{itemize}
      item textbackslash cf-cite and
      item textbackslash cf-autocite
      end{itemize}

      Only when using one of those two new commands, the previous mentioned enquote{cf.} should be displayed as a prenote. In all other cases the field should remain empty.

      parbigskip How can I do that?

      end{document}




      Edit: When thinking about my previous idea that does not make big sense anymore. It does not matter if I have to write autocite[cf.][35]{Doe} or cf-autocite[35]{Doe}. :-)







      biblatex citing biber newdocumentcommand prenote






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 5 at 18:58

























      asked Dec 5 at 18:33









      Dave

      719516




      719516






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          This is not exactly what you asked for, but I think it is an improvement on your attempt. I do think having the prenote built in is a little over, but to have your own "outsourced" prenotes as you suggested would require quite some structure with DeclareCitationCommand for each variant of the several biblatex commands available for which you'd want this facility.



          I think your original structure would work quite well in practice, and it is easy to disable the automatic insertion of "cf." with a simple toggle.



          begin{filecontents}{jobname.bib}
          @book{Doe,author = {Doe, Jon},date = {1998}}
          end{filecontents}

          % ----------------------------------------------------------------------------------

          documentclass{book}

          usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
          usepackage{filecontents}

          setlengthparindent{0pt}

          newtoggle{nocf}
          newcommand*{nocf}{AtNextCite{toggletrue{nocf}}}

          renewbibmacro*{prenote}{%
          iffieldundef{prenote}%
          {% true
          iftoggle{nocf}{}{%
          printtext{cfadddot}%
          }%
          }{% false
          printfield{prenote}%
          }%
          setunit{prenotedelim}%
          }

          addbibresource{jobname.bib}

          begin{document}

          This is a very simple example to demonstrate citing with auto-added prenotes
          autocite[25]{Doe}.

          bigskip
          As you can see, the abbreviation “cf.” will be displayed by
          default. But it is possible to leave it empty with
          ‘verb|nocf|’ nocfautocite[34]{Doe}.

          bigskip
          However, without it, the default behavior is back autocite[29]{Doe}.

          end{document}


          enter image description here






          share|improve this answer

















          • 1




            A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
            – moewe
            Dec 5 at 20:55












          • @moewe I know, as I said "this is not exactly what you asked for"...
            – gusbrs
            Dec 5 at 21:02










          • @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
            – gusbrs
            Dec 5 at 21:04










          • Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
            – moewe
            Dec 5 at 21:14










          • @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
            – gusbrs
            Dec 5 at 21:22











          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',
          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%2f463360%2fbiblatex-how-to-create-newdocumentcommand-for-automated-prenotes%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








          up vote
          2
          down vote



          accepted










          This is not exactly what you asked for, but I think it is an improvement on your attempt. I do think having the prenote built in is a little over, but to have your own "outsourced" prenotes as you suggested would require quite some structure with DeclareCitationCommand for each variant of the several biblatex commands available for which you'd want this facility.



          I think your original structure would work quite well in practice, and it is easy to disable the automatic insertion of "cf." with a simple toggle.



          begin{filecontents}{jobname.bib}
          @book{Doe,author = {Doe, Jon},date = {1998}}
          end{filecontents}

          % ----------------------------------------------------------------------------------

          documentclass{book}

          usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
          usepackage{filecontents}

          setlengthparindent{0pt}

          newtoggle{nocf}
          newcommand*{nocf}{AtNextCite{toggletrue{nocf}}}

          renewbibmacro*{prenote}{%
          iffieldundef{prenote}%
          {% true
          iftoggle{nocf}{}{%
          printtext{cfadddot}%
          }%
          }{% false
          printfield{prenote}%
          }%
          setunit{prenotedelim}%
          }

          addbibresource{jobname.bib}

          begin{document}

          This is a very simple example to demonstrate citing with auto-added prenotes
          autocite[25]{Doe}.

          bigskip
          As you can see, the abbreviation “cf.” will be displayed by
          default. But it is possible to leave it empty with
          ‘verb|nocf|’ nocfautocite[34]{Doe}.

          bigskip
          However, without it, the default behavior is back autocite[29]{Doe}.

          end{document}


          enter image description here






          share|improve this answer

















          • 1




            A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
            – moewe
            Dec 5 at 20:55












          • @moewe I know, as I said "this is not exactly what you asked for"...
            – gusbrs
            Dec 5 at 21:02










          • @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
            – gusbrs
            Dec 5 at 21:04










          • Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
            – moewe
            Dec 5 at 21:14










          • @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
            – gusbrs
            Dec 5 at 21:22















          up vote
          2
          down vote



          accepted










          This is not exactly what you asked for, but I think it is an improvement on your attempt. I do think having the prenote built in is a little over, but to have your own "outsourced" prenotes as you suggested would require quite some structure with DeclareCitationCommand for each variant of the several biblatex commands available for which you'd want this facility.



          I think your original structure would work quite well in practice, and it is easy to disable the automatic insertion of "cf." with a simple toggle.



          begin{filecontents}{jobname.bib}
          @book{Doe,author = {Doe, Jon},date = {1998}}
          end{filecontents}

          % ----------------------------------------------------------------------------------

          documentclass{book}

          usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
          usepackage{filecontents}

          setlengthparindent{0pt}

          newtoggle{nocf}
          newcommand*{nocf}{AtNextCite{toggletrue{nocf}}}

          renewbibmacro*{prenote}{%
          iffieldundef{prenote}%
          {% true
          iftoggle{nocf}{}{%
          printtext{cfadddot}%
          }%
          }{% false
          printfield{prenote}%
          }%
          setunit{prenotedelim}%
          }

          addbibresource{jobname.bib}

          begin{document}

          This is a very simple example to demonstrate citing with auto-added prenotes
          autocite[25]{Doe}.

          bigskip
          As you can see, the abbreviation “cf.” will be displayed by
          default. But it is possible to leave it empty with
          ‘verb|nocf|’ nocfautocite[34]{Doe}.

          bigskip
          However, without it, the default behavior is back autocite[29]{Doe}.

          end{document}


          enter image description here






          share|improve this answer

















          • 1




            A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
            – moewe
            Dec 5 at 20:55












          • @moewe I know, as I said "this is not exactly what you asked for"...
            – gusbrs
            Dec 5 at 21:02










          • @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
            – gusbrs
            Dec 5 at 21:04










          • Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
            – moewe
            Dec 5 at 21:14










          • @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
            – gusbrs
            Dec 5 at 21:22













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          This is not exactly what you asked for, but I think it is an improvement on your attempt. I do think having the prenote built in is a little over, but to have your own "outsourced" prenotes as you suggested would require quite some structure with DeclareCitationCommand for each variant of the several biblatex commands available for which you'd want this facility.



          I think your original structure would work quite well in practice, and it is easy to disable the automatic insertion of "cf." with a simple toggle.



          begin{filecontents}{jobname.bib}
          @book{Doe,author = {Doe, Jon},date = {1998}}
          end{filecontents}

          % ----------------------------------------------------------------------------------

          documentclass{book}

          usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
          usepackage{filecontents}

          setlengthparindent{0pt}

          newtoggle{nocf}
          newcommand*{nocf}{AtNextCite{toggletrue{nocf}}}

          renewbibmacro*{prenote}{%
          iffieldundef{prenote}%
          {% true
          iftoggle{nocf}{}{%
          printtext{cfadddot}%
          }%
          }{% false
          printfield{prenote}%
          }%
          setunit{prenotedelim}%
          }

          addbibresource{jobname.bib}

          begin{document}

          This is a very simple example to demonstrate citing with auto-added prenotes
          autocite[25]{Doe}.

          bigskip
          As you can see, the abbreviation “cf.” will be displayed by
          default. But it is possible to leave it empty with
          ‘verb|nocf|’ nocfautocite[34]{Doe}.

          bigskip
          However, without it, the default behavior is back autocite[29]{Doe}.

          end{document}


          enter image description here






          share|improve this answer












          This is not exactly what you asked for, but I think it is an improvement on your attempt. I do think having the prenote built in is a little over, but to have your own "outsourced" prenotes as you suggested would require quite some structure with DeclareCitationCommand for each variant of the several biblatex commands available for which you'd want this facility.



          I think your original structure would work quite well in practice, and it is easy to disable the automatic insertion of "cf." with a simple toggle.



          begin{filecontents}{jobname.bib}
          @book{Doe,author = {Doe, Jon},date = {1998}}
          end{filecontents}

          % ----------------------------------------------------------------------------------

          documentclass{book}

          usepackage[backend=biber,citestyle=numeric,style=authoryear,natbib=true]{biblatex}
          usepackage{filecontents}

          setlengthparindent{0pt}

          newtoggle{nocf}
          newcommand*{nocf}{AtNextCite{toggletrue{nocf}}}

          renewbibmacro*{prenote}{%
          iffieldundef{prenote}%
          {% true
          iftoggle{nocf}{}{%
          printtext{cfadddot}%
          }%
          }{% false
          printfield{prenote}%
          }%
          setunit{prenotedelim}%
          }

          addbibresource{jobname.bib}

          begin{document}

          This is a very simple example to demonstrate citing with auto-added prenotes
          autocite[25]{Doe}.

          bigskip
          As you can see, the abbreviation “cf.” will be displayed by
          default. But it is possible to leave it empty with
          ‘verb|nocf|’ nocfautocite[34]{Doe}.

          bigskip
          However, without it, the default behavior is back autocite[29]{Doe}.

          end{document}


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 5 at 19:49









          gusbrs

          6,4942838




          6,4942838








          • 1




            A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
            – moewe
            Dec 5 at 20:55












          • @moewe I know, as I said "this is not exactly what you asked for"...
            – gusbrs
            Dec 5 at 21:02










          • @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
            – gusbrs
            Dec 5 at 21:04










          • Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
            – moewe
            Dec 5 at 21:14










          • @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
            – gusbrs
            Dec 5 at 21:22














          • 1




            A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
            – moewe
            Dec 5 at 20:55












          • @moewe I know, as I said "this is not exactly what you asked for"...
            – gusbrs
            Dec 5 at 21:02










          • @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
            – gusbrs
            Dec 5 at 21:04










          • Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
            – moewe
            Dec 5 at 21:14










          • @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
            – gusbrs
            Dec 5 at 21:22








          1




          1




          A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
          – moewe
          Dec 5 at 20:55






          A cheap way to get a nocfautocite that way is with newcommand*{nocfautocite}{nocfautocite}. (Though I think the logic was exactly the other way round in the question.)
          – moewe
          Dec 5 at 20:55














          @moewe I know, as I said "this is not exactly what you asked for"...
          – gusbrs
          Dec 5 at 21:02




          @moewe I know, as I said "this is not exactly what you asked for"...
          – gusbrs
          Dec 5 at 21:02












          @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
          – gusbrs
          Dec 5 at 21:04




          @moewe Btw, I'm gonna get a printscreen of this comment of yours before it vanishes. You suggesting a definition of a citation command with newcommand! I thought that was banned by the Gospel! ;-)
          – gusbrs
          Dec 5 at 21:04












          Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
          – moewe
          Dec 5 at 21:14




          Ah. I thought the 'not exactly what you asked for' referred to not defining a command, but using a prefix command instead. I must say that I prefer the autocite gives no "cf.", cfautocite gives "cf." rule, but as the OP realised themselves, that almost makes the exercise pointless. As to newcommand for cite commands: There are some situations like this (and the ones in blx-natbib.def) where it does make sense: Things only become problematic when people try to combine several (proto-)cite commands in one. (But of course you know that...)
          – moewe
          Dec 5 at 21:14












          @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
          – gusbrs
          Dec 5 at 21:22




          @moewe Yes I'd simply go myself with autocite[cf.][23]{Doe}. I also said I thought that the attempt was "over", but I didn't think of emphasizing that much, cause we all know: it's part of the fun too. As to newcommand I get why it's safe here, of course, but I wouldn't miss the pun, would I?
          – gusbrs
          Dec 5 at 21:22


















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f463360%2fbiblatex-how-to-create-newdocumentcommand-for-automated-prenotes%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?

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

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents