[ library(pretty_printer) | Reference Manual | Alphabetic Index ]

pretty_print(++Files)

Print a file in html format
Files
a filename (atom or string), or a list of filenames

Description

The system prints the contents of the file given as the argument as an output file in html format. This is one of the possible formats supported by the pretty printer (see pretty_print/2). The system automatically adds the extension .html and places the result in a subdirectory called 'pretty' relative to the source file. Syntax coloring is used to highlight different language features, and a uniform formatting of the source code is used.

As the clauses are read with the normal Prolog read routine, comments within clauses are lost, but comments and spacing between clauses is preserved.

Hyperlinks are used for documented builtin predicates, as well as predicates defined in the same file. For a built-in, the hyperlink will lead to the manual page of the predicate, for other predicates the link points to the first definition of the predicate. The hyperlinks to the builtins are based on the installation directory of Eclipse, so that the resulting output will normally not work on a machine where eclipse is installed in a different directory.

If a list of several files is given, an additional index page index.html with links to the individual pretty-printed source files will be generated.

The pretty printer does not check for undefined predicates or predicates that are defined in included files.

The colours used are similar to those used by the EMACS Eclipse mode. Colours are used more consistently than in the EMACS editor, as the source text is parsed completely.

You can modify the colour scheme by modifying the style sheet style.css which is located in the directory where the .html files get generated (by default the subdirectory 'pretty'). The pretty-printer will generate a default style sheet file if none exists, but not touch any existing one.

Examples

?- pretty_print(simple').

See Also

pretty_print / 2