[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: Better rendering for programlisting
David Cramer <david@thingbag.net> writes: > 1. Remove the alt text, so that when the user copies the code listing > nothing comes with it, but then you don't have alt text. All things considered, that seems the least objectionable. > 2. Use SyntaxHighligher with modifications to allow callouts. This > gives you syntax highlighting, line numbering, and copy, but has the > tradeoffs mentioned in my previous posting in this thread. Requiring complex JavaScript goo seems...suboptimal. > 3. a. Put the code listing in the page twice, once formatted however > you like with callouts, syntax highlighting, line numbering, etc, and > another time completely unmodified. If JavaScript is turned on, hide > the unmodified version and show the modified version, but provide a > "Copy" button which copies the content of the unmodified version into > the clipboard > b. Instead of a "Copy" button, use a "Raw" button/link which opens > a small window showing the unmodifed version of the listing. And > instead of putting the code listing in the page twice, put the > unmodified listing in a separate file which is loaded in a new window > when the user clicks the Raw link. Both 3a and 3b seem to impose pretty significant expectations on the rendering system. (With respect to generated files, filenames, linking etc.) Be seeing you, norm -- Norman Walsh <ndw@nwalsh.com> | O for a Muse of fire, that would http://www.oasis-open.org/docbook/ | ascend / The brightest heaven of Chair, DocBook Technical Committee | invention, / A kingdom for a | stage, princes to act / And | monarchs to behold the swelling | scene!--William Shakespeare, Henry | V
Attachment:
pgphIKqPAuJF8.pgp
Description: PGP signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]