3

I am working on a document that includes a "further reading" list with an annotated bibliography. The reading bibliography style for BibLaTeX is perfect for this purpose. However I'd like to customize a few things about the appearance of the style, and I'm finding the BibLaTeX manual to be a little bit advanced for my fairly negligible LaTeX skillset. Can anybody point me in the right direction for these changes I'd like to implement?

The changes I'd like to incorporate are:

  1. Add vertical space between bibliography entries without adding space between the entry text and the entry header rule.
  2. Remove the author name from the entry header banner so that the text on the left side of the banner displays only the title of the entry.
  3. Change the right-hand side of the banner to display a field from the bibliography entry rather than the bibliography key. In particular, I'd like to add a field that is unused by the reading style to each entry so that I could use it to indicate e.g. the entry subject. In the MWE below I used the verb field to add some text.
  4. Change the word "Annotations" to "Description"

I've included an example MWE below, and an image of what I'd like to achieve (I used image manipulation software to create the target style image).


Original reading style:

enter image description here


Target bibliography style:

enter image description here


The source used to create the original output:

\documentclass{article}

\usepackage{filecontents}

\begin{filecontents}{refs.bib}
  @book{kernighan1988c,
    title      = {The C Programming Language},
    author     = {Kernighan, Brian W and Ritchie, Dennis M},
    year       = {1988},
    annotation = {Instructional book for the C programming language.},
    verb       = {C/C++ programming}
  }
  @book{stroustrup2013c++,
    title      = {The C++ Programming Language},
    author     = {Stroustrup, Bjarne},
    year       = {2013},
    publisher  = {Pearson Education},
    annotation = {Instructional book for the C++ programming language.},
    verb       = {C/C++ programming}
  }
  @book{knuth1984texbook,
    title      = {The TeXbook},
    author     = {Knuth, Donald Ervin and Bibby, Duane},
    year       = {1984},
    publisher  = {Addison-Wesley Reading},
    annotation = {Instructional book for the TeX typesetting system.},
    verb       = {TeX typesetting}
  }
\end{filecontents}


\usepackage[style = reading, backend = biber]{biblatex}
\addbibresource{refs.bib}


\begin{document}

\nocite{*}
\printbibliography

\end{document}
4

Customising biblatex is not so hard. I find reading the the style files themselves helpful for understanding what is going on.

This MWE will do what you want. See comments for explanations.

\documentclass{article}

% use verba instead of non-existent verb field
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{kernighan1988c,
  title      = {The C Programming Language},
  author     = {Kernighan, Brian W and Ritchie, Dennis M},
  year       = {1988},
  annotation = {Instructional book for the C programming language.},
  verba      = {C/C++ programming}
}
@book{stroustrup2013c++,
  title      = {The C++ Programming Language},
  author     = {Stroustrup, Bjarne},
  year       = {2013},
  publisher  = {Pearson Education},
  annotation = {Instructional book for the C++ programming language.},
  verba      = {C/C++ programming}
}
@book{knuth1984texbook,
  title      = {The TeXbook},
  author     = {Knuth, Donald Ervin and Bibby, Duane},
  year       = {1984},
  publisher  = {Addison-Wesley Reading},
  annotation = {Instructional book for the TeX typesetting system.},
  verba      = {TeX typesetting}
}
\end{filecontents}

% set entrykey to false so entry key isn't printed in banner
\usepackage[style=reading,entrykey=false]{biblatex}
\addbibresource{\jobname.bib}

% 1. Increase space between entries from 2\bibitemsep to 4\bibitemsep
\makeatletter
\patchcmd{\bbx@item@full}
  {\itemsep2\bibitemsep}
  {\itemsep4\bibitemsep}
  {}
  {}
\makeatother

% redefine entryhead:full so that
% 2. Author name is removed from banner and left hand text displays only title
% 3. Right hand side of banner prints verba (verb isn't a field)
\renewbibmacro*{entryhead:full}{%
  \printfield{labeltitle}%
  \hfill
  \printfield{verba}}

% 4. Change word Annotations to Description
\DeclareFieldFormat{annotation}{Description\addcolon\space #1}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

  • 1
    This is fantastic! Absolutely 100% perfect! – dpritch Nov 18 '17 at 16:13

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.