Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2014 08:30:39 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        =?ISO-8859-15?Q?G=E1bor_K=F6vesd=E1n?= <gabor@kovesdan.org>
Cc:        doc@FreeBSD.org
Subject:   Re: RFC: line numbered programlisting in HTML docs
Message-ID:  <alpine.BSF.2.00.1401210806370.54731@wonkity.com>
In-Reply-To: <52DE7D76.5040609@kovesdan.org>
References:  <52DE7D76.5040609@kovesdan.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Jan 2014, Gábor Kövesdán wrote:

> in the pdf version of the documentation we have rendered line wrap indicators 
> that show the reader when a long line has been wrapped into multiple lines so 
> that it can be rendered. In the HTML version we have scrollable 
> programlistings, which is not so smart since you may need to scroll to read 
> all of the code, which is not comfortable. Using line wrap indicators in HTML 
> is only possible with an ugly CSS trick but if we number the lines, which in 
> turn is quite easy, it becomes obvious when a long line is wrapped. This is 
> what I propose for programlisting and screen elements. Also, line numbering 
> is a useful feature in itself.
>
> Demo: http://kovesdan.org/doc/proglist.html
>
> Patch: http://kovesdan.org/patches/programlisting.diff

It's interesting, and looks nice.

There's no clear indicator of what the single-digit line numbers 
mean, but that's probably not serious.

Another concern is cut and paste, whether the long line pastes as a 
single line or not.  Firefox seems to have a ongoing bug and pastes 
*everything* copied as a single line anyway.

With Midori, the long line and the rest of the content pastes correctly.

Are blank lines not numbered, or is the blank second line added by the 
markup after long lines?

For programlistings, I think this is fine.  On screen elements, the 
added line numbers may not help, but we have fewer screen elements with 
too-long lines.
From owner-freebsd-doc@FreeBSD.ORG  Tue Jan 21 16:23:55 2014
Return-Path: <owner-freebsd-doc@FreeBSD.ORG>
Delivered-To: doc@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id AC3A23CE
 for <doc@FreeBSD.org>; Tue, 21 Jan 2014 16:23:55 +0000 (UTC)
Received: from server.mypc.hu (server.mypc.hu [87.229.73.95])
 (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5E5E71E76
 for <doc@FreeBSD.org>; Tue, 21 Jan 2014 16:23:55 +0000 (UTC)
Received: from server.mypc.hu (localhost [127.0.0.1])
 by server.mypc.hu (Postfix) with ESMTP id 0F0C614D242D;
 Tue, 21 Jan 2014 17:23:51 +0100 (CET)
X-Virus-Scanned: amavisd-new at !change-mydomain-variable!.example.com
Received: from server.mypc.hu ([127.0.0.1])
 by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id lICm7xevgAFh; Tue, 21 Jan 2014 17:23:50 +0100 (CET)
Received: from [192.168.0.10] (54034B4D.catv.pool.telekom.hu [84.3.75.77])
 (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
 (No client certificate requested)
 by server.mypc.hu (Postfix) with ESMTPSA id 8676114D242C;
 Tue, 21 Jan 2014 17:23:50 +0100 (CET)
Message-ID: <52DE9F0D.3080803@kovesdan.org>
Date: Tue, 21 Jan 2014 17:23:41 +0100
From: =?ISO-8859-15?Q?G=E1bor_K=F6vesd=E1n?= <gabor@kovesdan.org>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:17.0) Gecko/20130801 Thunderbird/17.0.8
MIME-Version: 1.0
To: Warren Block <wblock@wonkity.com>
Subject: Re: RFC: line numbered programlisting in HTML docs
References: <52DE7D76.5040609@kovesdan.org>
 <alpine.BSF.2.00.1401210806370.54731@wonkity.com>
In-Reply-To: <alpine.BSF.2.00.1401210806370.54731@wonkity.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Cc: doc@FreeBSD.org
X-BeenThere: freebsd-doc@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Documentation project <freebsd-doc.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-doc>,
 <mailto:freebsd-doc-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-doc/>;
List-Post: <mailto:freebsd-doc@freebsd.org>
List-Help: <mailto:freebsd-doc-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-doc>,
 <mailto:freebsd-doc-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 21 Jan 2014 16:23:55 -0000

On 2014.01.21. 16:30, Warren Block wrote:
> Are blank lines not numbered, or is the blank second line added by the 
> markup after long lines?
That was a problem with my hand-written markup. I've just fixed it and 
it does not happen with generated markup.

Gabor



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1401210806370.54731>