let write table str = let the_buffer = match table.current_cell with | None -> table.caption | Some c -> c.cell_text in Buffer.add_string the_buffer str; ()