def key=(key)
      key = key.to_s

      if registered?
        bibliography.entries.delete(@key)
        key = register(key)
      end

      @key = key
    rescue => e
      raise BibTeXError, "failed to set key to #{key.inspect}: #{e.message}"
    end
def key=(key)
      key = key.to_s

      if registered?
        bibliography.entries.delete(@key)
        key = register(key)
      end

      @key = key
    rescue => e
      raise BibTeXError, "failed to set key to #{key.inspect}: #{e.message}"
    end
Sets the Entry's key. If the Entry is currently registered with a
 Bibliography, re-registers the Entry with the new key; note that this
 may change the key value if another Entry is already regsitered with
 the same key.

 Returns the new key.