TeX e LaTeX

Gli stili della bibliografia

Esistono molti stili per formattare la bibliografia del vostro documento. Questi file hanno estensione .bst e variano a seconda della lingua utilizzata e dei programmi o pacchetti che usate per comporre la bibliografia. Ad esempio se usate il pacchetto natbib avrete bisogno di file di stile appositi. Qui parlerò solamente dei fili di stile che si possono usare con BibTeX.

Gli stili che si trovano solitamente su ogni distribuzione sono: .... Una comparazione di 44 stili la potete trovare qui. I primi 21 usano la citazione per numero, dal 22 al 37 per nome ed anno e gli altri 7 uno stile particolare. Un'altra pagina di comparazione potete trovarla qui. Un database su internet con tutti gli stili potete trovarlo al seguente indirizzo: http://jo.irisson.free.fr/bstdatabase/index.php.

Ricordatevi che se cambiate lo stile della bibliografia, dovete prima ricompilare il vostro documento, poi dare il comando bibtex e poi ricompilare di nuovo il vostro documento. È bibtex infatti che si occupa della formattazione della bibliografia secondo lo stile che gli avete indicato.

Alcuni esempi con citazione numerica

Presenterò ora una lista degli stili con citazione di tipo numerico (... come scritto in [2] ...) che preferisco. Mostrerò lo stesso record della bibliografia come appare usando i diversi stili. Questo è il record usato:

@ARTICLE{1946_Bardeen,
  author = {Bardeen, John and Brattain, Walter Houser and 
            Shockley, William},
  title = {Investigation of Oxidation of Copper by 
           Use of Radioactive {Cu} Tracer},
  journal = {The Journal of Chemical Physics},
  year = {1946},
  volume = {14},
  pages = {714}
}

Con ordinamento di citazione

nature

Bardeen, J., Brattain, W. H., and Schockley, W. The Journal of Chemical Physics 14, 714 (1946).

ieeetr

J. Bardeen, W. H. Brattain, and W. Schockley, "Investigation ... tracer," The Journal of Chemical Physics, vol. 14, p. 714, 1946.

phjcp

J. BARDEEN, W. H. BRATTAIN, and W. SCHOCKLEY, The Journal of Chemical Physics 14, 714 (1946).

phcpc

Bardeen, J., Brattain, W. H., and Schockley, W., The Journal of Chemical Physics 14 (1946) 714.

Con ordinamento alfabetico

acm

BARDEEN, J., BRATTAIN, W. H., AND SCHOCKLEY, W. Investigation ... tracer. The Journal of Chemical Physics 14 (1946), 714.

abbrv/is-abbrv

J. Bardeen, W. H. Brattain, and W. Schockley. Investigation ... tracer. The Journal of Chemical Physics, 14:714, 1946.

Alcuni esempi con citazione autore-anno

Presenterò ora una lista degli stili con citazione di tipo autore-anno (... come scritto in [Biccari 2008] ...) che preferisco. In questo caso la bibliografia è sempre ordinata alfabeticamente. Mostrerò lo stesso record del db come appare nella citazione e nella bibliografia usando i diversi stili. Questo è il record usato:

@ARTICLE{1946_Bardeen,
  author = {Bardeen, John and Brattain, Walter Houser and 
            Shockley, William},
  title = {Investigation of Oxidation of Copper by 
           Use of Radioactive {Cu} Tracer},
  journal = {The Journal of Chemical Physics},
  year = {1946},
  volume = {14},
  pages = {714}
}

???

Finora non ne ho trovato uno che mi piaccia

Stili personalizzati: makebst + urlbst

Quando si vuole creare uno stile personalizzato si hanno due possibilità. La prima è quella di scrivere un file bst a mano, conoscendono ovviamente prima la sintassi (molto complicata). La seconda, più semplice è quella di usare un programma apposito chiamato makebst.

La prima strada è da preferirsi se volete fare delle piccole modifiche ad uno stile esistente. La seconda invece quando ne volete fare uno partendo da zero.

makebst è in sostanza uno script contenuto in un file, makebst.tex. Non è detto che sia già installato nella vostra distribuzione TeX. È contenuto nel pacchetto custom-bib, che va quindi installato.

Una volta installato custom-bib avete tutto il necessario per generare il vostro stile personalizzato. Seguite questa procedura:

Elenco delle domande

 1. Show description of usage (no)
 2. Name of the master file (merlin.mbs)
 3. Name of the output bst file
 4. Comment in the style file
 5. Verbose comment? (no)
 6. Name of the file for language definition (merlin.mbs)
 7. File for extra journal name? (no)
 8. Citation style (numerical)
 9. HTML output (Normal LaTeX output)
10. Language field (no)
11. Annote field (no)
12. Presentation type (no)
13. Ordering of references (alphabetical)
14. Use "von part" for sorting (yes)
15. Author names (full, surname last)
16. Editor names in collections (not reversed)
17. Position of Junior (last)
18. Punctuation between author names (comma)
19. Repeat author names in adjacent references with same authors? (yes)
20. Number of authors in bibliography (all)
21. Maximum number of authors in bibliography
22. Minimum number before et al is given
23. Author names in citations ("one author et al." for > 2)
24. Typeface for authors in bibliography (normal font)
25. Font for first names (same as surnames)
26. Typeface for editors in incollection (normal font) **
27. Typeface for "AND" in the list of authors (same as authors)
28. Date position (date at end)
29. Date format (plain month and year)
30. Suppress month? (no)
31. Date font (normal)
32. Title of articles (normal)
33. Capitalization of article title (capitalize first only)
34. Use the article title for journal and proceedings? (yes)
35. Retain the periods in journal names? (yes)
36. Journal name font (italics)
37. Thesis title style (like books)
38. Tech report title style (like articles)
39. Tech report number style (normal)
40. Journal volume number style (normal)
41. Journal volume and number format (vol(num))
42. Punctuation after volume number (colon)
43. Year position in journal entry (like others)
44. Page numbers (start and stop)
45. Large page number format (no separator)
46. Insert the word "page" in articles? (no)
47. Position of pages (mid text as is normal)
48. Insert the word "volume" in articles? (no)
49. Number and series for collections (number withour series)
50. Position of number and series (after chapter and pages)
51. Volume and series for books/collections (vol. 23 of series)
52. Position of volume and series for incollections (after the editor)
53. Journal name punctuation (comma)
54. Boot title typeface (italic)
55. Pages in books (pp. SS--FF)
56. Print total pages of a book? (no)
57. Publisher address (name, city)
58. Publisher in parentheses? (no)
59. Publisher position (after chapter and pages)
60. ISBN number? (yes)
61. ISSN number? (yes)
62. DOI? (yes)
63. "Editor" word position for books without authors (after the name of the editor)
64. Editor in collections (same as for edited books)
65. Punctuation between sections (blocks)
66. Punctuation before notes (like other block)
67. Punctuation after authors (like other block)
68. Punctuation after "in" (space)
69. Add "in" before journal nems (no)
70. Final punctuation (period)
71. Abbreviate word "pages"? (no)
72. Abbreviate word "editors"? (no)
73. Other abbreviations? (no)
74. Edition number (like in the database)
75. Stored journal names style? (full names)
76. Ampersand in place of AND in author list (no)
77. Comma before AND (yes)
78. Comma before AND for collection editors (yes)
79. Put "AND" in author list in bibliography? (yes)
80. Comma before "et al."? (yes)
81. "et al." typeface (like authors)
82. Additional REVTeX data fields? (no)
83. e-print field? (no)
84. url address? (no)
85. Reference component tags (no)
86. Use emphasis for italics? (yes)
87. Compatibility with plain TeX? (no)
88. Run script for bst generation? (no)

Se il programma vi dà errore durante il processamento del file dbj, soprattutto se dice che non lo trova, allora basta uscire dal processo e processare il dbj successivamente. Per processare un dbj basta dare

latex ./pippo.dbj

Notate il fatto che ho specificato la cartella corrente. Spesso non specificandola, il processamento dà errore dicendo che non trova il file.

Altro strumento fondamentale è lo script Perl urlbst che aggiunge il supporto per alcuni campi speciali della bibliografia. Mi domando per quale motivo non fondano insieme custom-bib e urlbst! Infatti hanno delle funzioni che si sovrappongono. Da notare che nel file di urlbst ci sono anche tutti gli stili standard già "modernizzati" con urlbst.

Scaricare urlbst dal sito ufficiale così è più aggiornato. Copiare lo script in una directory presente nella PATH e guardate le semplici opzioni. È sensato farlo girare su un file bst che non ha alcun campo URL, DOI, EPRINT ecc... se lo si fa girare su uno che già li contiene allora non ne può modificare alcune caratteristiche. Non resta che provare.

Riporto qui quattro stili da me realizzati. Differiscono solo per l'ordinamento e per il font usato per la composizione dei nomi degli autori. I primi compongono i nomi degli autori in maiuscoletto e sono i miei stili preferiti per le bibliografie "lunghe", cioè dove riporto tutti gli autori e il titolo delle opere. Gli altri due sono identici ai primi con la sola differenza che i nomi degli autori sono composti con il font normale.

Stili personalizzati: scrivere manualmente un .bst

Il miglior riferimento per imparare è Tame the BeaST

Nel bst vanno definiti: