[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Better rendering for programlisting
On 05/05/12 14:33, Norman Walsh wrote:
Hello world, The current rendering for verbatim environments, when line numbers are enabled, has a significant deficiency: you can't cut-and-paste the listing without also getting the line numbers and separators. Looking around at other sites with numbered program listings, the solution seems to be to use tables. Put the line numbers in the first column and the listing in the second. That works, mostly, but if anything in the listing causes a variation in line height (such as a larger callout), the numbers and the lines get out of sync. Using one-line-per-row fixes this, but then cut-and-paste doesn't work again; the selection crosses over all the columns in each row. An alternative solution uses nested divs and some slightly fancy CSS. Naturally, it doesn't work in IE. I've put an example online: http://nwalsh.com/scratch/out.html The callout graphics in the listing are intentionally broken because that was the easiest way to introduce variation. At this font-size, the callouts are actually ok. So: 1. Stick with what we have now. 2. Use the table solution and accept the limitation that all lines must always be the same height.
Why is this an issue Norm? How often in a fixed width font do users want exponents/Drop caps etc?
3. Find a way to tweak the CSS solution so that IE doesn't fall over
(or chase pixie dust?)
I'm open to suggestions on 3, but I'm not likely to figure it out myself. Thoughts? Other suggestions?
You've obviated the line numbers by putting content in col 2... why not finish the job and put co in col 3? Then I could cut/paste? HTH regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]