BibTeX, biblatex and biberNumber of Items in Publications/Bibliography

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Number of Items in Publications/Bibliography

Post by renno »

Hello there,

So, I prepared my CV in latex, and arranged my publications in three sections (using bibtopic): book chapters, journal papers and conference proceedings. Since the items in every section are not numbered, I would like to include near every heading the total number of items displayed below it. For exmaple:

Journal Papers (3)
...
Conference Proceedings (4)
....

Your help will be appreciated,

Thanks,
If there is no way, we will make one...
Hanibal

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Number of Items in Publications/Bibliography

Post by kaiserkarl13 »

The following is a hack; there may be a more official way to do it. I've never used bibtopic, so I didn't want to learn how to use that before testing this, but you should be able to at least get something going from here. I'm guessing, but you probably want to put some of these commands in a re-definition of the thebibliograpy environment (or similar) instead of defining a new environment, and renewing the commands \refname and \bibitem instead of the \section and \item as I've done.

Code: Select all

\documentclass{article}
\begin{document}

\newcounter{secnum}
\newenvironment{totlist}[2]{
  \stepcounter{secnum}
  \section{#2 (\ref{totlist:\thesecnum})}
  \newcounter{#1}
  \begin{itemize}
  \let\olditem\item
  \renewcommand\item{\olditem\refstepcounter{#1}}
}{\label{totlist:\thesecnum}\end{itemize}}

%% Replace the following with your list of references

\begin{totlist}{articles}{Articles}
  \item Paper 1
  \item Paper 2
  \item Paper 3
\end{totlist}

\begin{totlist}{chapters}{Book Chapters}
  \item Paper 1
  \item Paper 2
\end{totlist}

\end{document}
Post Reply