Skip to main content
10 events
when toggle format what by license comment
Dec 1, 2021 at 12:40 comment added Frederick Nord but even then the value of the counter is only known after the bibliography has been printed, right? Can I somehow include the number of references in the heading of the bibliography?
Aug 12, 2012 at 16:02 comment added Maïeul I post an answer for his problem
Aug 12, 2012 at 14:20 comment added Daniel @user8786: Hm, I guess the issue is that changes to LaTEX counters are local only and that \printbibliography uses a group internally. You have to use TeX count registers instead, which work globally. (sorry, writing this on my mobile, so no more details now. Howevef, There are numerous examples here on Tex.se on TeX count registers vs LaTeX counters that explain the details.)
Aug 12, 2012 at 14:11 comment added user8786 @Daniel: That gives me zeros in the main text, and the correct numbers in the bibliography, presumably since the value really is zero at that stage. I guess I somehow need to stop latex expanding the counters until after the bibliography has been printed?
Aug 12, 2012 at 13:58 comment added Daniel @user8786: Just move the \newcounter{...} lines to the preamble. As usual in such situation, you need to compile twice to get correct values.
Aug 12, 2012 at 13:21 comment added user8786 Salut. J'ai ajouté un MWE qui explique un peu. En fait la bibliographie aura plusieurs chapitres - un par projet - et je souhaite avoir au début du doc un chaptire de synthèse qui va presenter le nombre d'articles publié par chaque projet, le nombre de rapports techniques etc.
Aug 12, 2012 at 11:21 comment added Maïeul sorry, I don't understand what do you want to do. Could you reformulate ? Maybe you could try in french ?
Aug 12, 2012 at 11:05 comment added user8786 Merci infiniment. Works very well. One question though - with this I can refer to the counter (\thereports) after the \printbibliography command, but not in a preceeding chapter or page. Is there anyway to set the scope of the counter so I can refer to it earlier on in the document. Or is there a "\printphantombibliography" command I can use early on to count but not print the number of citations?
Aug 12, 2012 at 10:57 vote accept user8786
Aug 13, 2012 at 12:07
Aug 12, 2012 at 9:19 history answered Maïeul CC BY-SA 3.0