<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="BibTeX" version="1.13" kateversion="2.4" extensions="*.bib" section="Markup" mimetype="text/x-bib" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)" license="LGPL">
  <highlighting>
    <list name="kw_entry">
      <item>@article</item>
      <item>@book</item>
      <item>@booklet</item>
      <item>@conference</item>
      <item>@inbook</item>
      <item>@incollection</item>
      <item>@inproceedings</item>
      <item>@manual</item>
      <item>@mastersthesis</item>
      <item>@misc</item>
      <item>@phdthesis</item>
      <item>@proceedings</item>
      <item>@techreport</item>
      <item>@unpublished</item>
      <item>@collection</item>
      <item>@patent</item>
    </list>
    <list name="kw_command">
      <item>@string</item>
      <item>@preamble</item>
      <item>@comment</item>
    </list>
    <contexts>
      <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
        <RegExpr String="([a-zA-Z]+)\s*=" attribute="Field" context="#stay" firstNonSpace="true" />
        <keyword String="kw_entry" attribute="Entry" context="Entry"/>
        <keyword String="kw_command" attribute="Command" context="#stay"/>
        <DetectChar char="{" attribute="Normal Text" context="#stay" beginRegion="block" />
        <DetectChar char="}" attribute="Normal Text" context="#stay" endRegion="block" />
        <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
        <DetectChar char="&quot;" attribute="String" context="String"/>
      </context>

      <context name="Entry" attribute="Ref Key" lineEndContext="#stay">
        <DetectChar char="," attribute="Normal Text" context="#pop"/>
        <DetectChar char="{" attribute="Normal Text" context="#stay" beginRegion="block" />
        <DetectChar char="}" attribute="Normal Text" context="#stay" endRegion="block" />
        <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
        <DetectChar char="&quot;" attribute="String" context="#pop"/>
      </context>

      <context name="String" attribute="String" lineEndContext="#stay">
        <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
        <DetectChar char="&quot;" attribute="String" context="#pop"/>
      </context>
    </contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal"/>
      <itemData name="Entry" defStyleNum="dsKeyword" color="#0000ff"/>
      <itemData name="Command" defStyleNum="dsFunction"/>
      <itemData name="Field" defStyleNum="dsDataType"/>
      <itemData name="Ref Key" defStyleNum="dsOthers"/>
      <itemData name="String" defStyleNum="dsString"/>
      <itemData name="Char" defStyleNum="dsChar"/>
    </itemDatas>
  </highlighting>
  <general>
   <keywords casesensitive="0" weakDeliminator="\" wordWrapDeliminator=",{}[]"/>
  </general>
</language>
