コード例 #1
0
ファイル: bibtex_converter.php プロジェクト: ricci/papercite
 /**
  * Converts the given string in bibtex format to a string whose format
  * is defined by the passed template string.
  *
  * @access public
  * @param string bibtex Bibtex code
  * @param string template template code
  * @return mixed Result string or PEAR_Error on failure
  */
 function convert($bibtex)
 {
     // TODO Eliminate LaTeX syntax
     $this->_parser->loadString($bibtex);
     $stat = $this->_parser->parse();
     if (!$stat) {
         return $stat;
     }
     return $this->display($this->_parser->data);
 }