darioteixeira/lambdoc
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
========================================================================= | README for Lambdoc | | | | http://lambdoc.forge.ocamlcore.org/ | | | | Dario Teixeira (dario.teixeira@yahoo.com) | ========================================================================= 1. Overview =========== Lambdoc is a library providing support for semantically rich documents in web applications, built with Ocsigen/Eliom [1] integration in mind. It includes parsers for four different markup languages: Lambtex, Lambxml, Lambwiki, and Markdown. The first is inspired by LaTeX, the second is an XML-based markup based on HTML, the third is a lightweight markup language in the spirit of Wiki Creole, and the last is the popular lightweight markup language. The library also includes the possibility of outputing any Lambdoc document as an Ocsigen (Tyxml) HTML5 value. Additional capabilities include the runtime customisation of available document features (you may, for example, declare that a certain class of users is only allowed to produce documents containing nothing more than paragraphs of plain text), detailed error messages, and the definition of basic macros. It also ships with 'lambcmd', a CLI application that allows the conversion between any of the input formats into one of the supported output targets. 2. Dependencies =============== The library depends on Batteries [2], Pcre-ocaml [3], Sexplib [4], Ulex [5], Menhir [6], PXP [7], Xstrp4 [8], Tyxml [9], OMD [10], Blahcaml [11], and Camlhighlight [12]. 3. Building and installing ========================== To build only the library run 'make lib'. To perform a Findlib installation of the library run 'make install' or 'make reinstall'. To remove the package run 'make uninstall'. The API documentation can be built with 'make doc'. If you also wish to build the lambcmd command line utility, issue 'make lambcmd'. Finally, if you wish to build everything (library + lambcmd) you may simply run 'make all' or just 'make'. 4. License ========== Lambdoc is distributed under the terms of the GNU GPL version 2. See LICENSE file for full license text. 5. Notes on the provided CSS ============================ Inside the 'css' directory you will find the sample CSS adapted to the HTML5 output generated by the Lambdoc_write_html5 module. It is fairly simple yet pleasant looking, and a good starting point if you want to customise it for your own sites. You will note that most elements are given their own class name, prefixed by the identifier 'doc'. Inline bold elements, for example, are identified by the class 'doc_bold'. This solution was preferred over the alternative of referrencing '.doc b' because it has much better performance. It does have the disadvantage of producing larger markup, however. References ========== [1] http://www.ocsigen.org/ [2] http://batteries.forge.ocamlcore.org/ [3] http://www.ocaml.info/home/ocaml_sources.html#pcre-ocaml [4] http://www.ocaml.info/home/ocaml_sources.html#sexplib [5] http://www.cduce.org/download.html [6] http://cristal.inria.fr/~fpottier/menhir/ [7] http://projects.camlcity.org/projects/pxp.html [8] http://projects.camlcity.org/projects/xstrp4.html [9] http://www.ocsigen.org/tyxml [10] http://github.com/ocaml/omd [11] http://blahcaml.forge.ocamlcore.org/ [12] http://camlhighlight.forge.ocamlcore.org/