Contents: Quick Start - Citing References - BibTeX Styles = Installing New Styles = Sort Order = Style Flags = Paragraph Formatting - Setting Defaults - Saving A Database
To cite a reference, position the cursor at the appropriate place in the text and press . You can now type one or more BibTeX keys separated by commas. Initially, the citation will be displayed as its BibTeX key, but this will change to the citation label when you press to create the bibliography. You can display the BibTeX keys at any time by pressing the button.
If you precede a Bibtex key with "/" then the reference will be included in the bibliography but not cited in the text. If all the citations in a list are non-citing then the surrounding brackets will be omitted and the string will be invisible unless the button is pressed.
Bibtex4Word includes a primitive search facility which allows you to find entries in the BibTeX database that contain specific words. Searches begin with a @ or else x@ where x is one of a, b, t or j. The BibTeX entries found by some example searches are shown in the table below. If only a small number of matches are found, they will be listed explicitly for you to select, if a large number are found you will be asked to confirm that you want to include them all.
Search String | BibTeX entries found |
---|---|
@ Smith Hot | All entries containing both Smith and Hot in any order. Searching is case insensitive and not restricted to whole words so Hot, hot and HOT are all equivalent and schott will also be found. |
a@ Smith | All entries with Smith in the author field |
a@ Smith t@ Hot | All entries with Smith in the author field and Hot in the title. |
t@ Hot Cold a@ Smith | All entries with Smith in the author field and Hot in the title and Cold in the title. Thus a field specifier a@ or t@ remains in force until another field specifier is encountered. |
b@ Hot @ Cold | All entries with Hot in the booktitle and Cold in any field. |
The formatting of the bibliography and the way in which citations are indicated in the text of your document are controlled by two things: (a) your choice of BibTeX style and (b) your selection of style flags: these are explained in detail below.
The following three settings are the ones I use most often. They are written in the form "style/flags" where the flags are specific to Bibtex4Word and affect how the citations and bibliography appear. You will probably have to install the styles into MikTeX before you can use them (see below).
The formatting of the bibliography and the way in which citations are indicated in the text of your document are controlled by the "bibtex style". Thus, for example the same citation in styles "IEEEtran" and "alpha" would appear in the bibliography as:
where the differences include the use of first names, the quoting of the title and the way in which the volume and issue numbers are shown. The initial portion of the entry, enclosed in [...] is the "label" and will appear in the text whenever the reference is cited. Most styles have numeric labels as with the first example above while a few, known as alpha styles, have labels constructed from the authors' names and the year of publication as in the second example; this provides a useful mnemonic in the text. Some disciplines prefer "Harvard" styles which include the author's name and publication year in the citation.
To choose the style, press the button and then type in the name of the style you want to use. There are several hundred different styles available in MiKTeX and it can be difficult to choose between them. A good guide is available from Reed College and an extensive list has been put together by Ken Turner. Most journals have their own ready-made style which formats the references exactly as their editors' prefer.
The Bibtex4Word package includes a Word document "StyleTable.doc" which lists a number of Bibtex styles. By following the instructions in this document you can create your own style table that includes any styles you wish.
Only a few styles are initially installed in MiKTeX, so if you want a specific style, you will have to install it first as follows:
You can set MikTeX so that any missing style files will be installed automatically as required. This sounds like a good idea, but I do not recommend it for two reasons: (a) BibTex4Word will appear to freeze while the new style is installed with no explanation of what is going on and (b) if the server that you have chosen is broken, which happens quite often, BibTeX4Word will freeze forever.
One of the ways in which styles differ is the order in which the cited references are listed in the bibliography. References may be ordered by any combination of: A=author, C=citation order within your document, D=publication date, K=BibTeX key, L=citation label used within the text of your document and T=document title. The priority order of these criteria used for some common styles is given below:
AC |
plainnat, abbrvnat |
ADC |
jbact |
ADTC |
aaai-named, abbrv, acm, agsm, amsplain, annotation, apa, chicago, IEEEtrans, is-abbrv, is-plain, named, phrmp, plain, siam [and many more] |
C |
IEEEtran, is-unsrt, nar, nature, phjcp, unsrt, unsrtnat |
DATC |
plainyr |
K |
abstract |
LDATC |
alpha, annotate, IEEtranSA |
The Bibtex4Word package includes a Word document "SortOrder.doc" which allows you to determine the bibliography sort order for any Bibtex styles. Instructions for doing so are included in the document itself.
The selected style can be modified by the inclusion of one or more style flags following the bibtex style e.g. BIBSTYLE=alpha/n. You can have as many style flags as you want following the "/" character. The table below lists the available style flags; some flags are preceded by an optional integer, n, whose meaning is explained in the table; if n is omitted it is taken to equal 1 unless otherwise specified. Specific styles to which an option applies are shown in brackets.
The following flags affect how references appear in the bibliography:
a |
Use full instead of abbreviated author names in label [chicago, named, plainnat, agsm] |
d |
Convert DOI references into hyperlinks [plainnat] |
nf |
Insert a line feed in the bibliography after any label that is more than n characters long. |
l | [lower case "L"] Omit the labels from the bibliography entries (normally needed for Harvard style bibliographies). If this option appears not to work, you may need to turn off "hidden text"; to turn off hidden text select Tools>>Options>>View (Word 2003) of Office-Button>>Word-Options>>Display (Word 2007) and make sure that both "Hidden Text" and "All" are unchecked. |
nm | n gives number of cross-references (instead of the normal 2) needed to trigger insertion of the parent entry into the bibliography [default n=999]. |
n |
Force the reference list to be numbered even if the bibtex style normally uses labels based on author names. |
nu |
Convert URLs into hyperlinks [plainnat,
ieeetran] |
] |
Omit the square brackets from the bibliography label. |
) |
Use parentheses instead of square brackets in the bibliography. |
. |
Omit the square brackets from the bibliography and follow the label with a "." instead. |
n~ |
Put n non-breaking spaces after the bibliography label in place of a tab. |
n& | Select the form of "and" in the author list for harvard styles [agsm]. 0 = "&" [default], 1="and", 2="et", 3="en", 4="und". |
The following flags affect how references are cited in the text of the document:
c |
Compress cited references by writing [1-4] instead of [1, 2, 3, 4]. Normally used in combination with the s option. |
h |
Make the citations into clickable hyperlinks that take you to the corresponding entry in the bibliography. To return to the text type "Alt+Left Arrow" or use the back button on the "Web" toolbar if it is displayed. |
s |
Sort the references in a citation list thereby writing [1,2,3,4] instead of [2,4,1,3]. Often used in combination with the c option. |
ny |
year formatting in the label [chicago,
named,
plainnat, agsm] n: 0="Smith (2000)"; "1=Smith"; 2="Smith 2000"; 3="Smith, 2000"; 4="(2000)"; 5="2000" |
[ |
Omit the square brackets surrounding the citation. |
( |
Use parentheses instead of square brackets to surround the citation. |
^ |
Write citation list as superscript like this1,2,3. |
, |
Omit spaces after commas in the citation list e.g [1,2,3] rather than [1, 2, 3] |
; |
Use semicolons instead of commas in the citation list. |
The following flags affect the system operation:
b | Instead of scanning the citations in the document, use an existing file in the same folder as the document with name ****.bbl where **** is the name of the document. |
np | Set the code page of the bibtex database. If no p flag is given, the ANSI code page of your system locale will be used. If n is omitted, it is taken to be 65001 which corresponds to UTF8 encoding. |
nt | Create a style table. The last table in the document is assumed to contain a list of styles in the first column; the formatted output will be placed in the last column. The first n lines are assumed to contain header information. If the style in the first column omits either the style name or the style flags, then the corresponding values will be taken from the main style specification. |
nz |
n is the sum of any combination of: 1=allow undo to reverse changes made to a bibliography (this may result in "insufficient memory" warnings"); 2=always save bibtex database filename as a full path (the default is to save it as a relative path if it is in or below the folder containing your word document) |
n# |
Indicate special features of the bibtex style; n is
the sum of any combination of: 1=bibitem entries use the natbib format; 2=citeauthoryear
command uses the chicago format. The default value depends on the bibtex style selected: 0 for most syles, 1 for abbrvnat, elsarticle-harv, plainnat, unsrtnat; 2 for chicago. |
+ | Use bibtex8, the extended version of bibtex instead of the normal version. This flag will be ignored if the BIBEXE environment variable is set. |
There are some special "style commands" which can be entered instead of a style.
//b |
Open the BibTeX database. The style is not changed. |
//t |
Use notepad to open the four temporary
files that BibTex4Word uses. These files contain useful information if it
becomes necessary to figure out why something is not working. The style is
not changed. The files are |
To select the character and paragraph formatting of the bibliography, select the entire first entry (conveniently by double-clicking in the left margin) and apply whatever formatting you wish. Click on again to rewrite the entire bibliography in your chosen format. It is often convenient to include a hanging indent in the format; Bibtex4Word will, by default, put a Tab character after printing the label.
If you always use the same BibTeX database and the same style, it is annoying to have to define them afresh for each new document. You can define the default values for these as environment variables.
To define any or all of these environment variables, do the following:
Windows XP: Start>>Settings>>Control Panel>> System>>Advanced>>Enviromental Variables>>User Variables>>New
Windows Vista: ??
Windows 7: Start>>Control Panel>>System and Secutiry>>System>>Advanced System Settings>>Environment Variables>>User Variables>>New
You can shortcircuit several of these steps by right-clicking "My Computer" on the desktop and selecting "Properties".
Default formatting of the bibliography (font, font size, intenting etc) can be specified by creating a "Word Style"; this is nothing whatsoever to do with a BibTeX style. You can define a default Word Style called Bibtex (Windows XP: Format>Styles and Formatting>New Style) with the style features of your choice. You can define different formatting for different BibTeX styles by defining Bibtex plain, Bibtex alpha etc where the BibTeX style name is separated from the word Bibtex by a space.
If you click , you can create a small BibTeX database containing only the references that are cited in your document. This is useful if you want to send your document to someone else to edit. For obscure Microsoft reasons (or my incompetence as a Visual Basic programmer), the file dialog box has to use one of the standard Word file extensions (I have chosen .MHT) but the file will nevertheless be saved with the correct .BIB extension. A side-effect of this is that you will not be able to see whether or not the file you specify exists already. You will however be warned before overwriting an existing file.