0

It is possible to segment bibliography by type (https://www.overleaf.com/learn/latex/Articles/Getting_started_with_BibLaTeX):

\printbibheading
\printbibliography[type=book,heading=subbibliography,title={Book Sources}]
\printbibliography[nottype=book,heading=subbibliography,title={Other Sources}]

And its also possible to segment by section like explored at Segmented bibliography with name of section.

The last one is more interesting thought additionally I would like to quickly see which ones are books and which ones are articles.

Is there some way to label the items as books or articles (or online, or other types)?

May be present things like:

[1] [book] Leslie Lamport, LaTeX: A Document Preparation System, ...
[2] [article] Joel Falcou, Designing HPC libraries in the modern C++ world, 
...

Optionally will be nice to customize a little, perhaps:

[1]    BOOK Leslie Lamport, LaTeX: A Document Preparation System, ...
[2] ARTICLE Joel Falcou, Designing HPC libraries in the modern C++ world, 
...

Or:

[1] BOOK Leslie Lamport, LaTeX: A Document Preparation System, ...

[2] ARTICLE Joel Falcou, Designing HPC libraries in the modern C++ world,

Will it be too much to ask for different colors for diff types, like articles in red, books in blue? Or automatic color selection.

1

biblatex saves the entry type of each entry in the entrytype field. It can be printed with \printfield{entrytype}. The output can be styled with \DeclareFieldFormat{entrytype}.

All standard styles and most good contributed style know the general-purpose bibmacro begentry that is executed at the beginning of each bibliography driver.

Putting this together you might want to try

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, defernumbers, backend=biber]{biblatex}

\DeclareFieldFormat{entrytype}{\texttt{@#1}}
\renewbibmacro*{begentry}{\printfield{entrytype}\setunit{\addspace}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,nussbaum,geer,cicero}
\printbibheading
\printbibliography[type=book,heading=subbibliography,title={Book Sources}]
\printbibliography[nottype=book,heading=subbibliography,title={Other Sources}]
\end{document}

Split numeric bibliography with entry type at the beginning of the entry in typewriter font.


If you want a fancy alignment you may have to measure the width of the strings. This can be done using some internal commands

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, defernumbers, backend=biber]{biblatex}

\listcsgadd{blx@datamodel@labelfields}{entrytype}
\newlength{\entrytypewidth}
\makeatletter
\AtDataInput{%
  \abx@flfw@getfieldformat{abx@flfw@entrytypewidth}{entrytypewidth}{entrytype}%
  \blx@setlabwidth{\entrytypewidth}{%
    \csuse{abx@flfw@entrytypewidth}{\abx@field@entrytype}}}
\makeatother

\DeclareFieldFormat{entrytypewidth}{\textbf{#1}}
\DeclareFieldFormat{entrytype}{\makebox[\the\entrytypewidth][r]{\textbf{#1}}}
\renewbibmacro*{begentry}{\printfield{entrytype}\printunit{\enskip}}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman,nussbaum,geer,cicero}
\printbibheading
\printbibliography[type=book,heading=subbibliography,title={Book Sources}]
\printbibliography[nottype=book,heading=subbibliography,title={Other Sources}]
\end{document}

A similar setup as above. The entry types are now right aligned in a box.

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.