[mercury-users] *** Compiling Prolog Documentation ? ***

Marko Schuetz marko at ki.informatik.uni-frankfurt.de
Tue Jul 27 22:19:09 AEST 1999


>>>>> "Nicolas" == Nicolas Nicolov <nicolas at cogs.susx.ac.uk> writes:

Nicolas> We are completing a large NLP parsing project at Sussex implemented 
Nicolas> in Prolog and before going ahead and implementing a documentation
Nicolas> compiler I was wondering if anyone knew of a tool which can compile 
Nicolas> system documentation from suitably annotated sources in either of
Nicolas> these formats XML/HTML/LaTeX (i.e. sth akin to javadoc but for
Nicolas> Prolog)?

This is not particular for prolog:

you can use LaTeX and Olin Shivers code.sty, which gives you
\begin{code}, \end{code}. From that it should be easy to extract the
Prolog source. Anything outside \begin{code} \end{code} is comment
i.e. LaTeX source. The code parts will be typeset similar to
\begin{verbatim} \end{verbatim} but you do have some access to LaTeX
commands from within. Likely, you will not necessarily want all the
code typeset:

\newcommand{\comment}[1]{}

Here comes some \emph{interesting} discussion of the code below.

\begin{code}
<your intersting code here>
\end{code}

\comment{
We discuss the not so interesting code below.
\begin{code}
<your not so interesting code here>
\end{code}
} 

IIRC, there is a more sophisticated \comment available which allows
you to turn comments on or off, thus to typeset everything including
comments or just the parts outside the comments.

Marko
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list