#!/usr/local/bin/perl
use latex;
use Data::Dumper;
$f=shift;

@doc = greplatexcom("documentclass",[["args"],"t"],$f);
print Dumper(\@doc);
@t=    greplatexcom("title",["t"],$f);
@sec=  greplatexcom("section",["t"],$f);
@au=   greplatexcom("author",["t"],$f);
@date= greplatexcom("date",["t"],$f);
$abs=  theenv("abstract",$f);

$type = bichop($doc[0]->{"t"});
$aut  = $au[0]->{t};
($k= $aut) =~ tr{a-záéíóúãõâêôç {}}{}d ;

print 
"\@$type\{$k,
  author=$aut,
  title=$t[0]->{t},
  abstract={$abs},
  year=$date[0]->{t}}\n\n";

