' . $a . '' ; } // Create citations from bibtex entries. One argument per bibtex entry. /* Example: As shown in , one can use bibtex within HTML/PHP. */ function cite() { global $citations; $entries = func_get_args(); // list of bibtex entries $refs = array(); // corresponding references foreach ($entries as $entry) { if ( array_key_exists ( $entry , $citations ) ) { $ref = $citations[$entry] ; } else { $ref = count( $citations ) + 1 ; $citations[$entry] = $ref ; } $refs[] = $ref; } sort( $refs ); $links = array_map( 'linkify', $refs ); echo "[" . implode(",",$links) . "]" ; } // prepare bibtexbrowser query function make_bibtexbrowser_bibliography_keys() { global $citations; return json_encode(array_flip($citations)) ; } function make_bibliography() { global $_GET; $_GET = array(); $_GET['bib']='mg.bib'; $_GET['bibliography']=1; // sets assoc_keys $_GET['keys']=make_bibtexbrowser_bibliography_keys(); //print_r($_GET); include( 'bibtexbrowser.php' ); } ?>