PlDoc --- SWI-Prolog source documentation

The pldoc module processes structured comments in Prolog source files. These comments can be saved to file. During development the documentation system can start a web-server to view the documentation of loaded sources through your browser. The server is defined in the file and started through doc_server/1.

During development, a typical scenario is to first start the documentation server and start a browser at http://localhost:4000. Note that by default the web-pages allow for starting an editor only if the connection comes from localhost. See doc_server/2 to realise a different setup.

:- doc_server(4000).
:- [application].
- Jan Wielemaker
See also
- doc_server/1, doc_server/2, doc_collect/1.

Prolog files

doc_access.plShow source
host_access_options/2Filter the authorization options from AllOptions, leaving the remaining options in NoAuthOptions.Source  -- Source colouring supportShow source
colour_fragments/2Create a list of colour fragments from In.Source  -- PlDoc HTML backendShow source
doc_file_objects/5Extracts relevant information for FileSpec from the PlDoc database.Source
doc_for_file/2HTTP handler that writes documentation for File as HTML.Source
doc_for_wiki_file/2Write HTML for the File containing wiki data.Source
doc_hide_private/3Remove the private objects from Objs according to Options.Source
doc_page_dom/3Create the complete HTML DOM from the Title and Body.Source
doc_resources/3Include required resources (CSS, JS) into the output.Source
doc_tag_title/2Title is the name to use for Tag in the generated documentation.Source
doc_write_html/3Write HTML for the documentation page DOM using Title to Out.Source
edit_button/4Create an edit button for File.Source
ensure_doc_objects/1Ensure we have documentation about File.Source
existing_linked_file/2True if File is a path to an existing file relative to the current file.Source
file/3Create a link to another filename if the file exists.Source
file/4Create a link to another filename if the file exists.Source
file_header/4Create the file header.Source
include/5Inline FileName.Source
is_op_type/2True if Atom is an operator of Type.Source
is_pi/1True if Term is a predicate indicator.Source
mode_anchor_name/2Get the anchor name for a mode.Source
module_info/3Add options module(Name), public(Exports) to OtherOptions if File is a module file.Source
multifile/2True if Obj is a multifile predicate.Source
object_edit_button/4Create a button for editing Object.Source
object_href/2HREF is the URL to access Object.Source
object_name/4HTML description of documented Obj.Source
object_page/4Generate an HTML page describing Obj.Source
object_page_footer/4Call the hook doc_object_page_footer//2.Source
object_ref/4Create a hyperlink to Object.Source
object_source_button/4Create a button for showing the source of Object.Source
object_synopsis/4Provide additional information about Obj.Source
object_tree/5Render a tree of objects used for navigation.Source
objects/4Emit the documentation body.Source
pred_anchor_name/3Create an HTML anchor name from Head.Source
pred_edit_button/4Create a button for editing the given predicate.Source
predref/3Create a reference to a predicate.Source
predref/4Create a reference to a predicate.Source
print_html_head/1Print the DOCTYPE line.Source
private/2True if Obj is not exported from Options.Source
source_button/4Add show-source button.Source
tags/3Emit the @tag tags of a description.Source
term/5Process the \term element as produced by
unquote_filespec/2Translate e.g.Source
zoom_button/4Add zoom in/out button to show/hide the private documentation.Source
doc_is_public_object/1Hook that allows objects to be displayed with the default public-only view.  -- HTML source pretty-printerShow source  -- Create indexesShow source  -- Process SWI-Prolog HTML manualsShow source  -- Analyse PlDoc mode declarationsShow source
compile_clause/2Add a clause to the compiled program.Source
compile_mode/2Compile a PlDoc mode declararion into a term mode(Head, Determinism).Source
is_mode/1True if Head is a valid mode-term.Source
mode/2True if there is a mode-declaration for Head with Det.Source
mode_indicator/1Our defined argument-mode indicators.Source
modes_to_predicate_indicators/2Create a list of predicate indicators represented by Modes.Source
process_modes/6Process the formal header lines (upto the first blank line), returning the remaining lines and the names of the arguments used in the various header lines.Source  -- PlDoc for Prolog extension packsShow source
doc_pack/1Generate stand-alone documentation for the package Pack.Source  -- Process source documentationShow source
doc_register.plShow source  -- Search form and replyShow source  -- PlDoc utilitiesShow source  -- PlDoc wiki parserShow source
autolink_extension/2True if Ext is a filename extensions that create automatic links in the documentation.Source
autolink_file/2Files to which we automatically create links, regardless of the extension.Source
indented_lines/3Extract a list of lines without leading blanks or characters from Prefix from Text.Source
normalise_white_space/3Text is input after deleting leading and trailing white space and mapping all internal white space to a single space.Source
section_comment_header/3Processes /** <section> comments.Source
strip_leading_par/2Remove the leading paragraph for environments where a paragraph is not required.Source
summary_from_lines/2Produce a summary for Lines.Source
wiki_codes_to_dom/3Translate a plain text into a DOM term.Source
wiki_lines_to_dom/3Translate a Wiki text into an HTML term suitable for html//1 from the html_write library.Source
doc_wiki_face/4Hook that can be used to provide additional processing for additional inline wiki constructs.
url_expansion_hook/3This hook is called after recognising <Alias:Rest>, where Term is of the form Alias(Rest).