Wikibooks Latex Bibliography Techreport

Almost every report/article contains a list of references used. Typing references one by one is a big problem as different programs use different citation patterns. There are two methods to manage the references/citations/bibliography in LaTeX.

  1. Bibliography Environment (to use the citations once)

   This option should be used when you do not want to re-use the citations. The name of the environment is 'thebibliography' and as you know the syntax for this would be:

\begin{thebibliography}{9}

\bibitem{lamport94}
  Leslie Lamport,
  \emph{\LaTeX: A Document Preparation System}.
  Addison Wesley, Massachusetts,
  2nd Edition,
  1994.

\end{thebibliography}


Here in the environment, an extra feature has been used. The number used after the name of the environment suggests how many citations could be used inside. One interesting thing to note here is that the number inside the braces does not matter much, the number of digits matter. So if you write '\begin{thebibliography}{23}', the number of citations you can include are 99 (maximum number with two digits) and not 23.

 

Each new citation starts with a '\bibitem' followed by a unique key. The key should be unique because you will be using it to cite the corresponding reference. So, each citation should have a unique key. Once you are done with all citations, do not forget to end the environment i.e., '\end{thebibliography}'.

 

2. BibTeX (To create and use a database of references)

Although using the environment for the references is pretty easy, the problem arises when you have hundreds of articles to cite. In that case, typing each and every citation becomes a problem. Another drawback of the 'thebibliography' environment is that it does not create a database and thus cannot be re-used in another article/report. Also, since this format is not known to most of the other reference management softwares like RefWorks, EndNote, Mendeley etc., sharing your references or transferring them  to some other account is not possible.

To solve these problems, LaTeX has an inbuilt reference management software called BibTeX which eliminates the undesirable and extensive typing requirements. There is a pattern in which the citations are stored in a BibTeX file:

 

@Book{hicks2001,         author= "von Hicks, III, Michael",title= "Design of a Carbon Fiber Composite Grid Structure for the GLAST Spacecraft Using a Novel Manufacturing Technique",publisher= "Stanford Press",year= 2001,address= "Palo Alto",edition= "1st",isbn = "0-69-697269-4" } @article{greenwade93,author= "George D. Greenwade",title= "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",year= "1993",journal= "TUGBoat",volume= "14",number= "3",pages = "342--351" }

In the above demo citations, first one is for a book and second is for an article (magazine/Journal). 'hicks2001' and 'greenwade93' are the keys (which will be defined by you). The keys are used when these references are cited in the article/report etc. You should provide all the references a unique key to avoid erroneous outputs.

This citation could then be saved as a 'xyz.bib' file where, xyz is any name that you provide. Now this file is a database for your references which can be easily shared and transferred between multiple accounts. Do not forget to save the file in the same folder as your '.tex' file. To include the 'xyz.bib' file in your .tex file, the following command could be used: \bibliography{xyz} You do not need to use '.bib' extension. When you use '\bibliography' command, the compiler knows the file would have a '.bib' extension and that is why it is important to save the file as '.bib' (otherwise LaTeX will not be able to find the file and the list of references would not be generated) It might look that even BibTeX needs a lot of typing to create the reference database but the GOOD NEWS is that almost all the major journal/conference databases support BibTeX formats.

Some examples on how the citations can be downloaded/exported in BibTeX format from some major databases are:

  • Google Scholar
    • Click on Settings
    • Under Bibliography Manager click on 'Show links to import citations into' and select BibTeX
    • Click on Save
    • Search the required article and click on import into BibTeX
    • Copy the citation and paste it into your .bib file
    • Do not forget to give the citation a unique key which you are comfortable with
  • Scopus
    • Search and Find the article
    • Select the required article(s)
    • Click on Export
    • Select Export Format as BibTeX and Click on Export
    • A .bib file with selected citations will be downloaded on your computer
    • Do not forget to give the citation a unique key which you are comfortable with
  • IEEE Xplore
    • Select the required article(s)
    • Click on Download Citations
    • Select the Format as BibTeX
    • Click on Download Citation
    • Another window will open with the BibTeX formats of the required articles
    • Copy these citations and paste them into your .bib file
    • Do not forget to give the citation a unique key which you are comfortable with

LaTeX is a powerful document typesetting system that I recommend for any large technical or academic work. LaTeX does have a significant learning curve, and works in a very different way to the modern WYSIWYG word processor, but the investment in learning this excellent system will pay dividends again and again. There are numerous front-ends that make learning the system even easier.

I store my entire research bibliography in bibtex format, a text-based open format, readable by many different bibliography management programs. I currently use Jabref, but there are many others.

A decent reference manager is essential when creating academic works. I would hesitate to do manual reference management for even the smallest projects. The benefits are:

  • All references can be stored in one place
  • References can be automatically downloaded from literature databases (e.g., Pubmed) minimising transcription errors.
  • Many packages allow one to store other information and files along with a reference, such as the full-text PDF or a link to the full-text article.
  • Dynamic reformatting of bibliography citation styles (e.g., switch to Harvard style), and bibliography style (depending on journal requirements – e.g., maximum three authors, year, journal name, volume, page numbers). Do not underestimate the workload involved in doing this manually!

LaTeX, BibTeX, Natbib and custom bibliography styles

I have 664 article references held in my central research bibliography database and use Jabref to manage them. I have manually typed in only three or four, as it is usually possible to download citations straight from Pubmed. I reference these articles from a number of different LaTeX documents including my thesis and several ancilliary papers being prepared for publication. I use the natbib package to provide more sophisticated control over citation formatting.

To understand how different this is to using Microsoft Word, I should show an example of simple LaTeX formatting along with a citation:

The construct tells LaTeX to insert a citation. Depending on the citation style in use at the time, it may insert [1], (1), /1/, 1, (Smith et al. 1975). Citation styles include numeric, author-year and authors, with a choice of bracket types.

You can do more complex things if you choose the right options:

can create a citation such as [1, 3-5].

If you choose to not use natbib, then there are many more built-in bibliographic style files, and you may find one “off the shelf”. Some more technically inclined journals may even provide style files, although I haven’t see this in the medical literature!

My preference is to use natbib and a custom bibliography style file. In this way, I get fine control over both citation and bibliography style formats, and both can be changed very easily, with minimal or no changes to my LaTeX document.

Generating custom bibliography styles
To generate custom bibliography styles compatible with natbib, also read makebst package documentation. This allows one to create arbitrary bibliography styles, and should support any style requested by the most demanding of medical journals! They are many built-in bibliography styles with LaTeX, but medical journals tend to have different requirements, and I normally end up creating a style file to suit the journal. I suspect this isn’t the case in the computing or scientific communities, but medical and the life-sciences uses different defaults and different standards to most of the included style files.

For this run-through, I’m going to create a style file that uses numeric citations, in order of citation( not alphabetical order), with a list of authors (surname then initials), then the article title (in italics), then journal name, the year, then volume number, optionally the issue number in brackets, and finally the page number.

  1. Getting started
    1. Run makebst.makebst is a tex program that generates style files. To run it, use

      You will need to use the correct path to the file itself, which will depend on your operating system and TeX installation.
    2. Type ‘Y’ to get more information
    3. Accept the default master file (merlin.mbs)
    4. Output file – name it something memorable – I type
    5. Type a comment – I type
    6. Say Y to verbose comments
    7. Name of language definition file – agree with default
    8. Include files for journal names? – no
    9. Internal language support – agree with default
  2. Choosing style
    1. Choose numeric mode
    2. Choose normal LaTeX output
    3. Language field? no
    4. Annotations? no
    5. Ordering of references? Citation order – option c
    6. Order on “von” part? Sort on von part – although N/A for us
    7. Author names? Surname plus pure initials (option x)
    8. Editor names? Reversed as in authors’ – option r
    9. Position of “Junior” – comes last
    10. Author name punctuation – separate by commas
    11. Adjacent references with repeated names – always present
    12. Number of authors – all authors
    13. Typeface for authors – normal font
    14. Date position – date part of journal spec – option j
    15. Date format – plain month and year – default option
    16. Suppress month – yes – option x
    17. Date punctuation – semi-colon – option s
    18. Blank after date – no space – option x
    19. Date font – normal format
    20. Title font – italic
    21. Title capitalisation – title style (I ensure all bibtex entries are correctly capitalised manually by using {})
    22. Article title present – Yes
    23. Journal names – dotless names – option x
    24. Journal name font – plain
    25. Thesis title – like books
    26. Tech report – like article
    27. Tech report num – plain
    28. Journal volume font – plain
    29. Journal volume – vol(num) – default
    30. Volume punctuation – volume with colon – default
    31. Year in journal specification – as given by date specification
    32. Page numbers – start and stop numbers
    33. Large page numbers – no separators
    34. Word “page” in articles – no – numbers only – default
    35. Position of pages – default
    36. Word volume – number only -default
    37. Allow number without series – default
    38. Position of number and series – default
    39. Volume and series for books – option s
    40. Position of volume and series – default
    41. Journal name punctuation – space – option x
    42. Book title italic? Yes
    43. Pages in books plain – default
    44. Total pages printed – no
    45. Publisher,Address – default
    46. Publisher in paratheses – default no
    47. Publisher position – default
    48. ISBN – no
    49. ISSN – no
    50. DOI – no
    51. Editor after names – default
    52. Editor in collections – default
    53. Punctuation between blocks – default
    54. Punctuation after authors – default
    55. Punctuation after “in” – default
    56. “In” with journal names – default – no
    57. Final punctuation – period at end
    58. Abbreviate “pages” – omit – option x
    59. Abbreviate “editors” – yes – option a
    60. Other abbreviations – yes
    61. Abbreviation for edition – a
    62. Months with dots – option x (although not applicable as hidden)
    63. Editions as in database – default
    64. Stored journal names – default (not applicable)
    65. Ampersand – use word and – default
    66. Comma before “and” – no comma
    67. No “and” in reference list – No – option x
    68. Font of “et al” – plain
    69. RevTeX data fields – none (default)
    70. E-print data field – none (default)
    71. URL – none
    72. Reference component – none
    73. Emphasis – default
    74. Compatibility with plain TeX – default

After all that (most of the options we set to their default), we get:

Choose YES, and your STY file is created!

You will notice that many of the options are actually not applicable. For example, you can choose not to have “AND” placed into the author list if there are only two authors, but it still asks you about using an ampersand or plain text. In these situations, it is normally possible to just select the default.

Copy it into your TeX distribution tree. . You need to run texhash to update TeX’s directory cache so BibTeX can find your new file.

And finally change the bibliography style setting in your LaTeX document:

Further reading: Wikibooks’ LaTeX bibliography management, Making style files with custom bib.

Tags:LaTeX

One thought on “Wikibooks Latex Bibliography Techreport

Leave a Reply

Your email address will not be published. Required fields are marked *