3.20.4 Generating layout
Though not strictly necessary, the library attempts to generate reasonable layout in SGML output. It does this only by inserting newlines before and after tags. It does this on the basis of the multifile predicate html_write:layout/3
- html_write:layout(+Tag, -Open, -Close)
- Specify the layout conventions for the element Tag, which is
a lowercase atom. Open is a term Pre-Post.
It defines that the element should have at least Pre newline
characters before and Post after the tag. The Close
specification is similar, but in addition allows for the atom
, requesting the output generator to omit the close-tag altogether or-
empty
, telling the library that the element has declared empty content. In this case the close-tag is not emitted either, but in addition html//1 interprets Arg inTag(Arg)
as a list of attributes rather than the content.A tag that does not appear in this table is emitted without additional layout. See also print_html/[1,2]. Please consult the library source for examples.