Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. documentclass{book}
  2. usepackage{totcount}
  3. newtotcounter{bibitems}
  4. newtotcounter{figure}
  5. regtotcounter{table}
  6.  
  7. begin{document}
  8. The total number of figures is total{figure}, and the total number of tables is total{table}.
  9.  
  10.  
  11.  
  12. begin{figure}
  13. [...]
  14. end{figure}
  15.  
  16. begin{figure}
  17. [...]
  18. end{figure}
  19.  
  20.  
  21.  
  22. begin{table}
  23. [...]
  24. end{end}
  25.  
  26. begin{table}
  27. [...]
  28. end{end}
  29.  
  30. end{document}
  31.  
  32. documentclass{article}
  33. usepackage{totcount}
  34.  
  35. newtotcounter{citnum} %From the package documentation
  36. defoldbibitem{} letoldbibitem=bibitem
  37. defbibitem{stepcounter{citnum}oldbibitem}
  38.  
  39. begin{document}
  40. This document contains total{citnum} references.
  41.  
  42. cite{Martin06} cite{Fortran2008}
  43.  
  44. begin{thebibliography}{1}
  45.  
  46. bibitem{Martin06}
  47. P.~A. Martin.
  48. newblock {em Multiple Scattering. {Interaction} of Time-Harmonic Waves with
  49. {$N$} Obstacles}.
  50. newblock Cambridge University Press, 2006.
  51.  
  52. bibitem{Fortran2008}
  53. Fortran standards technical~committee (J3).
  54. newblock Fortran 2008 language standard.
  55. newblock Technical Report J3/10-007, International Committee for Information
  56. Technology Standards (INCITS), 2010.
  57.  
  58. end{thebibliography}
  59. end{document}
  60.  
  61. ...
  62. You've used 8 entries,
  63. ...
  64.  
  65. grep -P "You've used [0-9]+ entries," -m 1 "Document.blg" | grep -P "[0-9]+" -o
  66.  
  67. documentclass{article}
  68. usepackage{bashful}
  69. begin{document}
  70. Foo...
  71.  
  72. bash[script,stdout]
  73. grep -P "You've used [0-9]+ entries," -m 1 "Document.blg" | grep -P "[0-9]+" -o
  74. END
  75. end{document}
  76.  
  77. usepackage{totcount}
  78. newtotcounter{citenum}
  79. AtEveryBibitem{stepcounter{citenum}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement