def [](*arguments)
      raise(ArgumentError, "wrong number of arguments (#{arguments.length} for 1..2)") unless arguments.length.between?(1,2)

      case
      when arguments[0].is_a?(Numeric) || arguments[0].is_a?(Range)
        data[*arguments]
      when arguments.length == 1
        case
        when arguments[0].nil?
          nil
        when arguments[0].respond_to?(:empty?) && arguments[0].empty?
          nil
        when arguments[0].is_a?(Symbol)
          entries[arguments[0]]
        when arguments[0].respond_to?(:start_with?) && !arguments[0].start_with?('@', '!@')
          entries[arguments[0]]
        else
          query(*arguments)
        end
      else
        query(*arguments)
      end
    end
def [](*arguments)
      raise(ArgumentError, "wrong number of arguments (#{arguments.length} for 1..2)") unless arguments.length.between?(1,2)

      case
      when arguments[0].is_a?(Numeric) || arguments[0].is_a?(Range)
        data[*arguments]
      when arguments.length == 1
        case
        when arguments[0].nil?
          nil
        when arguments[0].respond_to?(:empty?) && arguments[0].empty?
          nil
        when arguments[0].is_a?(Symbol)
          entries[arguments[0]]
        when arguments[0].respond_to?(:start_with?) && !arguments[0].start_with?('@', '!@')
          entries[arguments[0]]
        else
          query(*arguments)
        end
      else
        query(*arguments)
      end
    end
call-seq:
 >> bib[-1]
 => Returns the last element of the Bibliography or nil
 >> bib[1,2]
 => Returns the second and third elements or nil
 >> bib[1..2]
 >> Same as above
 >> bib[:key]
 => Returns the first entry with key 'key' or nil
 >> bib['key']
 => Same as above
 >> bib['@article']
 => Returns all entries of type 'article' or []
 >> bib['@preamble']
 => Returns all preamble objects (this is the same as Bibliography#preambles) or []
 >> bib[/ruby/]
 => Returns all objects that match 'ruby' anywhere or []
 >> bib['@book[keywords=ruby]']
 => Returns all books whose keywords attribute equals 'ruby' or []

 Returns an element or a list of elements according to the given index,
 range, or query. Contrary to the Bibliography#query this method does
 not yield to a block for additional refinement of the query.