unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using htmlize.el with linum-mode
@ 2011-05-13  0:22 chengiz
  2011-05-19 22:05 ` Xah Lee
  0 siblings, 1 reply; 3+ messages in thread
From: chengiz @ 2011-05-13  0:22 UTC (permalink / raw)
  To: help-gnu-emacs

Is it possible to use htmlize.el such that line numbers in the source
code also show up in the html? Thank you.


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

* Re: Using htmlize.el with linum-mode
  2011-05-13  0:22 Using htmlize.el with linum-mode chengiz
@ 2011-05-19 22:05 ` Xah Lee
  2011-05-24 17:16   ` Rolando Pereira
  0 siblings, 1 reply; 3+ messages in thread
From: Xah Lee @ 2011-05-19 22:05 UTC (permalink / raw)
  To: help-gnu-emacs

On May 12, 5:22 pm, chengiz <chen...@my-deja.com> wrote:
> Is it possible to use htmlize.el such that line numbers in the source
> code also show up in the html? Thank you.

i don't think so because the line numbers in the margin is not part of
buffer text, and htmlize works with buffer text.

google's code prettify might be able to do it
http://xahlee.org/js/google-code-prettify/index.html

also, i don't think it's too hard to write a js so it adds line
numbers to pre blocks.

 Xah


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

* Re: Using htmlize.el with linum-mode
  2011-05-19 22:05 ` Xah Lee
@ 2011-05-24 17:16   ` Rolando Pereira
  0 siblings, 0 replies; 3+ messages in thread
From: Rolando Pereira @ 2011-05-24 17:16 UTC (permalink / raw)
  To: help-gnu-emacs

Xah Lee <xahlee@gmail.com> writes:

> On May 12, 5:22 pm, chengiz <chen...@my-deja.com> wrote:
>> Is it possible to use htmlize.el such that line numbers in the source
>> code also show up in the html? Thank you.
>
> i don't think so because the line numbers in the margin is not part of
> buffer text, and htmlize works with buffer text.
>
> google's code prettify might be able to do it
> http://xahlee.org/js/google-code-prettify/index.html
>
> also, i don't think it's too hard to write a js so it adds line
> numbers to pre blocks.
>
>  Xah

On Linux there is the "nl" command.

From the man pages:
NAME
       nl - number lines of files

SYNOPSIS
       nl [OPTION]... [FILE]...

DESCRIPTION
       Write each FILE to standard output, with line numbers added.
       With no FILE, or when FILE is -, read standard input.

It should be possible to use it with the shell-command-on-region or
something similar before calling the htmlize command.


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

end of thread, other threads:[~2011-05-24 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13  0:22 Using htmlize.el with linum-mode chengiz
2011-05-19 22:05 ` Xah Lee
2011-05-24 17:16   ` Rolando Pereira

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 read-only IMAP folder(s) and NNTP newsgroup(s).