#NEWLINE# def format_inline_cite( entries , keys , all_keys ) : #NEWLINE# #INDENT# formatted_list = [ ] #NEWLINE# assert ( len ( entries ) == len ( keys ) ) #NEWLINE# for i in range ( len ( entries ) ) : #NEWLINE# #INDENT# if ( not entries [ i ] ) : #NEWLINE# #INDENT# formatted_list . append ( keys [ i ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# formatted_list . append ( ( '%d' % ( all_keys . index ( keys [ i ] ) + 1 ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return ( ( '(' + ', ' . join ( all_keys ) ) + ')' )