[Top][All Lists]

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

Re: [patch] ox-html.el: add html attribute (verse numbers) to verse bloc

From: Juan Manuel Macías
Subject: Re: [patch] ox-html.el: add html attribute (verse numbers) to verse blocks
Date: Tue, 31 May 2022 11:00:40 +0000

Ihor Radchenko writes:

> The default switches syntax was originally designed for code block and
> it generally supports continuous numbering across several subsequent
> code blocks or starting the numbering from certain line. Will such
> features be useful for verses?
> [...]
> Do you know if customizing :lines 5 to something other than 5 is often
> needed? Maybe it can be an export option?

There are some differences between code numbering and verse numbering,
which is a convention used in Humanities and used by wikipedia and other
sites as well:

- The first verse is never numbered;

- White lines are not numbered;

- Numbering is added in a sequence, never continuously. The sequence is
  generally 5, but it is common to find sequences of 3, 10 or other
  digits (with that I answer your second question).

All of these features are performed in LaTeX by the 'verse' package, and
in the patch I submit for LaTeX I simply passed the options to these
package on LaTeX export. See:

(info (org)Verse blocks in LaTeX export)

The :lines attribute accepts any integer for the sequence: :lines 7
:lines 10, etc. :lines t defaults to 5. With this html patch I tried to
keep that same syntax. To format the verse numbering in html I was loosely
inspired by the way wikipedia does it.

I think line numbering is an idiosyncratic case and should not be
confused with standard line numbering as understood by Emacs linum-mode
or any other text editor. What I don't know is if the switches code
numbering could be reused in that peculiar case. An interesting
functionality could be to choose at which number the quoted fragment or
poem begins (because it is common to quote fragments of long poems. In
the LaTeX version this is obtained by :latexcode \setverselinenums{}{}

Nota bene: I understand that all these functionalities for verses are,
at the moment, a minority in Org, since Org has a small number of
Humanities users (here in Spain I try to gain followers among my
colleagues, but it is an arduous task). In any case, I think features
like this can attract more Humanities users...

Best regards,

Juan Manuel 

reply via email to

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