File: README.md

package info (click to toggle)
emacs-htmlize 1.59-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 348 kB
  • sloc: lisp: 1,244; makefile: 55
file content (28 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Htmlize — Convert buffer text and decorations to HTML

This package converts the buffer text and the associated
decorations to HTML.

To use it, just switch to the buffer you want HTML-ized and type
<kbd>M-x htmlize-buffer</kbd>.  You will be switched to a new buffer
that contains the resulting HTML code.  You can edit and inspect this
buffer, or you can just save it with <kbd>C-x C-w</kbd>.  <kbd>M-x
htmlize-file</kbd> will find a file, fontify it, and save the HTML
version in `FILE.html`, without any additional intervention.  <kbd>M-x
htmlize-many-files</kbd> allows you to htmlize any number of files in
the same manner.  <kbd>M-x htmlize-many-files-dired</kbd> does the
same for files marked in a dired buffer.

Htmlize supports three types of HTML output, selected by setting
`htmlize-output-type`: `css`, `inline-css` (optimized for code
snippets), and `font` (simpler output, doesn't rely on CSS).  See
`htmlize.el.html` for an example of generated HTML.

You can also use htmlize from your Emacs Lisp code.  When called
non-interactively, `htmlize-buffer` and `htmlize-region` will
return the resulting HTML buffer, but will not change current
buffer or move the point.  Htmlize will do its best to work on
non-windowing Emacs sessions but the result will be limited to
colors supported by the terminal.

[1]: http://htmlpreview.github.io/?https://github.com/emacsorphanage/htmlize/blob/master/htmlize.el.html