Mixing bibliographic styles in Biblatex Announcing the arrival of Valued Associate #679: Cesar...

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Can two people see the same photon?

How do you cope with tons of web fonts when copying and pasting from web pages?

How does TikZ render an arc?

Is honorific speech ever used in the first person?

Did pre-Columbian Americans know the spherical shape of the Earth?

First paper to introduce the "principal-agent problem"

Marquee sign letters

Random body shuffle every night—can we still function?

How do I say "this must not happen"?

What should one know about term logic before studying propositional and predicate logic?

How to achieve cat-like agility?

Proving that any solution to the differential equation of an oscillator can be written as a sum of sinusoids.

Does the main washing effect of soap come from foam?

What is the proper term for etching or digging of wall to hide conduit of cables

NIntegrate on a solution of a matrix ODE

Is there a verb for listening stealthily?

What helicopter has the most rotor blades?

Should man-made satellites feature an intelligent inverted "cow catcher"?

Noise in Eigenvalues plot

Does the universe have a fixed centre of mass?

How to get a flat-head nail out of a piece of wood?

How could a hydrazine and N2O4 cloud (or it's reactants) show up in weather radar?

Can gravitational waves pass through a black hole?



Mixing bibliographic styles in Biblatex



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)biblatex: multiple stylesIndependent publication list with numbered list using biblatex and refsectionbiblatex: different bibstyles in the same document?Suppressing em-dashs for recurrent authors and letter suffixes for years when using biblatex-chicagoBiblatex / Biber full citation for first occurrence onlyMultilingual bibliography using XeTeX, biblatex and polyglossiaBiblatex: 1) changing separator, 2) repeating authorBiblatex citation and bibliography misbehaving in Texmaker - help!Beginners guide for biblatex BY EXAMPLEBiblatex mla - no bibliography, no references, no nothingUnconventional bibliography style with BibLaTeXBibLaTeX: Citation Sorting with Split Bibliographies and FiltersPrinting “ibid” for biblatex-chicago authordate style












7















Biblatex allows multiple bibliographies to be printed. How do I make one bilbiography use author-year style while make another use a numerical style? I've heard that this is bad typography but I want to do it to distinguish between actual references to literature (author-year) and image credits (which I hope to do numerically).



I've read through the Biblatex documentation and it doesn't seem to help.










share|improve this question




















  • 1





    Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

    – moewe
    Apr 29 '14 at 17:34






  • 2





    I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

    – vonbrand
    Apr 29 '14 at 20:15











  • I've found a hack that solves my question, which I have posted as an answer below.

    – Herng Yi
    Apr 30 '14 at 6:28
















7















Biblatex allows multiple bibliographies to be printed. How do I make one bilbiography use author-year style while make another use a numerical style? I've heard that this is bad typography but I want to do it to distinguish between actual references to literature (author-year) and image credits (which I hope to do numerically).



I've read through the Biblatex documentation and it doesn't seem to help.










share|improve this question




















  • 1





    Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

    – moewe
    Apr 29 '14 at 17:34






  • 2





    I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

    – vonbrand
    Apr 29 '14 at 20:15











  • I've found a hack that solves my question, which I have posted as an answer below.

    – Herng Yi
    Apr 30 '14 at 6:28














7












7








7








Biblatex allows multiple bibliographies to be printed. How do I make one bilbiography use author-year style while make another use a numerical style? I've heard that this is bad typography but I want to do it to distinguish between actual references to literature (author-year) and image credits (which I hope to do numerically).



I've read through the Biblatex documentation and it doesn't seem to help.










share|improve this question
















Biblatex allows multiple bibliographies to be printed. How do I make one bilbiography use author-year style while make another use a numerical style? I've heard that this is bad typography but I want to do it to distinguish between actual references to literature (author-year) and image credits (which I hope to do numerically).



I've read through the Biblatex documentation and it doesn't seem to help.







biblatex






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 30 '14 at 6:16









lockstep

193k54594723




193k54594723










asked Apr 29 '14 at 14:15









Herng YiHerng Yi

355211




355211








  • 1





    Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

    – moewe
    Apr 29 '14 at 17:34






  • 2





    I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

    – vonbrand
    Apr 29 '14 at 20:15











  • I've found a hack that solves my question, which I have posted as an answer below.

    – Herng Yi
    Apr 30 '14 at 6:28














  • 1





    Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

    – moewe
    Apr 29 '14 at 17:34






  • 2





    I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

    – vonbrand
    Apr 29 '14 at 20:15











  • I've found a hack that solves my question, which I have posted as an answer below.

    – Herng Yi
    Apr 30 '14 at 6:28








1




1





Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

– moewe
Apr 29 '14 at 17:34





Please see biblatex: multiple styles and more recently biblatex: different bibstyles in the same document?.

– moewe
Apr 29 '14 at 17:34




2




2





I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

– vonbrand
Apr 29 '14 at 20:15





I'd look at some book that you find visually pleasing, and check how they do it (not the LaTeX source, the layout). Using different syles is just jarring, IMVHO.

– vonbrand
Apr 29 '14 at 20:15













I've found a hack that solves my question, which I have posted as an answer below.

– Herng Yi
Apr 30 '14 at 6:28





I've found a hack that solves my question, which I have posted as an answer below.

– Herng Yi
Apr 30 '14 at 6:28










2 Answers
2






active

oldest

votes


















6














After much searching on Tex.StackExchange, I put together a hack that produced this:



enter image description here



I hope my code will be of use to others who want to do something similar.



Code:



documentclass{article}
usepackage[backend=biber, %I think this should work for BibTex too, but I'm not sure.
style=authoryear, %Set author-year as the default style; later hacks will produce a fake numeric style.
defernumbers %Works together with resetnumbers so that the numbering of numeric entries is independent of the author-year citations.
]{biblatex}
addbibresource{Bibliography.bib}

%Copied from numeric.cbx to imitate numerical citations.
providebool{bbx:subentry}
newbibmacro*{citenum}{%Note: the original macro was called "cite". I did not redefine "cite", but instead defined a new macro "citenum", because the author-year citations use the "cite" macro too. "renewbibmacro*{cite}" would have caused all the author-year citations to become numeric too.
printtext[bibhyperref]{%If you ever want to use hyperref
printfield{prefixnumber}%
printfield{labelnumber}%
ifbool{bbx:subentry}
{printfield{entrysetcount}}
{}}}

%Copied from numeric.cbx to define a new numeric citation command for @online entries.
DeclareCiteCommand{conline}[mkbibbrackets]
{usebibmacro{prenote}}
{usebibmacro{citeindex}%
usebibmacro{citenum}}%Note: this was originally "cite" but I changed it to "citenum" to avoid clashes with the author-year style.
{multicitedelim}
{usebibmacro{postnote}}

begin{document}
Cite books, parencite{Book} parencite{Book2}

Cite online stuff, conline{Online} conline{Online2}

%Print the normal author-year bibliography
printbibliography[nottype=online]

%Redefine the bibliography environment to imitate the numeric citation style
defbibenvironment{bibliography}
{list
{printfield[labelnumberwidth]{labelnumber}}
{setlength{labelwidth}{labelnumberwidth}%
setlength{leftmargin}{labelwidth}%
setlength{labelsep}{biblabelsep}%
addtolength{labelsep}{1em}
addtolength{leftmargin}{labelsep}%
setlength{itemsep}{bibitemsep}%
setlength{parsep}{bibparsep}}%
renewcommand*{makelabel}[1]{hss##1}}
{endlist}
{item}
DeclareFieldFormat{labelnumberwidth}{mkbibbrackets{#1}hspace{-1.1em}}
printbibliography[type=online,title=Online,resetnumbers]
end{document}


The file Bibliography.bib contains:



@book{Book,
author = {Author},
title = {Title},
publisher = {Publisher},
year = {2014},
}

@book{Book2,
author = {Author2},
title = {Title2},
publisher = {Publisher2},
year = {2015},
}

@online{Online,
author = {Author},
title = {Title},
titleaddon = {titleaddon},
subtitle = {subtitle},
url= {http://tex.stackexchange.com/},
}

@online{Online2,
author = {Author2},
title = {Title2},
titleaddon = {titleaddon2},
subtitle = {subtitle2},
url= {http://tex.stackexchange2.com/},
}





share|improve this answer































    0














    Talking about distinguishing between literature and credits, I need something similar.



    So, an experiment: (not in mixing two styles, but in having two streams of information)



    Using an extended author-title style as a base (ext-authortitle-ibid) to make things easier, and adding photographer and photoname as fields to use in an @photo bib entrytype, and using a counter to number the cited photos in sequence and printing that number as part of the citation (with a custom photocite), and a corresponding bib driver (DeclareBibliographyDriver{photo}), and using a keyword, "photo", to split the bibliographies, and remembering to reset the photocounter to zero just before the photo bibliography prints (and to keep the photo bibliography unsorted as well (via a refcontext) so it, too, is in citation order), we get:



    image credits separate from references



    MWEB



    RequirePackage{filecontents}

    %dbx
    %bbx
    %cbx
    %lbx
    %bib
    %ist


    %:::::::::::::::::::::::::::::::::::::::::::::
    begin{filecontents*}{photo.dbx}
    DeclareDatamodelFields[type=field, datatype=literal]{
    photoname,
    photographer,
    }
    DeclareLanguageMapping{english}{english-photo}


    endinput
    end{filecontents*}
    %====================================





    %:::::::::::::::::::::::::::::::::::::::::::::
    begin{filecontents*}{photo.bbx}
    ProvidesFile{photo.bbx}[2006/04/09 v1.0 biblatex bibliography style]
    RequireBibliographyStyle{ext-authortitle-ibid}
    %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    DeclareBibliographyDriver{photo}{%
    usebibmacro{begentry}
    usebibmacro{photo-count}addspaceusebibmacro{photoby-bib}
    usebibmacro{finentry}
    }




    DeclareSortingTemplate{photosort}{
    sort{
    field{photographer}
    }
    sort{
    field{photoname}
    }
    }



    newcounter{photonum}
    setcounter{photonum}{0}
    newcommandincrphotonum{refstepcounter{photonum}}


    endinput
    end{filecontents*}
    %====================================



    %:::::::::::::::::::::::::::::::::::::::::::::
    begin{filecontents*}{photo.cbx}
    ProvidesFile{photo.cbx}[2019-04-09 v1.0 biblatex citation style]
    RequireCitationStyle{ext-authortitle-ibid}

    %~~~~~~~~~~~~~~~~~~~
    % fieldformats: photo
    DeclareFieldFormat{photoname}{mkbibquote{#1}}
    DeclareFieldFormat{photographer}{#1}


    %~~~~~~~~~~~~~~~~~~~
    % bibmacros
    %======================= photoname
    newbibmacro{getphotoname}{%
    printfield{photoname}%
    }

    %======================= photographer
    newbibmacro{getphotographer}{%
    printfield{photographer}%
    }
    %======================= photoby-caption
    newbibmacro{photoby-caption}{%
    iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
    iffieldundef{photographer}{}{addspacemkbibparens{usebibmacro{getphotographer}}}%
    }


    %======================= photoby-bib
    newbibmacro{photoby-bib}{%
    iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
    iffieldundef{photographer}{}{addcommaaddspacebibstring{photoby}addspaceusebibmacro{getphotographer}isdot}%
    }


    newbibmacro{photo-count}{%
    incrphotonummkbibbrackets{thephotonum}
    }

    %~~~~~~~~~~~~~~~~~~~
    % citecommands
    %======================= photocite
    DeclareCiteCommand{photocite}%
    %@@@@@@@@@@@@@@@@ prenote
    {%
    usebibmacro{prenote}%
    }%
    %@@@@@@@@@@@@@@@@ item
    {%
    ifentrytype{photo}%
    {%photo ==================================
    usebibmacro{photo-count}addspaceusebibmacro{photoby-caption}%
    }{}}%
    %@@@@@@@@@@@@@@@@ delim
    {}%
    %@@@@@@@@@@@@@@@@ postnote
    {%
    usebibmacro{postnote}%
    }






    endinput
    end{filecontents*}
    %====================================

    %====================================
    begin{filecontents*}{english-photo.lbx}
    ProvidesFile{english-photo.lbx}[2019/04/09 english with additions for photo citations]
    InheritBibliographyExtras{english}
    NewBibliographyString{photoby}
    DeclareBibliographyStrings{%
    inherit = {english},
    photoby = {{photo by}{photo by}},
    }

    endinput
    end{filecontents*}
    %====================================






    %====================================
    begin{filecontents*}{jobname.bib}

    @photo{ph1,
    photoname={The Woods},
    photographer={M Woods},
    keywords={photo},
    }

    @photo{ph2,
    photoname={The Sky},
    photographer={A B Skier},
    keywords={photo},
    }
    @photo{ph3,
    photoname={The Air},
    photographer={O Ayre},
    keywords={photo},
    }
    @photo{ph4,
    photoname={The Lake},
    photographer={N Lakes},
    keywords={photo},
    }
    @photo{ph5,
    photoname={The Sea},
    photographer={R Seasons},
    keywords={photo},
    }

    end{filecontents*}
    %====================================








    documentclass[12pt]{article}
    usepackage{fontspec}
    setmainfont{Noto Serif}
    usepackage[british]{babel}
    usepackage{csquotes}


    usepackage[
    style=photo,
    ]{biblatex}
    defbibnote{abibnote}{Plain bibliography}
    defbibnote{photobibnote}{List of photos}


    usepackage{xcolor}
    pagecolor{red!3}

    addbibresource{biblatex-examples.bib}
    addbibresource{jobname.bib}

    begin{document}
    section{Introduction}
    Some plain cites:
    cite{kastenholz}
    cite{vangennep}

    Some photo cites: air: photocite{ph3}, sky: photocite{ph2}, and sea: photocite{ph5}.

    printbibliography[prenote=abibnote,notkeyword=photo]


    setcounter{photonum}{0}
    newrefcontext[sorting=none]
    printbibliography[
    keyword=photo,
    title={Photos},
    prenote=photobibnote,
    ]

    begin{center}
    textemdash
    textemdash
    end{center}
    end{document}


    Being able to classify the data into categories is key: entrytype and keyword help here (and also category, for that matter). The information could even be stored in, say, the @article entrytype with appropriate use of ifentrytype and ifkeyword (manual: 4.6.2 Stand-alone Tests, at p 233). There is also an entrysubtype available, for even greater granularity.



    Printing the citations rotated sideways (and/or as part of captions) is also possible.



    On a different solution path, different bib environments (to define what gets printed as the lookup label) combined with different sorting schemes is another methodology, since bibliographies are "just" list environments.






    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%2f174229%2fmixing-bibliographic-styles-in-biblatex%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      6














      After much searching on Tex.StackExchange, I put together a hack that produced this:



      enter image description here



      I hope my code will be of use to others who want to do something similar.



      Code:



      documentclass{article}
      usepackage[backend=biber, %I think this should work for BibTex too, but I'm not sure.
      style=authoryear, %Set author-year as the default style; later hacks will produce a fake numeric style.
      defernumbers %Works together with resetnumbers so that the numbering of numeric entries is independent of the author-year citations.
      ]{biblatex}
      addbibresource{Bibliography.bib}

      %Copied from numeric.cbx to imitate numerical citations.
      providebool{bbx:subentry}
      newbibmacro*{citenum}{%Note: the original macro was called "cite". I did not redefine "cite", but instead defined a new macro "citenum", because the author-year citations use the "cite" macro too. "renewbibmacro*{cite}" would have caused all the author-year citations to become numeric too.
      printtext[bibhyperref]{%If you ever want to use hyperref
      printfield{prefixnumber}%
      printfield{labelnumber}%
      ifbool{bbx:subentry}
      {printfield{entrysetcount}}
      {}}}

      %Copied from numeric.cbx to define a new numeric citation command for @online entries.
      DeclareCiteCommand{conline}[mkbibbrackets]
      {usebibmacro{prenote}}
      {usebibmacro{citeindex}%
      usebibmacro{citenum}}%Note: this was originally "cite" but I changed it to "citenum" to avoid clashes with the author-year style.
      {multicitedelim}
      {usebibmacro{postnote}}

      begin{document}
      Cite books, parencite{Book} parencite{Book2}

      Cite online stuff, conline{Online} conline{Online2}

      %Print the normal author-year bibliography
      printbibliography[nottype=online]

      %Redefine the bibliography environment to imitate the numeric citation style
      defbibenvironment{bibliography}
      {list
      {printfield[labelnumberwidth]{labelnumber}}
      {setlength{labelwidth}{labelnumberwidth}%
      setlength{leftmargin}{labelwidth}%
      setlength{labelsep}{biblabelsep}%
      addtolength{labelsep}{1em}
      addtolength{leftmargin}{labelsep}%
      setlength{itemsep}{bibitemsep}%
      setlength{parsep}{bibparsep}}%
      renewcommand*{makelabel}[1]{hss##1}}
      {endlist}
      {item}
      DeclareFieldFormat{labelnumberwidth}{mkbibbrackets{#1}hspace{-1.1em}}
      printbibliography[type=online,title=Online,resetnumbers]
      end{document}


      The file Bibliography.bib contains:



      @book{Book,
      author = {Author},
      title = {Title},
      publisher = {Publisher},
      year = {2014},
      }

      @book{Book2,
      author = {Author2},
      title = {Title2},
      publisher = {Publisher2},
      year = {2015},
      }

      @online{Online,
      author = {Author},
      title = {Title},
      titleaddon = {titleaddon},
      subtitle = {subtitle},
      url= {http://tex.stackexchange.com/},
      }

      @online{Online2,
      author = {Author2},
      title = {Title2},
      titleaddon = {titleaddon2},
      subtitle = {subtitle2},
      url= {http://tex.stackexchange2.com/},
      }





      share|improve this answer




























        6














        After much searching on Tex.StackExchange, I put together a hack that produced this:



        enter image description here



        I hope my code will be of use to others who want to do something similar.



        Code:



        documentclass{article}
        usepackage[backend=biber, %I think this should work for BibTex too, but I'm not sure.
        style=authoryear, %Set author-year as the default style; later hacks will produce a fake numeric style.
        defernumbers %Works together with resetnumbers so that the numbering of numeric entries is independent of the author-year citations.
        ]{biblatex}
        addbibresource{Bibliography.bib}

        %Copied from numeric.cbx to imitate numerical citations.
        providebool{bbx:subentry}
        newbibmacro*{citenum}{%Note: the original macro was called "cite". I did not redefine "cite", but instead defined a new macro "citenum", because the author-year citations use the "cite" macro too. "renewbibmacro*{cite}" would have caused all the author-year citations to become numeric too.
        printtext[bibhyperref]{%If you ever want to use hyperref
        printfield{prefixnumber}%
        printfield{labelnumber}%
        ifbool{bbx:subentry}
        {printfield{entrysetcount}}
        {}}}

        %Copied from numeric.cbx to define a new numeric citation command for @online entries.
        DeclareCiteCommand{conline}[mkbibbrackets]
        {usebibmacro{prenote}}
        {usebibmacro{citeindex}%
        usebibmacro{citenum}}%Note: this was originally "cite" but I changed it to "citenum" to avoid clashes with the author-year style.
        {multicitedelim}
        {usebibmacro{postnote}}

        begin{document}
        Cite books, parencite{Book} parencite{Book2}

        Cite online stuff, conline{Online} conline{Online2}

        %Print the normal author-year bibliography
        printbibliography[nottype=online]

        %Redefine the bibliography environment to imitate the numeric citation style
        defbibenvironment{bibliography}
        {list
        {printfield[labelnumberwidth]{labelnumber}}
        {setlength{labelwidth}{labelnumberwidth}%
        setlength{leftmargin}{labelwidth}%
        setlength{labelsep}{biblabelsep}%
        addtolength{labelsep}{1em}
        addtolength{leftmargin}{labelsep}%
        setlength{itemsep}{bibitemsep}%
        setlength{parsep}{bibparsep}}%
        renewcommand*{makelabel}[1]{hss##1}}
        {endlist}
        {item}
        DeclareFieldFormat{labelnumberwidth}{mkbibbrackets{#1}hspace{-1.1em}}
        printbibliography[type=online,title=Online,resetnumbers]
        end{document}


        The file Bibliography.bib contains:



        @book{Book,
        author = {Author},
        title = {Title},
        publisher = {Publisher},
        year = {2014},
        }

        @book{Book2,
        author = {Author2},
        title = {Title2},
        publisher = {Publisher2},
        year = {2015},
        }

        @online{Online,
        author = {Author},
        title = {Title},
        titleaddon = {titleaddon},
        subtitle = {subtitle},
        url= {http://tex.stackexchange.com/},
        }

        @online{Online2,
        author = {Author2},
        title = {Title2},
        titleaddon = {titleaddon2},
        subtitle = {subtitle2},
        url= {http://tex.stackexchange2.com/},
        }





        share|improve this answer


























          6












          6








          6







          After much searching on Tex.StackExchange, I put together a hack that produced this:



          enter image description here



          I hope my code will be of use to others who want to do something similar.



          Code:



          documentclass{article}
          usepackage[backend=biber, %I think this should work for BibTex too, but I'm not sure.
          style=authoryear, %Set author-year as the default style; later hacks will produce a fake numeric style.
          defernumbers %Works together with resetnumbers so that the numbering of numeric entries is independent of the author-year citations.
          ]{biblatex}
          addbibresource{Bibliography.bib}

          %Copied from numeric.cbx to imitate numerical citations.
          providebool{bbx:subentry}
          newbibmacro*{citenum}{%Note: the original macro was called "cite". I did not redefine "cite", but instead defined a new macro "citenum", because the author-year citations use the "cite" macro too. "renewbibmacro*{cite}" would have caused all the author-year citations to become numeric too.
          printtext[bibhyperref]{%If you ever want to use hyperref
          printfield{prefixnumber}%
          printfield{labelnumber}%
          ifbool{bbx:subentry}
          {printfield{entrysetcount}}
          {}}}

          %Copied from numeric.cbx to define a new numeric citation command for @online entries.
          DeclareCiteCommand{conline}[mkbibbrackets]
          {usebibmacro{prenote}}
          {usebibmacro{citeindex}%
          usebibmacro{citenum}}%Note: this was originally "cite" but I changed it to "citenum" to avoid clashes with the author-year style.
          {multicitedelim}
          {usebibmacro{postnote}}

          begin{document}
          Cite books, parencite{Book} parencite{Book2}

          Cite online stuff, conline{Online} conline{Online2}

          %Print the normal author-year bibliography
          printbibliography[nottype=online]

          %Redefine the bibliography environment to imitate the numeric citation style
          defbibenvironment{bibliography}
          {list
          {printfield[labelnumberwidth]{labelnumber}}
          {setlength{labelwidth}{labelnumberwidth}%
          setlength{leftmargin}{labelwidth}%
          setlength{labelsep}{biblabelsep}%
          addtolength{labelsep}{1em}
          addtolength{leftmargin}{labelsep}%
          setlength{itemsep}{bibitemsep}%
          setlength{parsep}{bibparsep}}%
          renewcommand*{makelabel}[1]{hss##1}}
          {endlist}
          {item}
          DeclareFieldFormat{labelnumberwidth}{mkbibbrackets{#1}hspace{-1.1em}}
          printbibliography[type=online,title=Online,resetnumbers]
          end{document}


          The file Bibliography.bib contains:



          @book{Book,
          author = {Author},
          title = {Title},
          publisher = {Publisher},
          year = {2014},
          }

          @book{Book2,
          author = {Author2},
          title = {Title2},
          publisher = {Publisher2},
          year = {2015},
          }

          @online{Online,
          author = {Author},
          title = {Title},
          titleaddon = {titleaddon},
          subtitle = {subtitle},
          url= {http://tex.stackexchange.com/},
          }

          @online{Online2,
          author = {Author2},
          title = {Title2},
          titleaddon = {titleaddon2},
          subtitle = {subtitle2},
          url= {http://tex.stackexchange2.com/},
          }





          share|improve this answer













          After much searching on Tex.StackExchange, I put together a hack that produced this:



          enter image description here



          I hope my code will be of use to others who want to do something similar.



          Code:



          documentclass{article}
          usepackage[backend=biber, %I think this should work for BibTex too, but I'm not sure.
          style=authoryear, %Set author-year as the default style; later hacks will produce a fake numeric style.
          defernumbers %Works together with resetnumbers so that the numbering of numeric entries is independent of the author-year citations.
          ]{biblatex}
          addbibresource{Bibliography.bib}

          %Copied from numeric.cbx to imitate numerical citations.
          providebool{bbx:subentry}
          newbibmacro*{citenum}{%Note: the original macro was called "cite". I did not redefine "cite", but instead defined a new macro "citenum", because the author-year citations use the "cite" macro too. "renewbibmacro*{cite}" would have caused all the author-year citations to become numeric too.
          printtext[bibhyperref]{%If you ever want to use hyperref
          printfield{prefixnumber}%
          printfield{labelnumber}%
          ifbool{bbx:subentry}
          {printfield{entrysetcount}}
          {}}}

          %Copied from numeric.cbx to define a new numeric citation command for @online entries.
          DeclareCiteCommand{conline}[mkbibbrackets]
          {usebibmacro{prenote}}
          {usebibmacro{citeindex}%
          usebibmacro{citenum}}%Note: this was originally "cite" but I changed it to "citenum" to avoid clashes with the author-year style.
          {multicitedelim}
          {usebibmacro{postnote}}

          begin{document}
          Cite books, parencite{Book} parencite{Book2}

          Cite online stuff, conline{Online} conline{Online2}

          %Print the normal author-year bibliography
          printbibliography[nottype=online]

          %Redefine the bibliography environment to imitate the numeric citation style
          defbibenvironment{bibliography}
          {list
          {printfield[labelnumberwidth]{labelnumber}}
          {setlength{labelwidth}{labelnumberwidth}%
          setlength{leftmargin}{labelwidth}%
          setlength{labelsep}{biblabelsep}%
          addtolength{labelsep}{1em}
          addtolength{leftmargin}{labelsep}%
          setlength{itemsep}{bibitemsep}%
          setlength{parsep}{bibparsep}}%
          renewcommand*{makelabel}[1]{hss##1}}
          {endlist}
          {item}
          DeclareFieldFormat{labelnumberwidth}{mkbibbrackets{#1}hspace{-1.1em}}
          printbibliography[type=online,title=Online,resetnumbers]
          end{document}


          The file Bibliography.bib contains:



          @book{Book,
          author = {Author},
          title = {Title},
          publisher = {Publisher},
          year = {2014},
          }

          @book{Book2,
          author = {Author2},
          title = {Title2},
          publisher = {Publisher2},
          year = {2015},
          }

          @online{Online,
          author = {Author},
          title = {Title},
          titleaddon = {titleaddon},
          subtitle = {subtitle},
          url= {http://tex.stackexchange.com/},
          }

          @online{Online2,
          author = {Author2},
          title = {Title2},
          titleaddon = {titleaddon2},
          subtitle = {subtitle2},
          url= {http://tex.stackexchange2.com/},
          }






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 30 '14 at 6:00









          Herng YiHerng Yi

          355211




          355211























              0














              Talking about distinguishing between literature and credits, I need something similar.



              So, an experiment: (not in mixing two styles, but in having two streams of information)



              Using an extended author-title style as a base (ext-authortitle-ibid) to make things easier, and adding photographer and photoname as fields to use in an @photo bib entrytype, and using a counter to number the cited photos in sequence and printing that number as part of the citation (with a custom photocite), and a corresponding bib driver (DeclareBibliographyDriver{photo}), and using a keyword, "photo", to split the bibliographies, and remembering to reset the photocounter to zero just before the photo bibliography prints (and to keep the photo bibliography unsorted as well (via a refcontext) so it, too, is in citation order), we get:



              image credits separate from references



              MWEB



              RequirePackage{filecontents}

              %dbx
              %bbx
              %cbx
              %lbx
              %bib
              %ist


              %:::::::::::::::::::::::::::::::::::::::::::::
              begin{filecontents*}{photo.dbx}
              DeclareDatamodelFields[type=field, datatype=literal]{
              photoname,
              photographer,
              }
              DeclareLanguageMapping{english}{english-photo}


              endinput
              end{filecontents*}
              %====================================





              %:::::::::::::::::::::::::::::::::::::::::::::
              begin{filecontents*}{photo.bbx}
              ProvidesFile{photo.bbx}[2006/04/09 v1.0 biblatex bibliography style]
              RequireBibliographyStyle{ext-authortitle-ibid}
              %
              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              DeclareBibliographyDriver{photo}{%
              usebibmacro{begentry}
              usebibmacro{photo-count}addspaceusebibmacro{photoby-bib}
              usebibmacro{finentry}
              }




              DeclareSortingTemplate{photosort}{
              sort{
              field{photographer}
              }
              sort{
              field{photoname}
              }
              }



              newcounter{photonum}
              setcounter{photonum}{0}
              newcommandincrphotonum{refstepcounter{photonum}}


              endinput
              end{filecontents*}
              %====================================



              %:::::::::::::::::::::::::::::::::::::::::::::
              begin{filecontents*}{photo.cbx}
              ProvidesFile{photo.cbx}[2019-04-09 v1.0 biblatex citation style]
              RequireCitationStyle{ext-authortitle-ibid}

              %~~~~~~~~~~~~~~~~~~~
              % fieldformats: photo
              DeclareFieldFormat{photoname}{mkbibquote{#1}}
              DeclareFieldFormat{photographer}{#1}


              %~~~~~~~~~~~~~~~~~~~
              % bibmacros
              %======================= photoname
              newbibmacro{getphotoname}{%
              printfield{photoname}%
              }

              %======================= photographer
              newbibmacro{getphotographer}{%
              printfield{photographer}%
              }
              %======================= photoby-caption
              newbibmacro{photoby-caption}{%
              iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
              iffieldundef{photographer}{}{addspacemkbibparens{usebibmacro{getphotographer}}}%
              }


              %======================= photoby-bib
              newbibmacro{photoby-bib}{%
              iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
              iffieldundef{photographer}{}{addcommaaddspacebibstring{photoby}addspaceusebibmacro{getphotographer}isdot}%
              }


              newbibmacro{photo-count}{%
              incrphotonummkbibbrackets{thephotonum}
              }

              %~~~~~~~~~~~~~~~~~~~
              % citecommands
              %======================= photocite
              DeclareCiteCommand{photocite}%
              %@@@@@@@@@@@@@@@@ prenote
              {%
              usebibmacro{prenote}%
              }%
              %@@@@@@@@@@@@@@@@ item
              {%
              ifentrytype{photo}%
              {%photo ==================================
              usebibmacro{photo-count}addspaceusebibmacro{photoby-caption}%
              }{}}%
              %@@@@@@@@@@@@@@@@ delim
              {}%
              %@@@@@@@@@@@@@@@@ postnote
              {%
              usebibmacro{postnote}%
              }






              endinput
              end{filecontents*}
              %====================================

              %====================================
              begin{filecontents*}{english-photo.lbx}
              ProvidesFile{english-photo.lbx}[2019/04/09 english with additions for photo citations]
              InheritBibliographyExtras{english}
              NewBibliographyString{photoby}
              DeclareBibliographyStrings{%
              inherit = {english},
              photoby = {{photo by}{photo by}},
              }

              endinput
              end{filecontents*}
              %====================================






              %====================================
              begin{filecontents*}{jobname.bib}

              @photo{ph1,
              photoname={The Woods},
              photographer={M Woods},
              keywords={photo},
              }

              @photo{ph2,
              photoname={The Sky},
              photographer={A B Skier},
              keywords={photo},
              }
              @photo{ph3,
              photoname={The Air},
              photographer={O Ayre},
              keywords={photo},
              }
              @photo{ph4,
              photoname={The Lake},
              photographer={N Lakes},
              keywords={photo},
              }
              @photo{ph5,
              photoname={The Sea},
              photographer={R Seasons},
              keywords={photo},
              }

              end{filecontents*}
              %====================================








              documentclass[12pt]{article}
              usepackage{fontspec}
              setmainfont{Noto Serif}
              usepackage[british]{babel}
              usepackage{csquotes}


              usepackage[
              style=photo,
              ]{biblatex}
              defbibnote{abibnote}{Plain bibliography}
              defbibnote{photobibnote}{List of photos}


              usepackage{xcolor}
              pagecolor{red!3}

              addbibresource{biblatex-examples.bib}
              addbibresource{jobname.bib}

              begin{document}
              section{Introduction}
              Some plain cites:
              cite{kastenholz}
              cite{vangennep}

              Some photo cites: air: photocite{ph3}, sky: photocite{ph2}, and sea: photocite{ph5}.

              printbibliography[prenote=abibnote,notkeyword=photo]


              setcounter{photonum}{0}
              newrefcontext[sorting=none]
              printbibliography[
              keyword=photo,
              title={Photos},
              prenote=photobibnote,
              ]

              begin{center}
              textemdash
              textemdash
              end{center}
              end{document}


              Being able to classify the data into categories is key: entrytype and keyword help here (and also category, for that matter). The information could even be stored in, say, the @article entrytype with appropriate use of ifentrytype and ifkeyword (manual: 4.6.2 Stand-alone Tests, at p 233). There is also an entrysubtype available, for even greater granularity.



              Printing the citations rotated sideways (and/or as part of captions) is also possible.



              On a different solution path, different bib environments (to define what gets printed as the lookup label) combined with different sorting schemes is another methodology, since bibliographies are "just" list environments.






              share|improve this answer




























                0














                Talking about distinguishing between literature and credits, I need something similar.



                So, an experiment: (not in mixing two styles, but in having two streams of information)



                Using an extended author-title style as a base (ext-authortitle-ibid) to make things easier, and adding photographer and photoname as fields to use in an @photo bib entrytype, and using a counter to number the cited photos in sequence and printing that number as part of the citation (with a custom photocite), and a corresponding bib driver (DeclareBibliographyDriver{photo}), and using a keyword, "photo", to split the bibliographies, and remembering to reset the photocounter to zero just before the photo bibliography prints (and to keep the photo bibliography unsorted as well (via a refcontext) so it, too, is in citation order), we get:



                image credits separate from references



                MWEB



                RequirePackage{filecontents}

                %dbx
                %bbx
                %cbx
                %lbx
                %bib
                %ist


                %:::::::::::::::::::::::::::::::::::::::::::::
                begin{filecontents*}{photo.dbx}
                DeclareDatamodelFields[type=field, datatype=literal]{
                photoname,
                photographer,
                }
                DeclareLanguageMapping{english}{english-photo}


                endinput
                end{filecontents*}
                %====================================





                %:::::::::::::::::::::::::::::::::::::::::::::
                begin{filecontents*}{photo.bbx}
                ProvidesFile{photo.bbx}[2006/04/09 v1.0 biblatex bibliography style]
                RequireBibliographyStyle{ext-authortitle-ibid}
                %
                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                DeclareBibliographyDriver{photo}{%
                usebibmacro{begentry}
                usebibmacro{photo-count}addspaceusebibmacro{photoby-bib}
                usebibmacro{finentry}
                }




                DeclareSortingTemplate{photosort}{
                sort{
                field{photographer}
                }
                sort{
                field{photoname}
                }
                }



                newcounter{photonum}
                setcounter{photonum}{0}
                newcommandincrphotonum{refstepcounter{photonum}}


                endinput
                end{filecontents*}
                %====================================



                %:::::::::::::::::::::::::::::::::::::::::::::
                begin{filecontents*}{photo.cbx}
                ProvidesFile{photo.cbx}[2019-04-09 v1.0 biblatex citation style]
                RequireCitationStyle{ext-authortitle-ibid}

                %~~~~~~~~~~~~~~~~~~~
                % fieldformats: photo
                DeclareFieldFormat{photoname}{mkbibquote{#1}}
                DeclareFieldFormat{photographer}{#1}


                %~~~~~~~~~~~~~~~~~~~
                % bibmacros
                %======================= photoname
                newbibmacro{getphotoname}{%
                printfield{photoname}%
                }

                %======================= photographer
                newbibmacro{getphotographer}{%
                printfield{photographer}%
                }
                %======================= photoby-caption
                newbibmacro{photoby-caption}{%
                iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                iffieldundef{photographer}{}{addspacemkbibparens{usebibmacro{getphotographer}}}%
                }


                %======================= photoby-bib
                newbibmacro{photoby-bib}{%
                iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                iffieldundef{photographer}{}{addcommaaddspacebibstring{photoby}addspaceusebibmacro{getphotographer}isdot}%
                }


                newbibmacro{photo-count}{%
                incrphotonummkbibbrackets{thephotonum}
                }

                %~~~~~~~~~~~~~~~~~~~
                % citecommands
                %======================= photocite
                DeclareCiteCommand{photocite}%
                %@@@@@@@@@@@@@@@@ prenote
                {%
                usebibmacro{prenote}%
                }%
                %@@@@@@@@@@@@@@@@ item
                {%
                ifentrytype{photo}%
                {%photo ==================================
                usebibmacro{photo-count}addspaceusebibmacro{photoby-caption}%
                }{}}%
                %@@@@@@@@@@@@@@@@ delim
                {}%
                %@@@@@@@@@@@@@@@@ postnote
                {%
                usebibmacro{postnote}%
                }






                endinput
                end{filecontents*}
                %====================================

                %====================================
                begin{filecontents*}{english-photo.lbx}
                ProvidesFile{english-photo.lbx}[2019/04/09 english with additions for photo citations]
                InheritBibliographyExtras{english}
                NewBibliographyString{photoby}
                DeclareBibliographyStrings{%
                inherit = {english},
                photoby = {{photo by}{photo by}},
                }

                endinput
                end{filecontents*}
                %====================================






                %====================================
                begin{filecontents*}{jobname.bib}

                @photo{ph1,
                photoname={The Woods},
                photographer={M Woods},
                keywords={photo},
                }

                @photo{ph2,
                photoname={The Sky},
                photographer={A B Skier},
                keywords={photo},
                }
                @photo{ph3,
                photoname={The Air},
                photographer={O Ayre},
                keywords={photo},
                }
                @photo{ph4,
                photoname={The Lake},
                photographer={N Lakes},
                keywords={photo},
                }
                @photo{ph5,
                photoname={The Sea},
                photographer={R Seasons},
                keywords={photo},
                }

                end{filecontents*}
                %====================================








                documentclass[12pt]{article}
                usepackage{fontspec}
                setmainfont{Noto Serif}
                usepackage[british]{babel}
                usepackage{csquotes}


                usepackage[
                style=photo,
                ]{biblatex}
                defbibnote{abibnote}{Plain bibliography}
                defbibnote{photobibnote}{List of photos}


                usepackage{xcolor}
                pagecolor{red!3}

                addbibresource{biblatex-examples.bib}
                addbibresource{jobname.bib}

                begin{document}
                section{Introduction}
                Some plain cites:
                cite{kastenholz}
                cite{vangennep}

                Some photo cites: air: photocite{ph3}, sky: photocite{ph2}, and sea: photocite{ph5}.

                printbibliography[prenote=abibnote,notkeyword=photo]


                setcounter{photonum}{0}
                newrefcontext[sorting=none]
                printbibliography[
                keyword=photo,
                title={Photos},
                prenote=photobibnote,
                ]

                begin{center}
                textemdash
                textemdash
                end{center}
                end{document}


                Being able to classify the data into categories is key: entrytype and keyword help here (and also category, for that matter). The information could even be stored in, say, the @article entrytype with appropriate use of ifentrytype and ifkeyword (manual: 4.6.2 Stand-alone Tests, at p 233). There is also an entrysubtype available, for even greater granularity.



                Printing the citations rotated sideways (and/or as part of captions) is also possible.



                On a different solution path, different bib environments (to define what gets printed as the lookup label) combined with different sorting schemes is another methodology, since bibliographies are "just" list environments.






                share|improve this answer


























                  0












                  0








                  0







                  Talking about distinguishing between literature and credits, I need something similar.



                  So, an experiment: (not in mixing two styles, but in having two streams of information)



                  Using an extended author-title style as a base (ext-authortitle-ibid) to make things easier, and adding photographer and photoname as fields to use in an @photo bib entrytype, and using a counter to number the cited photos in sequence and printing that number as part of the citation (with a custom photocite), and a corresponding bib driver (DeclareBibliographyDriver{photo}), and using a keyword, "photo", to split the bibliographies, and remembering to reset the photocounter to zero just before the photo bibliography prints (and to keep the photo bibliography unsorted as well (via a refcontext) so it, too, is in citation order), we get:



                  image credits separate from references



                  MWEB



                  RequirePackage{filecontents}

                  %dbx
                  %bbx
                  %cbx
                  %lbx
                  %bib
                  %ist


                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.dbx}
                  DeclareDatamodelFields[type=field, datatype=literal]{
                  photoname,
                  photographer,
                  }
                  DeclareLanguageMapping{english}{english-photo}


                  endinput
                  end{filecontents*}
                  %====================================





                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.bbx}
                  ProvidesFile{photo.bbx}[2006/04/09 v1.0 biblatex bibliography style]
                  RequireBibliographyStyle{ext-authortitle-ibid}
                  %
                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                  DeclareBibliographyDriver{photo}{%
                  usebibmacro{begentry}
                  usebibmacro{photo-count}addspaceusebibmacro{photoby-bib}
                  usebibmacro{finentry}
                  }




                  DeclareSortingTemplate{photosort}{
                  sort{
                  field{photographer}
                  }
                  sort{
                  field{photoname}
                  }
                  }



                  newcounter{photonum}
                  setcounter{photonum}{0}
                  newcommandincrphotonum{refstepcounter{photonum}}


                  endinput
                  end{filecontents*}
                  %====================================



                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.cbx}
                  ProvidesFile{photo.cbx}[2019-04-09 v1.0 biblatex citation style]
                  RequireCitationStyle{ext-authortitle-ibid}

                  %~~~~~~~~~~~~~~~~~~~
                  % fieldformats: photo
                  DeclareFieldFormat{photoname}{mkbibquote{#1}}
                  DeclareFieldFormat{photographer}{#1}


                  %~~~~~~~~~~~~~~~~~~~
                  % bibmacros
                  %======================= photoname
                  newbibmacro{getphotoname}{%
                  printfield{photoname}%
                  }

                  %======================= photographer
                  newbibmacro{getphotographer}{%
                  printfield{photographer}%
                  }
                  %======================= photoby-caption
                  newbibmacro{photoby-caption}{%
                  iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                  iffieldundef{photographer}{}{addspacemkbibparens{usebibmacro{getphotographer}}}%
                  }


                  %======================= photoby-bib
                  newbibmacro{photoby-bib}{%
                  iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                  iffieldundef{photographer}{}{addcommaaddspacebibstring{photoby}addspaceusebibmacro{getphotographer}isdot}%
                  }


                  newbibmacro{photo-count}{%
                  incrphotonummkbibbrackets{thephotonum}
                  }

                  %~~~~~~~~~~~~~~~~~~~
                  % citecommands
                  %======================= photocite
                  DeclareCiteCommand{photocite}%
                  %@@@@@@@@@@@@@@@@ prenote
                  {%
                  usebibmacro{prenote}%
                  }%
                  %@@@@@@@@@@@@@@@@ item
                  {%
                  ifentrytype{photo}%
                  {%photo ==================================
                  usebibmacro{photo-count}addspaceusebibmacro{photoby-caption}%
                  }{}}%
                  %@@@@@@@@@@@@@@@@ delim
                  {}%
                  %@@@@@@@@@@@@@@@@ postnote
                  {%
                  usebibmacro{postnote}%
                  }






                  endinput
                  end{filecontents*}
                  %====================================

                  %====================================
                  begin{filecontents*}{english-photo.lbx}
                  ProvidesFile{english-photo.lbx}[2019/04/09 english with additions for photo citations]
                  InheritBibliographyExtras{english}
                  NewBibliographyString{photoby}
                  DeclareBibliographyStrings{%
                  inherit = {english},
                  photoby = {{photo by}{photo by}},
                  }

                  endinput
                  end{filecontents*}
                  %====================================






                  %====================================
                  begin{filecontents*}{jobname.bib}

                  @photo{ph1,
                  photoname={The Woods},
                  photographer={M Woods},
                  keywords={photo},
                  }

                  @photo{ph2,
                  photoname={The Sky},
                  photographer={A B Skier},
                  keywords={photo},
                  }
                  @photo{ph3,
                  photoname={The Air},
                  photographer={O Ayre},
                  keywords={photo},
                  }
                  @photo{ph4,
                  photoname={The Lake},
                  photographer={N Lakes},
                  keywords={photo},
                  }
                  @photo{ph5,
                  photoname={The Sea},
                  photographer={R Seasons},
                  keywords={photo},
                  }

                  end{filecontents*}
                  %====================================








                  documentclass[12pt]{article}
                  usepackage{fontspec}
                  setmainfont{Noto Serif}
                  usepackage[british]{babel}
                  usepackage{csquotes}


                  usepackage[
                  style=photo,
                  ]{biblatex}
                  defbibnote{abibnote}{Plain bibliography}
                  defbibnote{photobibnote}{List of photos}


                  usepackage{xcolor}
                  pagecolor{red!3}

                  addbibresource{biblatex-examples.bib}
                  addbibresource{jobname.bib}

                  begin{document}
                  section{Introduction}
                  Some plain cites:
                  cite{kastenholz}
                  cite{vangennep}

                  Some photo cites: air: photocite{ph3}, sky: photocite{ph2}, and sea: photocite{ph5}.

                  printbibliography[prenote=abibnote,notkeyword=photo]


                  setcounter{photonum}{0}
                  newrefcontext[sorting=none]
                  printbibliography[
                  keyword=photo,
                  title={Photos},
                  prenote=photobibnote,
                  ]

                  begin{center}
                  textemdash
                  textemdash
                  end{center}
                  end{document}


                  Being able to classify the data into categories is key: entrytype and keyword help here (and also category, for that matter). The information could even be stored in, say, the @article entrytype with appropriate use of ifentrytype and ifkeyword (manual: 4.6.2 Stand-alone Tests, at p 233). There is also an entrysubtype available, for even greater granularity.



                  Printing the citations rotated sideways (and/or as part of captions) is also possible.



                  On a different solution path, different bib environments (to define what gets printed as the lookup label) combined with different sorting schemes is another methodology, since bibliographies are "just" list environments.






                  share|improve this answer













                  Talking about distinguishing between literature and credits, I need something similar.



                  So, an experiment: (not in mixing two styles, but in having two streams of information)



                  Using an extended author-title style as a base (ext-authortitle-ibid) to make things easier, and adding photographer and photoname as fields to use in an @photo bib entrytype, and using a counter to number the cited photos in sequence and printing that number as part of the citation (with a custom photocite), and a corresponding bib driver (DeclareBibliographyDriver{photo}), and using a keyword, "photo", to split the bibliographies, and remembering to reset the photocounter to zero just before the photo bibliography prints (and to keep the photo bibliography unsorted as well (via a refcontext) so it, too, is in citation order), we get:



                  image credits separate from references



                  MWEB



                  RequirePackage{filecontents}

                  %dbx
                  %bbx
                  %cbx
                  %lbx
                  %bib
                  %ist


                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.dbx}
                  DeclareDatamodelFields[type=field, datatype=literal]{
                  photoname,
                  photographer,
                  }
                  DeclareLanguageMapping{english}{english-photo}


                  endinput
                  end{filecontents*}
                  %====================================





                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.bbx}
                  ProvidesFile{photo.bbx}[2006/04/09 v1.0 biblatex bibliography style]
                  RequireBibliographyStyle{ext-authortitle-ibid}
                  %
                  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                  DeclareBibliographyDriver{photo}{%
                  usebibmacro{begentry}
                  usebibmacro{photo-count}addspaceusebibmacro{photoby-bib}
                  usebibmacro{finentry}
                  }




                  DeclareSortingTemplate{photosort}{
                  sort{
                  field{photographer}
                  }
                  sort{
                  field{photoname}
                  }
                  }



                  newcounter{photonum}
                  setcounter{photonum}{0}
                  newcommandincrphotonum{refstepcounter{photonum}}


                  endinput
                  end{filecontents*}
                  %====================================



                  %:::::::::::::::::::::::::::::::::::::::::::::
                  begin{filecontents*}{photo.cbx}
                  ProvidesFile{photo.cbx}[2019-04-09 v1.0 biblatex citation style]
                  RequireCitationStyle{ext-authortitle-ibid}

                  %~~~~~~~~~~~~~~~~~~~
                  % fieldformats: photo
                  DeclareFieldFormat{photoname}{mkbibquote{#1}}
                  DeclareFieldFormat{photographer}{#1}


                  %~~~~~~~~~~~~~~~~~~~
                  % bibmacros
                  %======================= photoname
                  newbibmacro{getphotoname}{%
                  printfield{photoname}%
                  }

                  %======================= photographer
                  newbibmacro{getphotographer}{%
                  printfield{photographer}%
                  }
                  %======================= photoby-caption
                  newbibmacro{photoby-caption}{%
                  iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                  iffieldundef{photographer}{}{addspacemkbibparens{usebibmacro{getphotographer}}}%
                  }


                  %======================= photoby-bib
                  newbibmacro{photoby-bib}{%
                  iffieldundef{photoname}{}{usebibmacro{getphotoname}}%
                  iffieldundef{photographer}{}{addcommaaddspacebibstring{photoby}addspaceusebibmacro{getphotographer}isdot}%
                  }


                  newbibmacro{photo-count}{%
                  incrphotonummkbibbrackets{thephotonum}
                  }

                  %~~~~~~~~~~~~~~~~~~~
                  % citecommands
                  %======================= photocite
                  DeclareCiteCommand{photocite}%
                  %@@@@@@@@@@@@@@@@ prenote
                  {%
                  usebibmacro{prenote}%
                  }%
                  %@@@@@@@@@@@@@@@@ item
                  {%
                  ifentrytype{photo}%
                  {%photo ==================================
                  usebibmacro{photo-count}addspaceusebibmacro{photoby-caption}%
                  }{}}%
                  %@@@@@@@@@@@@@@@@ delim
                  {}%
                  %@@@@@@@@@@@@@@@@ postnote
                  {%
                  usebibmacro{postnote}%
                  }






                  endinput
                  end{filecontents*}
                  %====================================

                  %====================================
                  begin{filecontents*}{english-photo.lbx}
                  ProvidesFile{english-photo.lbx}[2019/04/09 english with additions for photo citations]
                  InheritBibliographyExtras{english}
                  NewBibliographyString{photoby}
                  DeclareBibliographyStrings{%
                  inherit = {english},
                  photoby = {{photo by}{photo by}},
                  }

                  endinput
                  end{filecontents*}
                  %====================================






                  %====================================
                  begin{filecontents*}{jobname.bib}

                  @photo{ph1,
                  photoname={The Woods},
                  photographer={M Woods},
                  keywords={photo},
                  }

                  @photo{ph2,
                  photoname={The Sky},
                  photographer={A B Skier},
                  keywords={photo},
                  }
                  @photo{ph3,
                  photoname={The Air},
                  photographer={O Ayre},
                  keywords={photo},
                  }
                  @photo{ph4,
                  photoname={The Lake},
                  photographer={N Lakes},
                  keywords={photo},
                  }
                  @photo{ph5,
                  photoname={The Sea},
                  photographer={R Seasons},
                  keywords={photo},
                  }

                  end{filecontents*}
                  %====================================








                  documentclass[12pt]{article}
                  usepackage{fontspec}
                  setmainfont{Noto Serif}
                  usepackage[british]{babel}
                  usepackage{csquotes}


                  usepackage[
                  style=photo,
                  ]{biblatex}
                  defbibnote{abibnote}{Plain bibliography}
                  defbibnote{photobibnote}{List of photos}


                  usepackage{xcolor}
                  pagecolor{red!3}

                  addbibresource{biblatex-examples.bib}
                  addbibresource{jobname.bib}

                  begin{document}
                  section{Introduction}
                  Some plain cites:
                  cite{kastenholz}
                  cite{vangennep}

                  Some photo cites: air: photocite{ph3}, sky: photocite{ph2}, and sea: photocite{ph5}.

                  printbibliography[prenote=abibnote,notkeyword=photo]


                  setcounter{photonum}{0}
                  newrefcontext[sorting=none]
                  printbibliography[
                  keyword=photo,
                  title={Photos},
                  prenote=photobibnote,
                  ]

                  begin{center}
                  textemdash
                  textemdash
                  end{center}
                  end{document}


                  Being able to classify the data into categories is key: entrytype and keyword help here (and also category, for that matter). The information could even be stored in, say, the @article entrytype with appropriate use of ifentrytype and ifkeyword (manual: 4.6.2 Stand-alone Tests, at p 233). There is also an entrysubtype available, for even greater granularity.



                  Printing the citations rotated sideways (and/or as part of captions) is also possible.



                  On a different solution path, different bib environments (to define what gets printed as the lookup label) combined with different sorting schemes is another methodology, since bibliographies are "just" list environments.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 20 mins ago









                  CicadaCicada

                  765




                  765






























                      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%2f174229%2fmixing-bibliographic-styles-in-biblatex%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

                      Paper upload error, “Upload failed: The top margin is 0.715 in on page 3, which is below the required...

                      Emraan Hashmi Filmografia | Linki zewnętrzne | Menu nawigacyjneGulshan GroverGulshan...

                      How can I write this formula?newline and italics added with leqWhy does widehat behave differently if I...