A cross-referencing OCamldoc HTML documentation generator
root
Cross-referencing OCamldoc generator
This OCamldoc HTML documentation generator adds support for cross-referencing between online library references (which must also be generated by OCamldoc). It adds three new tags, @xrefv
, @xreft
, and @xref
:
@xrefv Name:Module.valueName *text*
@xreft Name:Module.typeName *text*
@xref Name URL
The text may contain the marker %s
, which will be replaced by a hyperlink that points to the online documentation for the specified type or value. If the text does not contain %s
, the link will be prepended to the text.
The following references are available by default:
ocaml
: OCaml standard librarybat
: OCaml Batteries IncludedoUnit
: OUnit
If no name is specified, the OCaml standard library will be used.
Examples
@xrefv Array.map For further details: %s.
For further details: Array.map.
@xreft Pervasives.in_channel For further details: %s.
For further details: Pervasives.in_channel.
@xrefv Bat:BatList.map %s for further details.
BatList.map for further details.
@xrefv OCaml:List.map for further details.
List.map for further details.
@xref lacaml http://mmottl.bitbucket.org/projects/lacaml/api
@xrefv Lacaml:Lacaml.D.getrs This function uses %s.
This function uses Lacaml.D.getrs.
Requirements
License
This library is copyright (C) 2012 Robert Moss. It is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in the file "LICENSE".
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Installation
make && make install
or simply make install
Usage
ocamldoc.opt -i $(ocamlfind query odoc_xref) -g odoc_xref.cmxs ...
ocamldoc -i $(ocamlfind query odoc_xref) -g odoc_xref.cma ...