![]() |
Editing Bib Items |
In this section, you can find how to create and edit bib items. This section contains the following topics.
To create a new database item, press <New Bib Item> button just above the items list or choose [BibItem - Append Bib Item] menu. A new bib item with bib key of “_untitled_nnnn” (nnnn is a number) is created in the selected database and the item is ready to edit. When you select a library or a library group in the database list, and if only one database is opened, the new item is appended to the opened database, while if plural database is opened, target database choice appears.
Before editing bib fields, you should choose ‘bibtype’. By default, ‘ARTICLE’ is selected that is used for a paper in a journal. ‘bibtype’ menu shows only standard types of BibTeX, however, you can enter any kind of type manually. If you frequently uses non-standard types, it is better to define them in the bib types tab of BibCompanion preferences.
When a new bib item is created, detail information panel becomes editing mode. In the editing mode, a button with key icon (editing button) at the bottom of the main window shows unlocked key and input support panel appears at the bottom of the main window. When BibCompanion is launched, bib items are in locked mode to prevent unwanted change to the items. If you want to edit an item, click on the editing button or choose [BibItem - Unlock Item Edit] menu. Double clicking on an item in the item list also makes the item into edit mode. When you finished editing, click the editing button again or choose [BibItem - Lock Item Edit] menu.
Expressions in detail information panel is different between the edit mode and the locked mode. If it is in the edit mode, field contents are displayed as you typed, that is, TeX commands etc. is shown as is. While in the locked mode, TeX commands are converted to unicode letters as possible. Despite the locked mode, field data can be selected and copied in the detailed information panel.
The following is brief explanations of frequently used types and fields. Please refer to BibTeX books or web sites for complete type definition and field usage of standard types. Text in all fields should be followed TeX input rules.
Bib fields can be edited in the detail information panel. The panel has 4 tabs, [Basic Info], [Optional Info], [Annotation], [Links] and [RAW field].
When bib item is in edit mode, the input support panel is appeared below (or above) the main window. The panel has a macro popup menu, a generate bibkey button and grouped input buttons.
When you are editing a field, you can put a macro from this menu. There are three parts in the menu, [Edit Macros] command, database macros and general macros. Those are separated by separator lines.
Using the [Edit Macros] command is explained below.
The database macros are macros defined in a database. Those are save in the database file with @STRING{}.
The general macros are macros defined in a BibTeX style file (.bst). Those can be edited in the macros tab of BibCompanion preferences. As explained below, a field with a macro should begin with ‘@’. This menu automatically append a letter ‘@’.
BibCompanion can generate a bib key from field data. See the topic below for more detail.
When you are editing a field, you can put a special letters or mathematical symbols using those buttons. There are three groups of buttons, letters with accents, greek letters and others. Usage of those buttons are basically the same. When you press a button, corresponding TeX command is inserted at the cursor position.
For accent buttons with accent names (14 long buttons), you can choose a letter prior to press the button. In this case, the selected letter is used for a base letter of the accent. For example, if you select a letter ‘a’ of “Chab” and press [Acute] button, ‘a’ is replaced by ‘{\'a}’. If no selection is made, ‘{\'e}’ which is denoted in the button name is inserted.
For greek letters and most of math symbols, TeX commands for those characters should be surrounded by math mode character ‘$’. BibCompanion automatically detects a mode at the cursor position and insert ‘$’ if it is not in math mode.
Several math symbol buttons have parameters (‘A’ is used in the button name). It works as the accent buttons, select a parameter string first, then press a button with parameter. For example, if you select ‘31’ and press [√A] button, the selection is replaced by ‘$\sqrt{31}$’.
30 button definitions of the group [Others] can be customized by pressing [Edit Buttons] button in the panel. See Customizing Input Support Buttons for more detail.
BibCompanion can generate bibkeys for bib items by pressing [Generate BibKey] button or choose [BibItem - Generate a BibKey/Generate BibKeys]. When you press the button or choose <Generate a BibKey> menu, bib key of currently editing bib item is generated. If you choose <Generate BibKeys>, all selected bib items in the bib items list are target.
By default, a generated key consists of the following three parts connected by colons.
For example, if the following fields are set as
the generated key is “NakaharaH:JJAP34:2003”.
The generation rule can be customized in the general settings of BibCompainon preferences.
Macros are very useful especially for journal names, publisher names and moths because those names in a reference list may slightly different in different journal. For example, the journal “Surface Science” is commonly abbreviated as “Surf. Sci.” but in some papers, it should be “Surface Sci.”. Therefore if you put a journal field as
journal: [Surf. Sci.],
you should replace all occurrences of “Surf. Sci.” to “Surface Sci.” in the latter case. To reduce such an effort, use a macro as
Journal: [@SS],
and set “SS” to “Surf. Sci.” in macro definition (how to define a macro is explained later). Once you put a journal name by a macro, only you should do is to change the macro definition.
There are several rules to use macros in bib fields.
You can put macros by hands but it is easier to use macro input menu in the input support panel. If you put a macro from the menu, ‘@’ is automatically inserted at the beginning. If some string is already entered, existing string is surrounded by double quotes and connected by ‘#’. If a macro is already entered, it is also connected by ‘#’. Macro menu is disabled when you are editing a field where you can not use macros.
You can edit macro definitions by choosing [Edit Macors] menu in the [Input Macro] menu of the input support panel, or choose [File - Edit Macros] menu. Then the following window will appear.
In the list, [Macro Name] is a name of a macro and [Macro Data] is an expanded string of the macro name.
You can edit it by double clicking on a cell. If you double click on a empty cell at the end of the list, you can add a new macro. You can also insert a new macro by pressing [Insert New Macro] button. When you select a macro and press <delete> key or enter empty string for a macro name, the macro is deleted.
Macro name should start with an alphabet and spaces and symbols (such as ‘#’, ‘$’) are not allowed to use (hyphen and underscore can be used). If you make a macro name that already used in the list or macro name with illegal characters (such as a space), the name is shown in red and can not be fixed. Upper and lowercase of the macro name has no meaning with BibTeX. BibCompanion converts all letters in macro names to uppercase.
In the macro data, there is no limitation for characters, however, symbols should be in TeX format. The macro data can be a simple string as [J. Chem. Phys.] or more complex one with other macros such as [@_J # " of the " # _PHYS # " Society of " # _JPN]. As same as macro usage in a field, macro data that contains another macro should begins with ‘@’ and macros and strings should be connected by ‘#’. ‘#’ operator does not include any space, so that you should include a space explicitly in a string if you need. The order of macros is important when macro data contains another macro (i.g. [APA] in the above figure). A referred macro ([_APPHY] in this case) should be placed above a macro that uses one. You can change order of macros by dragging one (or some) to desired position in the list. It is recommended to make a name of referred macro begins with ‘_’. Because, when [Sort] button pressed, macros begin with ‘_’ always gathered on top of the list.