1

I am trying to use this code to order my references by author. I am on TeXworks and I am using Biber at the moment.I want to list all refernces with the author Weber in it.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[style=alphabetic,maxnames=6,natbib=true,backend=biber]{biblatex}
%\bibliography{biblatex-examples}
\addbibresource{bibpractice.bib}

\begin{document}
\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=author,
            match=Weber,
            final]
      \step[fieldset=keywords, fieldvalue=weber]
    }
  }
}

\printbibliography[keyword=weber]
\printbibliography[notkeyword=weber]
\end{document}

This is the error I get:

INFO - This is Biber 2.7 INFO - Logfile is 'biberpractice.blg' ERROR - Cannot find control file 'biberpractice.bcf'! - did you pass the "backend=biber" option to BibLaTeX? INFO - ERRORS: 1

  • 2
    What bibliography package and style are you using? As far as I am aware this is only supported by biblatex with Biber (maybe also with BibTeX as backend, but Biber is preferred). We need to see an MWE/MWEB. Can you explain in more detail why you need this feature? I don't see what ids has to do with citing co-authors. – moewe Oct 12 '17 at 15:02
  • Im using \usepackage{cite} and the \bibliographystyle{ieeetr}. Sorry I'm new to using LaTeX and BibTeX. I am trying to find a command in LaTeX that will go through my bib file (which is full of articles and publications) and list all of which that are referenced by the specified author. I tried to make IDS for each author trying to act as a type of keyword instead of the cite key. – Michael Oct 13 '17 at 12:47
  • Sorry, I still don't quite understand what you want (but that might just be my limited grasp of the English language). You can edit your question to include the additional information and to make it more clear. – moewe Oct 13 '17 at 13:27
  • I edited by question. I am trying find a command that will filter through my bib file (full of a bunch of references with numerous authors) and list all references by the author specified. – Michael Oct 16 '17 at 13:20
  • I have added an MWE that works and filters out citations by 'Knuth'. I have a hunch that you might have more basic problems with Biber at the moment. Have a look at Biblatex with Biber: Configuring my editor to avoid undefined citations and Troubleshooting for biber if my MWE does not work for you (you should not alter the MWE in any way it will work out of the box, the file biblatex-examples.bib is automatically found if biblatex is installed properly). – moewe Oct 16 '17 at 13:32
2

Your MWE is almost there. \DeclareSourcemap should go into the preamble.

Here we filter out citations authored by Knuth and Sigfridsson. Note that you have to \cite or \nocite{*} all the entries you want to consider for filtering.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage[style=alphabetic, maxnames=6, natbib=true, backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map{
      \step[fieldsource=author,
            match=Knuth,
            final]
      \step[fieldset=keywords, fieldvalue=knuth]
    }
    \map{
      \step[fieldsource=author,
            match=Sigfridsson,
            final]
      \step[fieldset=keywords, fieldvalue=sigfridsson]
    }
  }
}

\begin{document}
\nocite{sigfridsson,knuth:ct:a,companion,worman,knuth:ct:c}
\printbibliography[keyword=knuth]
\printbibliography[keyword=sigfridsson]
\printbibliography[notkeyword=knuth,notkeyword=sigfridsson]
\end{document}

enter image description here

  • When Im using TeXworks and after I hold ctrl "T" the pdfLaTeX only shows "Hi, I'm Kant {knuth:ct,knuth:ct:a,companion}" Is the software not up to date? – Michael Oct 16 '17 at 14:31
  • @Michael Did you compile my MWE? It does not contain anything related to Kant. Please have a look at the two links I gave in my comment to your question. – moewe Oct 16 '17 at 14:56
  • Sorry I got my examples I was working with mixed. I tried to compile your MWE but it gives me ERROR - Cannot find control file 'knuth.bcf'! - did you pass the "backend=biber" option to BibLaTeX? – Michael Oct 16 '17 at 18:48
  • @Michael Check your set up with tex.stackexchange.com/q/154751/35864. Did you set your editor up to use a 'build folder'? Or did you tell it to move auxiliary files to a different directory? Can you show a picture of your TeXworks configuration. – moewe Oct 16 '17 at 18:51
  • I dont know if I should be using Biber or not, I saw a solution that required it so thats why I am using it. I already added biber to my TeXworks and im using UTF-8 under my preferences. – Michael Oct 17 '17 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.