2

I have a bibliography that mixes every refrence type (mostly books and articles together). Now, I would love to be able to separate only the articles from the rest and display them under a separate bibliography subtitle, e.g. "Articles".

Is this in any way possible?

I use

\usepackage{natbib}
\bibliographystyle{apalike}

for my bibliography and cite with the following commands:

\newcommand\mycite[2][]{%
  \citeauthor{#2}\ (\citeyear{#2})\ifx#1\undefined\else, #1\fi}
  \newcommand\myfootcite[2][]{\footnote{\mycite[#1]{#2}}}
  \def\prevcite{} % initialize \prevcite
%% macro for in-text citation
\newcommand\tcite[2][]{%  
  \def\newcite{#2} 
  \ifx\prevcite\newcite 
    Ibid.%
  \else%
    \gdef\prevcite{#2}% update \prevcite
    \citeauthor{#2}\ (\citeyear{#2})%
  \fi
  \ifx#1\undefined\else, #1\fi}
%% macro for in-footnote citation
\newcommand\fcite[2][]{\footnote{\tcite[#1]{#2}}}

Many thanks for your suggestions!

4
  • Have you looked into the multibib package? – Mico Dec 26 '14 at 23:26
  • 3
    biblatex can do that: it has a \defbibfilter command which allows , among other things, to filter references by entry type. See §3.6.10 opf the documentation. – Bernard Dec 27 '14 at 0:15
  • @Bernard No need to create filters with \defbibfilter just use the type and nottype options of \printbibliography. – Guido Dec 27 '14 at 8:36
  • @Guido: I just wanted to insist on the possibility of creating filters. – Bernard Dec 27 '14 at 10:42
5

Take a look at the biblatex examples on CTAN or from the TeXLive distribution. This possible solution is based on those examples.

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{bib.bib}
    @article{death-star,
    author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
    title        = {Death Star},
    howpublished = {Alderaan and Yavin 4},
    year         = {0 BBY}
  }
  @misc{death-star-2,
    author       = {Bevel Lemelisk and Wilhuff Tarkin and Darth Vader and Darth Sidious},
    title        = {Death Star II},
    howpublished = {Endor},
    year         = {4 ABY}
  }
  @article{abc,
    author       = {Abc, D.},
    title        = {The Letter Fantasies},
    year         = 1492,
    keywords     = {one}
  }
  @Book{efg,
    author       = {Efg, H.},
    title        = {Alphabet Soup},
    year         = 1942,
    keywords     = {two}
  }
\end{filecontents}
\usepackage[backend=biber,
%   style=authoryear, % uncomment to display author-year
]{biblatex}
\defbibfilter{other}{
  not type=article
}
%
\addbibresource{bib.bib}
\begin{document}
They first built \emph{Death Star}~\autocite{death-star}.

The design flaw was found in \autocite[Lemelisk et al., Chapter 3, p. 123][]{death-star}.

To address the flaw, they designed \emph{Death Star 2}~\autocite{death-star-2}
that featured many smaller diameter heat exhaust vents.

Read the letter fantasies \cite{abc} or stories from the a-soup \cite{efg}.
\nocite{*}
\printbibheading
\printbibliography[heading=subbibliography,title={Articles},type=article]
\printbibliography[heading=subbibliography,title={Other Sources},filter=other]
\end{document}

enter image description here

6
  • There is no need to define a filter. Biblatex provides the nottype option for \printbibliography (and it can be used multiple times). – Guido Dec 27 '14 at 8:34
  • @zun: This is exactly what I am looking for. However, I am completely lost at how to implement this as I don't use biblatex. How should I go about finding a solution? – MadJens Jan 16 '15 at 13:37
  • @MadJens : is switching to biblatex an option? If so, you should have a look at tex.stackexchange.com/questions/5091/… and tex.stackexchange.com/questions/13509/biblatex-for-idiots . – Clément Jan 16 '15 at 15:51
  • Unfortunately, no. – MadJens Jan 16 '15 at 16:01
  • Is there no way to do this with natbib? Maybe a possibiliy manually creating two bibliographies with the bibtexkeys? – MadJens Jan 18 '15 at 18:36

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.