Forum Feature requests

true tabs

jim_albright
I see how to simulate tabs but it sure would be easier to just allow us to set true tabs: decimal, center, left, right (left and right should better be called start and end or similar for bidi)

Also allowing leading would be nice . . . . . . . . . . . . . . . . . . . . 7

------

Dreaming: How about creating a TOC module that builds TOC for you based on criteria you give. It is totally mechanical to do.

Jim Albright
Wycliffe Bible Translators

mikeday
The text-align property can be used for left/right/center alignment, and leaders can be done using generated content:
a[href]::after {
    content: leader('.') target-counter(attr(href), page)
}
A script or XSLT transform could be used to generate a table of contents automatically. We don't have this built in to Prince yet, but we may include something like this in the future.
jim_albright
A place where I would use tabs is in Psalms.


   9       This is a verse in Psalms with a right aligned
                                verse number.
                     And this is the second line of poetry 
                                for this particular verse.
  10       This is the next line of poetry in psalms.

Jim Albright
Wycliffe Bible Translators

mikeday
I think text-indent with the hanging keyword can do that, with appropriate CSS selectors, although depending upon the structure of your markup it may not be as convenient as plain text plus tabs.
jim_albright
I'm back to testing putting Scripture into PDF using Prince. I have hit the problem of tabs again. In poetry the text-indent with hanging could work. But if we use a tab near the start of a paragraph as follows it doesn't work:

12          This is verse twelve at a start of a paragraph. The wrap should wrap underneath the verse number. There should be a tab between the verse number and the verse text start. Text indent and hanging don't fix this problem that I can see. Maybe my request is too obscure. I can work around this faking tab with   


I would appreciate adding real tab support to Prince.

Jim Albright
Wycliffe Bible Translators

mikeday
How about using an empty span element with horizontal padding?
jim_albright
Here is more of the problem with poetry.

     9      This is the start of poetry line. Note that the verse 
                    numbers are right aligned. The hanging indent
                    sets the position of the wrap. 
    10      This is another first level of poetry. Verse numbers are
                    right aligned.
 11-12         This is the start of a second level of poetry. And 
                    this is where it wraps to the same position as 
                    the first level of poety.

You can see all these features in Good News Bible Psalms 6 and 7.
You would suggest putting the verse number in a span with text-align right to achieve verse number aligned right. Then add padding right on the span to move the text to start position of text. The wrap is achieved with text-indent hanging. For a line without a verse number we would need to add an empty verse span for alignment. It seems possible. True tabs are a lot easier. Maybe you can simulate them by adding the spans inside of Prince.

Jim Albright
Wycliffe Bible Translators