グループ

グループを用いると、ディスク上のファイルをディレクトリやサブディレクトリを使って整理するように、BibTeXデータベースをツリー状に構造化することができます。ファイルツリーと違うところは、大きく2つあります。

グループを選択すると、当該グループに属する項目が表示されます。複数のグループを選択すると、現在の設定の状態によって、どれかのグループに属する項目が表示されるか(和集合)、すべてのグループに属する項目が表示されます(積集合)。これらはすべて下記に詳細に説明します。

グループの定義はデータベース毎に為されます。これは、.bibファイル内の@COMMENTブロックに保存され、全ユーザーに共有されます(将来のJabRefではユーザー毎のグループがサポートされるかもしれません)。

制御盤

グループ制御盤は、画面左側のサイド・ペーンに表示されます。CTRL-SHIFT-Gを押すか、ツールバーのグループボタンを押すことで入切することができます。制御盤にはいくつかのボタンがありますが、ほとんどの機能はコンテクストメニュー(「右クリック」)でもアクセスできます。ドラッグ&ドロップもサポートされています。

いくつかの簡単な例

わたしは...

...グループを作成して、いくつかの項目を割り当てたいのです

グループ制御盤が表示されていることを確認します。新規グループボタンを押し、新しいグループの名称を入力、他の値はすべて既定値にしたままでOKボタンを押します。そのグループに所属させたい項目群を選択して、そのグループへドラッグ&ドロップするか、コンテクストメニュー中のグループに追加オプションを選択します。最後に、そのグループを選択して、内容を表示させます(いま所属させた項目が表示されるはずです)。

...keywordsフィールドを使用して項目をグループ分けしたいのです

グループ制御盤が表示されていることを確認します。新規グループボタンを押し、新しいグループの名称を入力、オプションを「フィールド中のキーワードを検索して動的にグループ化」に設定します。検索するキーワードを入力してOKボタンを押します。最後に、そのグループを選択して、内容を表示させます(keywordsフィールドに指定したキーワードが入っている項目すべてが表示されるはずです)。

...自由型検索表現を使ってグループを定義したいのです

グループ制御盤が表示されていることを確認します。新規グループボタンを押し、新しいグループの名称を入力、オプションを「自由型検索表現で動的にグループ化」に設定します。「検索表現」にauthor=smithのように入力し(smithはデータベース中の実際の名前に置き換えてください)、OKボタンを押します。最後に、そのグループを選択して、内容を表示させます(authorフィールドに指定した名前が入っている項目すべてが表示されるはずです)。

...複数のグループを連結したいのです

上述の方法などを使って、2つのグループを作成します。設定ボタンを押して、論理和が選択されていることを確認します。それから2つのグループを選択します。2つのグループのうちどちらかに属している項目がすべて表示されます。設定をもう一度押し、論理積を選択します。すると、両方のグループの属している項目のみが表示されます(全く表示されないかもしれませんし、両方のグループが同じ項目を含んでいる場合には全く同じ項目が表示されます)。

...重複のあるグループを識別したいのです

JabRefでは、現在選択しているグループと重複部分があるグループ(すなわち、そのうち少なくとも1つの項目が現在選択しているグループにも含まれているもの)を簡単に見つけることができます。設定を押して、「重複のあるグループを着色」オプションを有効にします。そして、他のグループと重複しているグループを選択すると、他のグループの方が着色されます。

グループの型

JabRefには、以下の4つのグループ型があります。

  1. 全項目グループは、名称が示すとおり、全ての項目を含んでいて、常に存在し、編集したり削除したりすることはできません。
  2. 静的グループは、ディスク上のディレクトリと同様の働きを示し、明示的に割り当てた項目のみを含みます。
  3. キーワード検索に基づく動的グループには、特定のBibTeXフィールド(例えばkeywords)に特定のキーワード(例えばelectrical)が含まれる項目が含まれます。この方法では、項目を手動で割り当てる必要はなく、データベースに既存の情報を使用します。もしデータベース中の全ての項目が、keywordsフィールドに適切なキーワードが収録されているならば、このグループ型を用いるのがもっとも良い方法でしょう。
  4. 自由型検索表現に基づく動的グループには、指定した検索表現に一致する項目が含まれます。検索表現は、サイド・ペーンの検索パネルと同一の文法を用います。この文法は、論理演算子(ANDORNOT)をサポートし、検索対象として1つ以上のBibTeXフィールドを指定することができるので、キーワード検索よりも柔軟なグループ定義を行うことができます(例:author=smith and title=electrical)。

作成したグループは、上記の後ろ3つの型のいずれかになります。グループをダブルクリックして現れるグループ編集ダイアログでは、選択もしくは編集したグループの定義の説明が、簡便な言葉で表示されます。

グループの構造およびグループの作成と削除

ディレクトリと同様に、グループはツリー状に体系化することができます。この時、全項目グループがルート(ツリーの起点)になります。グループを右クリックすれば、選択したグループと同じ階層かそれよりも下層に、新しいグループを追加することができます。新規グループボタンを押せば、現在選択されているグループの状態に関わらず、全項目グループ配下に、新しい下層グループを加えることができます。コンテキストメニューを使えば、グループや下層グループを削除したり、下層グループをアルファベット順に整序したり、グループをツリー内の別の場所に移動したりすることができます。後者は、ドラッグ&ドロップでも行えるようになっていますが、グループ内の下層グループの順序を変更することはサポートされません。

取り消しと再実行は、編集全てにおいてサポートされています。

静的グループ

静的グループは、項目を明示的に割り当てることによってのみ、作成することができます。静的グループを作成した後、それに割り当てる項目を選択し、ドラッグ&ドロップか主要表のコンテクストメニューを用いて割り当てを行ってください。静的グループから項目を削除するには、項目を選択して、主要表のコンテクストメニューを使ってください。設定できるオプションはありません。

このグループ化法は、全項目が一意的なBibTeX鍵を持っていることを前提としています。BibTeX鍵の欠損や重複がある場合は、それらの項目を割り当てても、後のセッションで正しく呼び出されません。

動的グループ

動的グループの中身は、論理条件によって定義されます。この条件に合致する項目のみがグループに含まれることになります。この方法は、データベース自身に含まれる情報を用い、データベースが変更されると、常に動的に更新されます。

下記の2つの条件型を使用することができます。

フィールド中のキーワードを検索
この方法は、特定のBibTeXフィールド(例えばkeywords)に、特定の検索語(例えばelectrical)が含まれる項目をグループ化します。当然ながら、この方法が機能するためには、すべての項目にグループ化用フィールドが存在しているとともに、その内容が正確でなくてはなりません。上記の用例を用いると、electricalに関係する全ての項目をグループ化することになります。あるいは、authorフィールドを使用すると、著者毎にグループ化することができます。検索は、平文でも正規表現でも行うことができます。前者の場合は、グループ化用フィールドの内容に、手動で検索語を追加したり削除したりするだけで、項目を追加したり削除したりすることができます。この方法は、keywordsフィールドや他の自己定義フィールドでは意味を成しますが、authoryearのようなフィールドでは、明らかに意味を成しません。
自由型検索表現を使用
これは上記と同様ですが、単独フィールドを単独検索語で検索するのではなく、検索表現文法を使用することができます。これは、論理演算子(ANDORNOT)をサポートし、複数のBibTeXフィールドを検索することができます。例えば、keywords=regression and not keywords=linearという検索表現は、非線形回帰に関係した項目をグループ化します。

グループ表示において、動的グループは、既定値でイタリック体で表示されます。この表示は、設定(オプション→設定→グループ→「動的グループをイタリック体で表示」チェックボックス)で、止めることができます。

Hierarchical context

By default, a group is independent of its position in the groups tree: When selected, only the group's contents are shown. However, especially when using dynamic groups, it is often useful to define a subgroup that refines its supergroup, i.e., when selected, entries contained in both groups are displayed. For example, create a supergroup containing entries with the keyword distribution and a subgroup containing entries with the keyword gauss that refines this supergroup. Selecting the subgroup now displays entries that match both conditions, i.e. are concerned with Gaussian distributions. By adding another refining subgroup for laplace to the original supergroup, the grouping can easily be extended. In the groups tree, refining groups have a special icon (this can be turned off in the preferences).

The logical complement to a refining group is a group that includes its subgroups, i.e. when selected, not only the group's own entries, but also its subgroups' entries are shown. In the groups tree, this type of group has a special icon (this can be turned off in the preferences).

Viewing a group's entries, combining multiple groups

Selecting a group shows the entries contained in that group by highlighting them and, depending on the settings (accessible by clicking the Settings button), moving them to the top of the list and/or selecting them. These options are identical to those available for the regular search.

When multiple groups are selected, either the union or the intersection of their content is shown, depending on the current settings. This allows to quickly combine multiple conditions, e.g. if you have a static group Extremely Important to which you assign all extremely important entries, you can view the extremely important entries in any other group by selecting both groups (this requires to have Intersection selected in the settings).

Groups and searching

When viewing the contents of the selected group(s), a search can be performed within these contents using the regular search facility.

Highlighting overlapping groups

The Settings button offers an option to highlight overlapping groups. If this is activated, upon selection of one or more groups, all groups that contain at least one of the entries contained in the currently selected group(s) are highlighted. This quickly identifies overlap between the groups' contents. You might, for example, create a group To Read that contains all entries which you plan to read. Now, whenever you select any group, the group To Read is highlighted if the selected group contains entries that you plan to read.

Advanced features

After mastering the grouping concepts described above, the following advanced features might come in handy.

Automatically creating dynamic groups

By clicking the Automatically create groups for database button, you can quickly create a set of groups appropriate for your database. This feature will gather all words found in a specific field of your choice, and create a group for each word. This is useful for instance if your database contains suitable keywords for all entries. By autogenerating groups based on the keywords field, you should have a basic set of groups at no cost.

You can also specify characters to ignore, for instance commas used between keywords. These will be treated as separators between words, and not part of them. This step is important for combined keywords such as laplace distribution to be recognized as a single semantic unit. (You cannot use this option to remove complete words. Instead, delete the unwanted groups manually after they were created automatically.)

Refreshing the groups view

The Refresh button updates the entry table to reflect the current groups selection. This is usually done automatically, but in rare occasions (e.g. after a group-related undo/redo) a manual refresh is required.

Mixing refining groups with including groups

If a refining group is a subgroup of a group that includes its subgroups -- the refining group's siblings --, these siblings are ignored when the refining group is selected.