caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] syntax highlighting of ocaml code in html
@ 2015-06-28 16:42 Robert Muller
  2015-06-28 17:01 ` Gabriel Scherer
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Muller @ 2015-06-28 16:42 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

An opam search and googling a bit fails to turn up an obvious standard tool
for publishing highlighted ocaml code in html. Is there a standard tool?
caml2html?, highlight.js?, cow?
thank you,
Bob Muller

[-- Attachment #2: Type: text/html, Size: 244 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] syntax highlighting of ocaml code in html
  2015-06-28 16:42 [Caml-list] syntax highlighting of ocaml code in html Robert Muller
@ 2015-06-28 17:01 ` Gabriel Scherer
  2015-06-28 17:02 ` Daniel Bünzli
  2015-06-29  7:54 ` Francois Berenger
  2 siblings, 0 replies; 4+ messages in thread
From: Gabriel Scherer @ 2015-06-28 17:01 UTC (permalink / raw)
  To: Robert Muller; +Cc: caml users

I don't think it is standard by any means, but I have had good success
using GNU source-highlight in the past. Just "source-highlight foo.ml"
produces a foo.ml.html. (--doc or --no-doc can be used depending on
whether on not one wants the html produced to be self-contained).

On Sun, Jun 28, 2015 at 6:42 PM, Robert Muller <robert.muller2@gmail.com> wrote:
> An opam search and googling a bit fails to turn up an obvious standard tool
> for publishing highlighted ocaml code in html. Is there a standard tool?
> caml2html?, highlight.js?, cow?
> thank you,
> Bob Muller

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] syntax highlighting of ocaml code in html
  2015-06-28 16:42 [Caml-list] syntax highlighting of ocaml code in html Robert Muller
  2015-06-28 17:01 ` Gabriel Scherer
@ 2015-06-28 17:02 ` Daniel Bünzli
  2015-06-29  7:54 ` Francois Berenger
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Bünzli @ 2015-06-28 17:02 UTC (permalink / raw)
  To: Robert Muller; +Cc: caml-list

Le dimanche, 28 juin 2015 à 17:42, Robert Muller a écrit :
> An opam search and googling a bit fails to turn up an obvious standard tool for publishing highlighted ocaml code in html. Is there a standard tool? caml2html?, highlight.js?, cow?

Don't know if it's standard but for my log I use higlo [1] which if you are using markdown can be used on the command line with omd [2] as follows:

omd -r ocaml=higlo

Both can be installed via opam.  

Best,

Daniel

[1] http://zoggy.github.io/higlo/
[2] https://github.com/ocaml/omd


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] syntax highlighting of ocaml code in html
  2015-06-28 16:42 [Caml-list] syntax highlighting of ocaml code in html Robert Muller
  2015-06-28 17:01 ` Gabriel Scherer
  2015-06-28 17:02 ` Daniel Bünzli
@ 2015-06-29  7:54 ` Francois Berenger
  2 siblings, 0 replies; 4+ messages in thread
From: Francois Berenger @ 2015-06-29  7:54 UTC (permalink / raw)
  To: caml-list

On 06/28/2015 06:42 PM, Robert Muller wrote:
> An opam search and googling a bit fails to turn up an obvious standard
> tool for publishing highlighted ocaml code in html. Is there a standard
> tool? caml2html?, highlight.js?, cow?

https://github.com/mjambon/caml2html

looks like what you are looking for or close.

Also, in emacs you can use htmlize-buffer if you have
/usr/share/emacs/site-lisp/emacs-goodies-el/htmlize.el
installed (provided by the package emacs-goodies-el on Debian/Ubuntu).

> thank you,
> Bob Muller

-- 
Regards,
Francois.
"When in doubt, use more types"

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-29  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-28 16:42 [Caml-list] syntax highlighting of ocaml code in html Robert Muller
2015-06-28 17:01 ` Gabriel Scherer
2015-06-28 17:02 ` Daniel Bünzli
2015-06-29  7:54 ` Francois Berenger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).