let build
?(print_comments=false) ?separate_header ?table_caption_after
?img_hook ?url_hook ?href_is_footnote ~writer () =
let t =
create ~writer ?href_is_footnote
?separate_header ?img_hook ?url_hook ?table_caption_after () in
let printer = {
Signatures.
print_comment =
if print_comments then
(handle_comment_line t)
else
(fun a b -> ());
print_text = handle_text t;
enter_cmd = start_command t;
leave_cmd = stop_command t;
terminate = terminate t;
is_raw = Commands.Raw.is_raw_cmd;
default_raw_end = Commands.Raw.default_raw_end;
enter_raw = start_raw_mode t;
print_raw = handle_raw_text t;
leave_raw = stop_raw_mode t;
error = writer.Signatures.w_error; } in
printer