Bibliography for Word95

Tim Cutts timc at chiark.chu.cam.ac.uk
Tue Mar 26 08:20:11 EST 1996


In article <4j24gl$pqr at news1.h1.usa.pipeline.com>,
JLA . <lantern at usa.pipeline.com> wrote:
>I'm looking for a macro or template that will make entering bibliographic
>data into a Microsoft Word for Win95 quick and painless.  Does anyone know
>if such a file exists, if so, where I can get it.  Thanks 

I think it's a great shame that Word incorporates such great automatic
numbering sequences and cross references for tables and figures, and
ignores references completely.  The easiest thing to do is to use the
{seq} field code.  The following two simple macros should help:

ReferenceNumber.  This macro inserts the next number in the reference
sequence before the insertion point, and then asks you for a bookmark
name to give to this reference.

Sub MAIN
nm$ = InputBox$("Enter a reference bookmark name for this reference",
"Insert Reference Number")
On Error Goto Done
InsertField .Field = "seq refs \* MERGEFORMAT"
Insert "." + Chr$(9)
CharLeft 2
CharLeft 1, 1
EditBookmark .Name = nm$, .SortBy = 0, .Add
Done:
End Sub

ReferenceTag.  This macro inserts a superscript cross-reference to the
bookmark you specify:

Sub MAIN
nm$ = InputBox$("Please enter the bookmark name for the reference",
"Reference Tag")
On Error Goto Done
InsertField .Field = "seq refs " + nm$ + " \* MERGEFORMAT"
Insert " "
CharLeft 1
CharLeft 1, 1
FormatFont .Points = "12", .Underline = 0, .Color = 1, .Strikethrough
= 0, .Superscript = 1, .Subscript = 0, .Hidden = 0, .SmallCaps = 0,
.AllCaps = 0, .Spacing = "0 pt", .Position = "0 pt", .Kerning = 0,
.KerningMin = "", .Tab = "0", .Font = "Times New Roman", .Bold = 0,
.Italic = 0, .Outline = 0, .Shadow = 0
CharRight 2
Done:
End Sub

Sorry these macros are so trivial, but they do save a little time,
especially if you assign hotkeys to them.

As an example of how I use them, consider a paper which is currently
listed in your references:

Bloggs, F et al (1994) "Widgets are cool!", Nature

Put the insertion point before Bloggs, run ReferenceNumber.  Give the
reference the bookmark Bloggs1994a, and then (if you have set boomarks
visible) your reference will look like:

[1]. Bloggs, F et al (1994) "Widgets are cool!", Nature

The square brackets will not be visible if you have not set bookmarks
visible under Tools, Options.  They won't print whether visible or
not.

Now, to insert a cross reference in your text:

It has been shown that widgets are really quite funky.

Place the insertion point before the period, and run ReferenceTag,
giving it the bookmark Bloggs1994a, and presto, you'll get a
superscript '1'.

This reference numbering system works quite well (and automatically
renumbers things properly if you insert more references in the
middle), but be careful that you don't accidentally put more text in
the middle of the bookmarks.  Set bookmarks visible under Tools
Options so that you can see when you have done so.

Hope these are of use to someone.  If anyone improves these macros,
please send your improved versions back to me so that I can get some
benefit!!! :-) If you find them useful, send me a message anyway!

Cheers!

Tim.

----------------------------------------------------------------------
Refs 7.8 - Bibliography management for Windows 95, NT and Windows 3.1
http://chiark.chu.cam.ac.uk:81/refs/refs.html
Tim Cutts - tjrc1 at mole.bio.cam.ac.uk





More information about the Bio-soft mailing list