help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using htmlize.el with linum-mode


From: Rolando Pereira
Subject: Re: Using htmlize.el with linum-mode
Date: Tue, 24 May 2011 18:16:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]