This package will set up a mode for writing BibTEX styles.

It contains of:

  • Mode Settings
  • Menu additions (Insert menu, Help menu, Options menu)
  • Static and Dynamic Highlighting
  • Dynamic Word Completion (requires WinEdt 5.4, Build 20040504 or higher)
  • GDI additions
  • Active String

Mode Settings

If you install the BibStyle mode, files with the extensions .bst will automatically be recognized as BibTEX style files.


In the Options | Configurations menu, a new item BibStyle Editor will be inserted. Choosing this item will change the Insert and the Help menu.

The Insert menu contains all BibTEX style functions and commands, grouped by topic. Some of them will also insert bullets. Furthermore, the menu contains commands for inserting or completing all built-in and user-defined functions, fields, string and integer variables.

In the Help menu, you'll find a link to the reference for designing BibTEX styles.

If it doesn't already exist, a new menu item called Update Dynamic Keywords will be added to the Tools Menu. This command will update highlighting and completions.

It will not only be useful for this BibStyle mode, but for all other modes that use the `Dynamic Keywords' package.

NOTE: The BibSyle mode does not provide a custom tool bar. The simple reason for this is that I don't use a tool bar at all. If you would like to provide one, I would be more than happy to include it in this package.


Highlighting contains of two parts: static highlighting, i.e. switches and built-in keywords, and dynamic highlighting.

  1. The following switches will be added:
    • 'Assignments
    • "Strings"
    • #Integers
    • % Comments
    The following built-in keywords will be highlighted:
    • Commands (e.g. FUNCTION, READ)
    • Functions (e.g. skip$, if$)
  2. Dynamic highlighting means, that the user-defined fields, functions, macros, and string and integer variables will be gathered from the current file and highlighted (and they will also be available for word completion). Thus, there should not be a single word in your BibTEX style file that is not highlighted.
    The list of functions will automatically be updated when you define a new one. You can also use the menu command Update Dynamic Keywords, located in the Tools Menu, or you can double-click on the word FUNCTION to update keywords.
    Also, you can choose on installation whether you want dynamic highlighting to be automatically updated whenever you open a BibTEX style file.

The sample file will give you a better idea (colours might be different on your system).

Word Completion

Word completion (default shortcut: CTRL-Enter) has been substantially enhanced in this mode. It will complete the current word, or offer a list of possible completions. So far, nothing new. But: All user-defined functions, fields, and string and integer variables will also be available for completion. Furthermore, you can choose the category (function, string, integer, field) from which the word should be inserted/completed, at the end of the list.

Also, in contrast to the default Complete Word command, you can call it without having typed any first character(s). You will then be presented with the list of all commands.

Command insertion/completion can also be called from the Insert Menu.


A Gather page definition for functions will be added to WinEdt.gdi (respectively to the ConfigEx folder in WinEdt 5.5).

Active String

A new Active String FUNCTION?{?} will be added to your configuration, so that the list of functions will be automatically updated, whenever you define a new one.

Installation Instructions

To install BibStyle Mode,

  • extract the zip file to the folder %b\Config\BibStyle\
    (%b is WinEdt's user configuration directory, e.g.:
    C:\Documents and Settings\<username>\Application Data\WinEdt)
  • and execute the macro _install_BibStyle.edt (Macro | Execute Macro...)

After installation, you have to restart WinEdt for the changes to become effective. You can then open the sample.bst file, choose the menu item Tools | Update Dynamic Keywords and watch all words get highlighted.

If you are upgrading this package, you can simply install it over the old version.

Download [19 KB]

This mode requires the two macro packages: (version 1.3) and
which both have to be saved in %b\Macros\macro (preferably) or %B\Macros\macro.

Mode contributed by Robert <>