MATHEMATICA TUTORIAL

Citation Management

With Mathematica's citation management features, you can annotate and add references to research papers written using Mathematica. These features work in conjunction with the standard BibTeX format for reference data as well as with EndNote, a powerful system from Thomson Reuters that allows you to perform online research as well as automatically format citations for thousands of different journals.

Citation Management Using EndNote

EndNote, a powerful, industry-standard research tool, is one way the citation management features of Mathematica can be used to allow you to research, cite, and annotate a notebook. In order to manage citations in Mathematica with EndNote, the EndNote software must be installed and running.

Create Reference Databases for Use When Writing Papers

EndNote is a research tool from Thomson Reuters. With EndNote, you can build a database of references, both manually by entering data yourself, and also automatically by searching various online libraries. EndNote Link for Mathematica interfaces with EndNote and allows you to insert references from your EndNote database into a Mathematica notebook you are writing.

Manage Formatting References According to Various Publication Standards

One of the most powerful features of EndNote is that it also contains a large database of bibliographical and citation styles for over 3000 different publications. Each publication has its own standards for formatting bibliographies. By using EndNote Link for Mathematica, you can prepare a notebook for submission to one publication and then easily reformat the citations and bibliographies for submission to another.

EndNote Link and Plugin Interface

EndNote interfaces to Mathematica via Mathematica's EndNote Link plugin. This is an additional piece of software from Wolfram Research that is installed in the EndNote plugins directory on your computer when Mathematica is installed. The plugin serves as the link between EndNote and Mathematica. If EndNote is running, the bibliographical reference menu items in the Insert ► Citation submenu become active.

Performing Research with EndNote

This is not a tutorial on how to use EndNote. For that you should refer to the documentation that comes with EndNote. For now, you will just use it in a very basic way, to search for online references.

Bring up EndNote.

Click for copyable input

Search the online PubMed database for all articles with the name "Sherlock" in the author list. Click on PubMed in the Online Search category. Enter in the field on the Search tab next to the first Author Contains, and press Enter.

Here EndNote finds 1406 records in the PubMed database.

Click for copyable input

Press Enter to bring them all into the local database.

Click for copyable input

Bringing References into Mathematica

Insert ► Citation ► Bibliographical Reference

Now start Mathematica if it is not already running. Here, for the purpose of illustration, is a dummy paper.

Click for copyable input

Inside Mathematica, place the selection in the place where you would like to insert a citation and select Insert ► Citation ► Bibliographical Reference.

Click for copyable input

The Mathematica Insert Citation dialog will come up with all the references in your EndNote database. Mathematica caches copies of all these references, so this dialog will come up faster after the first launch.

Click for copyable input

This shows the different components of the Insert Citation dialog.

Click for copyable input

Filtering and Sorting Citations

The Insert Citation dialog displays all the current references you have in your database. However, sometimes you may want to narrow down your collection to display only references with given keywords. For this you can use the filtering features of the Insert Citation dialog. Entering a search term in the input field at the top of the dialog and then clicking Find will display only those references that contain the term. It will also highlight the term in the list of references. Here, only the references containing the term "bile" are being displayed.

Click for copyable input

You can also sort the entries by author, year, and title.

Click for copyable input

Inserting and Deleting Citations

Inserting Single Citations

The citation management features in Mathematica are only supported inside of text cells. To insert a citation, make sure the insertion point is inside of a text cell, select the reference from the list, and click Insert in the dialog. The citation will appear in the text and a bibliography end note will appear at the end of the notebook.

Click for copyable input
Click for copyable input

The style of the citation and bibliography entry is determined by the currently selected citation style. The default style is numbered, but you can select from over 3000 predefined styles (when using EndNote). For example, here is what the same citation in the Physical Review B style looks like.

Click for copyable input
Click for copyable input

Automatic Citation Numbering

If you are using a citation style that involves sequential numbers, they will be automatically recomputed whenever you insert a new citation. If you insert a citation between two existing citations, it will be renumbered when Mathematica recomputes all the citation numbers in sequence. Citations will not be recomputed if you delete text containing citations. To readjust the citation numbering in this case, select Rebuild Bibliography and Notes from the Insert ► Citation menu.

Inserting Multiple Citations

The Insert Citation dialog allows you to select more than one reference at a time by holding down the Ctrl key for each additional reference selected. When two or more references are selected, they are automatically grouped together, according to the grouping conventions of the currently selected citation style. In addition, if you insert a citation immediately adjacent to an existing citation, they will also be grouped according to the style's grouping rules.

Click for copyable input
Click for copyable input

Refreshing Reference Library

While you are editing a notebook with Mathematica, you may wish to go back to EndNote or another data source and do more research, possibly changing your database of references. When you return to Mathematica, any new references will not appear in the Insert Citation dialog until you click the Refresh button

Click for copyable input
at the upper-right corner of the dialog. When you click Refresh, Mathematica's internal cache of references will be cleared and then rebuilt.

Changing Citation Styles

To change the citation style for the entire notebook to that of a different journal or publication, choose Set/Change Citation Style from the Citation menu. The Citation Styles dialog will come up populated by all the different citation styles that EndNote (or BibTeXLink) supports.

Click for copyable input

To set a new citation style, choose the publication from the drop-down menu and click OK. The citations and bibliographical entries will be reformatted to correspond to the new publication.

Note that EndNote by default supports a subset of all available styles. This smaller subset is more useful and improves performance with this dialog. If you would like to install all styles, it is an option during the installation of EndNote. If you do install the full set of styles, the Citation Styles dialog will take a few seconds to come up while the drop-down list is fully populated. Mathematica caches this list, so that subsequent launches of the dialog will be faster.

Citation Management for BibTeX References

Selecting a BibTeX File as the Data Source

Click for copyable input

In the data source drop-down menu at the bottom of the Insert Citation dialog, choose BibTeX. A dialog will come up asking for you to choose the .bib file to be used for your reference database. Choose the .bib file and Mathematica will load the database. Once Mathematica loads the database, the references will appear in the Insert Citation dialog and you can insert them as in the above examples.

You can use references from several different BibTeX files. If your reference is not in the currently loaded set of BibTeX references, Mathematica will also search any repository specified by the environment variable when rebuilding a bibliography.

Note: Mathematica does not, at present, support mixing BibTeX citations with EndNote citations in the same notebook.

Advanced Topic: Using Journal Styles with BibTeX References

Mathematica supports only a small number of predefined journal styles for BibTeX citations and bibliographies. However, you can modify these styles and add new ones that are customized to your research.

In the Option Inspector under Notebook Options Private Notebook Options BibTeXTemplates is the list of templates that are used to customize citations and bibliographies. Each template is defined by a string, which names the template followed by two additional strings that contain cell definitions for the citation and bibliography cells, respectively. Each cell template contains tags of the form $TAGNAME$, which correspond to the tags in a BibTeX entry.

For example, here is a sample BibTeX entry.

@Misc{elliptic,
author = {Wolfram, Stephen},
title =     {Solving the Quintic with {M}athematica},
howpublished = {http://library.wolfram.com/examples/quintic/},
year =     1999
}

Here is the string from BibTeXTemplates, which defines how a bibliographical cell would appear.

Cell[TextData[{"    $REFNUM$.    $AUTHOR$, ",
            StyleBox["$TITLE$", FontSlant->"Italic"],
            " $YEAR$. ",
            "$HOWPUBLISHED$"}],
            "$CELLSTYLE$",
            Editable->False,
            TaggingRules->{ReferenceData -> ""}]

Here is how the bibliography cell is then formatted when it gets inserted into the notebook.

    1.    Wolfram, Stephen, Solving the Quintic with Mathematica 1999. http://library.wolfram.com/examples/quintic/

The additional special tags, $REFNUM$ and $CELLSTYLE$, should not be deleted and are filled in by Mathematica's citation formatting machinery when the template is processed into a cell and inserted into the notebook.

Cell definitions with tags that do not correspond to BibTeX entries are not replaced, but are left in their $TAGNAME$ form. You can use this feature to resolve discrepancies between the bibliography format and the fields in the BibTeX entries.

Inserting and Editing Notes

Inserting Notes

In addition to being used with EndNote or BibTeX, Mathematica also supports inserting raw notes into text cells that do not correspond to entries in a bibliographical database. For this mode of operation, EndNote or BibTeXLink does not need to be running or even installed. To insert a note, choose Bibliographical Note from the Insert Citation menu. The Insert Note dialog will appear.

Click for copyable input

The input field in this dialog will accept any standard Mathematica input, including text, graphics, and typeset equations. Click Insert and a citation will be inserted at the current text-insertion point. A note entry, similar to a bibliographical entry, will be inserted at the end of the notebook.

Click for copyable input

Editing Notes

To edit a note, select the note citation and select Edit Note from the Insert Citation menu. The Insert Note dialog will reappear and allow you to modify the content of the note.

Click for copyable input

Clicking Insert will update the notebook to reflect the new contents of the note.

New to Mathematica? Find your learning path »
Have a question? Ask support »