function toReference( id, options ) {
	var outFile;
	var inFile;
	var eopts;
	var ropts;
	var opts;
	var data;
	var tmp;
	var cmd;
	var err;

	if ( !isString( id ) ) {
		throw new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', id ) );
	}
	opts = copy( defaults );
	if ( arguments.length > 1 ) {
		err = validate( opts, options );
		if ( err ) {
			throw err;
		}
	}
	debug( 'Options: %s', JSON.stringify( opts ) );

	tmp = tmpdir();
	debug( 'Temporary file directory: %s', tmp );

	inFile = Date.now() + '_' + minstd() + '.md';
	inFile = join( tmp, inFile );
	debug( 'Temporary input file: %s', inFile );

	outFile = Date.now() + '_' + minstd() + '.md';
	outFile = join( tmp, outFile );
	debug( 'Temporary output file: %s', outFile );

	cmd = getCommand( inFile, outFile, opts );
	debug( 'Command: %s', cmd );

	data = wrap( id );
	debug( 'Temporary input file data: %s', data );

	debug( 'Writing temporary input file...' );
	writeFile( inFile, data );
	debug( 'Successfully created temporary input file.' );

	eopts = {
		'cwd': cwd()
	};
	debug( 'Converting temporary input file...' );
	data = exec( cmd, eopts );
	debug( 'Successfully converted temporary input file.' );

	rm( inFile );

	debug( 'Reading temporary output file...' );
	ropts = {
		'encoding': 'utf8'
	};
	data = readFile( outFile, ropts );
	if ( data instanceof Error ) {
		debug( 'Encountered an error when attempting to read temporary output file: %s. Error: %s', outFile, data.message );
		throw data;
	}
	debug( 'Successfully read temporary output file.' );

	rm( outFile );

	data = data.toString();
	debug( 'Raw results: %s', data );

	data = transform( data );
	debug( 'Transformed results: %s', data );

	return data;
}
Synchronously return a reference corresponding to a citation identifier.

@param {string} id - citation identifier
@param {Options} [options] - function options
@param {string} [options.database] - path to a bibliography database file
@param {string} [options.csl] - path to a Citation Style Language (CSL) file
@returns {string} reference

@example
var ref = toReference( '@press1992' );
// returns '...'