let field_or_empty
?(title_style : [`none | `punct ] = `none)
?(authors_style=`comas)
(fi:field_name) (entry:entry) =
match find_field fi entry with
| Some (`authors al) -> AuthorList.to_string ~style:authors_style al
| Some (`title tit) ->
begin match title_style with
| `none -> tit
| `punct ->
begin match tit.[Str.length tit - 1] with
| '?' | '.' | '!' -> tit
| _ -> tit ^ "."
end
end
| Some (`id id) -> id
| Some (`how how) -> how
| Some (`year y) -> y
| Some (`note n) -> n
| Some (`url s) -> s
| Some (`pdfurl s) -> s
| Some (`comment (_, s)) -> s
| Some (`bibtex s) -> s
| Some (`abstract s) -> s
| Some (`doi s) -> s
| Some (`citation s) -> s
| Some (`tags l) -> String.concat ", " l
| Some (`keywords l) -> String.concat ", " l
| _ -> ""