OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Better rendering for programlisting


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/05/2012 08:33 AM, Norman Walsh wrote:
> 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.

Hi Norm,
We encountered the line height problem when we integrated
SyntaxHighlighter [1]. Our solution was to make the callout graphics
slightly smaller and increase the line spacing slightly. I've posted
an example [2] (scroll down to the listing with 11 callouts to see
that there is no effect on the line spacing).

Note: To use SyntaxHighlighter, we had to modify it so that it ignores
callouts when doing the syntax highlighting. There's a slight
performance hit since it adds some regular expression that have to be
evaluated. Another thing we had to do to make this work is to strip
out most markup from code listings. We still allow DocBook markup that
ends up bolding text in the code listing, but we strip out markup that
doesn't have any presentational effect. Otherwise, it would have
required many regular expressions to tell SyntaxHighlighter to skip.

One advantage of SyntaxHighlighter is that if you double click the
listing, you can copy it without getting the alt text values for the
callouts like you do with straight DocBook.

David

[1] http://alexgorbatchev.com/SyntaxHighlighter/
[2]
http://feline.thingbag.net/SyntaxHighlighterTest/content/DB_copy_paste_examples.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPpTrzAAoJEMHeSXG7afUhvRYH/1u26Bh/k3jqc3KqLo4/OM9A
WSs5wxKod/lpVVx3vawfsGIB4XoT82qfcJa13U+vD0/3fnqiIWa8p9zcAeOn+XNn
NZ7B9rxTi+R9DizeNI9PZfjq1aw+0pvF0yV1B+cL92D9evkmeXM/ZW3J3xWiOBkW
7Gf1+5qaiqGn29F7qD6Po70e7gQKPQDt3gIvAAKpMxQqRa6wmT80xLKCR5ujzGrr
nhH8QjMCRh7sTVRcS4cv3ihu79+HoysxKFELuDmZv6Da7roHP0Yn7AMIZD4wMRBP
CA7qJay3kHGp4bnOJ+DjUcbOOSY22taUHGq+48t7LmcJZ+lcJApbSbRL1ti2Zs4=
=N/B3
-----END PGP SIGNATURE-----


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]